MCPcopy Create free account
hub / github.com/dolthub/doltgresql / AllDatabases

Method AllDatabases

server/pg_provider.go:48–54  ·  view source on GitHub ↗

AllDatabases overrides DoltDatabaseProvider.AllDatabases to wrap each returned database with PgDatabase so that AllSchemas returns properly wrapped schemas (including pg_catalog virtual-table schemas) regardless of which code path iterates the catalog.

(ctx *sql.Context)

Source from the content-addressed store, hash-verified

46// with PgDatabase so that AllSchemas returns properly wrapped schemas (including pg_catalog
47// virtual-table schemas) regardless of which code path iterates the catalog.
48func (p *DoltgresDatabaseProvider) AllDatabases(ctx *sql.Context) []sql.Database {
49 all := p.DoltDatabaseProvider.AllDatabases(ctx)
50 for i, db := range all {
51 all[i] = tables.WrapSqlDatabase(db)
52 }
53 return all
54}
55
56// UnderlyingDoltProvider implements sqle.DoltProviderUnwrapper so that NewSqlEngine can
57// access the wrapped *DoltDatabaseProvider for Dolt-specific configuration.

Callers 2

RowIterMethod · 0.80
allDatabasesWithNamesFunction · 0.80

Calls 1

WrapSqlDatabaseFunction · 0.92

Tested by

no test coverage detected