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

Method GetSchema

server/tables/pg_database.go:157–163  ·  view source on GitHub ↗

GetSchema overrides sqle.ReadOnlyDatabase.GetSchema to apply Doltgres schema wrapping.

(ctx *sql.Context, schemaName string)

Source from the content-addressed store, hash-verified

155
156// GetSchema overrides sqle.ReadOnlyDatabase.GetSchema to apply Doltgres schema wrapping.
157func (d *PgReadOnlyDatabase) GetSchema(ctx *sql.Context, schemaName string) (sql.DatabaseSchema, bool, error) {
158 schema, ok, err := d.ReadOnlyDatabase.GetSchema(ctx, schemaName)
159 if !ok || err != nil {
160 return schema, ok, err
161 }
162 return applySchemaWrap(schemaName, schema), true, nil
163}
164
165// GetTableInsensitive overrides sqle.Database.GetTableInsensitive to check the pg_catalog
166// virtual schema before falling back to user tables.

Callers 1

GetTableInsensitiveMethod · 0.95

Calls 2

applySchemaWrapFunction · 0.85
GetSchemaMethod · 0.45

Tested by

no test coverage detected