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

Function GetCurrentSchema

core/schema.go:24–31  ·  view source on GitHub ↗

GetCurrentSchema returns the current schema used by the context. Defaults to "public" if the context does not specify a schema.

(ctx *sql.Context)

Source from the content-addressed store, hash-verified

22// GetCurrentSchema returns the current schema used by the context. Defaults to "public" if the context does not specify
23// a schema.
24func GetCurrentSchema(ctx *sql.Context) (string, error) {
25 _, root, err := GetRootFromContext(ctx)
26 if err != nil {
27 return "", nil
28 }
29
30 return resolve.FirstExistingSchemaOnSearchPath(ctx, root)
31}
32
33// GetSchemaName returns the schema name if there is any exist.
34// If the given schema is not empty, it's returned.

Callers 8

doesRelationExistMethod · 0.92
ParseRelationNameFunction · 0.92
getDoltgresTypeFromIdFunction · 0.92
FunctionMethod · 0.92
getTargetTypeMethod · 0.92
RowIterMethod · 0.92
GetRelationTypeFunction · 0.85
GetSchemaNameFunction · 0.85

Calls 1

GetRootFromContextFunction · 0.85

Tested by

no test coverage detected