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)
| 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. |
| 48 | func (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. |
no test coverage detected