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

Function SetPgCatalogCache

core/context.go:137–144  ·  view source on GitHub ↗

SetPgCatalogCache sets |pgCatalogCache| as the catalog cache instance for this session. TODO: The input type here is currently any, to avoid a package import cycle. This could be cleaned up by introducing a new interface type, in a package that does not depend on core or pgcatalog packages.

(ctx *sql.Context, pgCatalogCache any)

Source from the content-addressed store, hash-verified

135// TODO: The input type here is currently any, to avoid a package import cycle. This could be cleaned up by
136// introducing a new interface type, in a package that does not depend on core or pgcatalog packages.
137func SetPgCatalogCache(ctx *sql.Context, pgCatalogCache any) error {
138 cv, err := getContextValues(ctx)
139 if err != nil {
140 return err
141 }
142 cv.pgCatalogCache = pgCatalogCache
143 return nil
144}
145
146// SetRunnerOnContext sets the given runner within the context values.
147func SetRunnerOnContext(ctx *sql.Context, runner sql.StatementRunner) error {

Callers 1

Calls 1

getContextValuesFunction · 0.85

Tested by

no test coverage detected