@@ -33,12 +33,17 @@ class GigapiTableEntry : public TableCatalogEntry {
3333 }
3434};
3535
36- GigapiSchema::GigapiSchema (Catalog &catalog, const std::string &name )
37- : SchemaCatalogEntry(catalog, name ) {}
36+ GigapiSchema::GigapiSchema (Catalog &catalog, CreateSchemaInfo &info )
37+ : SchemaCatalogEntry(catalog, info ) {}
3838
39- TableCatalogEntry *GigapiSchema::GetTable (ClientContext &context, const std::string &table_name) {
39+ optional_ptr<CatalogEntry> GigapiSchema::LookupEntry (CatalogTransaction transaction, const EntryLookupInfo &lookup_info) {
40+ // Only handle table lookups
41+ if (lookup_info.type != CatalogType::TABLE_ENTRY) {
42+ return nullptr ;
43+ }
4044 // Always return a GigapiTableEntry for any table name
41- return new GigapiTableEntry (*catalog, *this , table_name);
45+ auto entry = make_uniq<GigapiTableEntry>(*catalog, *this , lookup_info.name );
46+ return entry.release ();
4247}
4348
4449// Handler for ATTACH ... (TYPE gigapi, ...)
@@ -53,7 +58,7 @@ static void GigapiAttachHandler(ClientContext &context, const std::string &schem
5358 auto &db = DatabaseInstance::Get (context);
5459 auto &schemas = db.GetCatalogSet (CatalogType::SCHEMA_ENTRY);
5560 schemas.DropEntry (context, schema_name, false );
56- auto gigapi_schema = make_uniq<GigapiSchema>(catalog, schema_name );
61+ auto gigapi_schema = make_uniq<GigapiSchema>(catalog, info );
5762 schemas.AddEntry (context, std::move (gigapi_schema));
5863}
5964
0 commit comments