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

Function IsContextValid

core/context.go:111–117  ·  view source on GitHub ↗

IsContextValid returns whether the context is valid for use with any of the functions in the package. If this is not false, then there's a high likelihood that the context is being used in a temporary scenario (such as setting up the database, etc.).

(ctx *sql.Context)

Source from the content-addressed store, hash-verified

109// false, then there's a high likelihood that the context is being used in a temporary scenario (such as setting up the
110// database, etc.).
111func IsContextValid(ctx *sql.Context) bool {
112 if ctx == nil {
113 return false
114 }
115 _, ok := ctx.Session.(*dsess.DoltSession)
116 return ok
117}
118
119// GetPgCatalogCache returns a cache of data for pg_catalog tables. This function should only be used by
120// pg_catalog table handlers. The catalog cache instance stores generated pg_catalog table data so that

Callers 2

FunctionMethod · 0.92
RowIterMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected