Documentation ¶
Overview ¶
Package metadata wraps a SQL connection with metadata operations. These operations are used to store and retrieve metadata about a database.
Index ¶
- Variables
- func CreateTables(ctx context.Context, tables []*types.Table, kv KV, exec sql.ResultSetFunc) error
- func ListExtensions(ctx context.Context, kv KV) ([]*types.Extension, error)
- func ListProcedures(ctx context.Context, kv KV) ([]*types.Procedure, error)
- func ListTables(ctx context.Context, kv KV) ([]*types.Table, error)
- func RunMigration(ctx context.Context, kv KV) error
- func StoreExtensions(ctx context.Context, extensions []*types.Extension, kv KV) error
- func StoreProcedures(ctx context.Context, procedures []*types.Procedure, kv KV) error
- type KV
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMetadataVersionMismatch = errors.New("metadata version mismatch. the database needs to run migrations")
)
Functions ¶
func CreateTables ¶
CreateTables creates tables and stores them
func ListExtensions ¶
ListExtensions lists all extensions in the database.
func ListProcedures ¶
ListProcedures lists all procedures in the database.
func ListTables ¶
ListTables lists all tables in the database.
func RunMigration ¶
RunMigration runs a migration against the metadata store. This is used in case of an update to Kwil's schema structure. It will read out the current schema version, update them, and store them, all if necessary.
func StoreExtensions ¶
StoreExtension stores an extension in the metadata store.
Types ¶
Click to show internal directories.
Click to hide internal directories.