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
}
