Changeset 0.29.2 (#197)
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit is contained in:
20
server/store/ext_data_iface.go
Normal file
20
server/store/ext_data_iface.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package store
|
||||
|
||||
import "context"
|
||||
|
||||
// ExtDataStore tracks the namespaced tables created for each extension.
|
||||
// It is the catalog backing db.list_tables() and the install/uninstall lifecycle.
|
||||
// The actual extension data lives in tables named ext_{package_id}_{table_name};
|
||||
// this store only records the logical (unprefixed) names.
|
||||
type ExtDataStore interface {
|
||||
// RegisterTable records that a table was created for a package.
|
||||
// Safe to call multiple times — idempotent.
|
||||
RegisterTable(ctx context.Context, packageID, tableName string) error
|
||||
|
||||
// ListTables returns all logical table names registered for a package.
|
||||
ListTables(ctx context.Context, packageID string) ([]string, error)
|
||||
|
||||
// DeletePackageTables removes all catalog entries for a package.
|
||||
// Called after the physical tables have been dropped on uninstall.
|
||||
DeletePackageTables(ctx context.Context, packageID string) error
|
||||
}
|
||||
Reference in New Issue
Block a user