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)
| 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.). |
| 111 | func 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 |