Versions in this module Expand all Collapse all v1 v1.0.6 Mar 20, 2026 v1.0.5 Mar 20, 2026 Changes in this version + type BloatInfo struct + BloatRatio float64 + DeadTuples int64 + LastAnalyze string + LastAutoVac string + LastVacuum string + LiveTuples int64 + Name string + SchemaName string + TableSize int64 + type EmbeddingRow struct + ID string + Vector []float64 + type ExtensionInfo struct + Comment string + Installed bool + Name string + Schema string + Version string + type IndexBloatInfo struct + BloatPct float64 + IndexName string + IndexSize int64 + SchemaName string + TableName string + TableSize int64 + type MongoDBProvider struct + func (m *MongoDBProvider) AlterTableAdd(context.Context, string, db.ColumnDef) error + func (m *MongoDBProvider) AlterTableDrop(context.Context, string, string) error + func (m *MongoDBProvider) AlterTableRename(context.Context, string, string, string) error + func (m *MongoDBProvider) Client() *mongo.Client + func (m *MongoDBProvider) Close() error + func (m *MongoDBProvider) CreateIndex(ctx context.Context, table string, index db.IndexDef) error + func (m *MongoDBProvider) CreateTable(ctx context.Context, name string, _ []db.ColumnDef, _ bool) error + func (m *MongoDBProvider) CreateView(ctx context.Context, view db.ViewDef) error + func (m *MongoDBProvider) DBName() string + func (m *MongoDBProvider) Database() *mongo.Database + func (m *MongoDBProvider) DatabaseStats(ctx context.Context) (*db.DbStats, error) + func (m *MongoDBProvider) DescribeTable(ctx context.Context, table string) ([]db.ColumnInfo, error) + func (m *MongoDBProvider) DropIndex(ctx context.Context, table, indexName string) error + func (m *MongoDBProvider) DropTable(ctx context.Context, name string, _ bool) error + func (m *MongoDBProvider) DropView(ctx context.Context, name string) error + func (m *MongoDBProvider) Exec(ctx context.Context, query string, args ...any) (int64, error) + func (m *MongoDBProvider) Kind() db.ProviderKind + func (m *MongoDBProvider) ListConstraints(context.Context, string) ([]db.ConstraintInfo, error) + func (m *MongoDBProvider) ListIndexes(ctx context.Context, table string) ([]db.IndexInfo, error) + func (m *MongoDBProvider) ListTables(ctx context.Context, _ string) ([]db.TableInfo, error) + func (m *MongoDBProvider) ListViews(ctx context.Context, _ string) ([]db.ViewInfo, error) + func (m *MongoDBProvider) Ping(ctx context.Context) error + func (m *MongoDBProvider) Query(ctx context.Context, query string, args ...any) ([]map[string]any, error) + func (m *MongoDBProvider) TableSize(ctx context.Context, table string) (*db.TableStats, error) + type MySQLProvider struct + func NewMySQL(sqlDB *sql.DB) *MySQLProvider + func (m *MySQLProvider) AlterTableAdd(ctx context.Context, table string, column db.ColumnDef) error + func (m *MySQLProvider) AlterTableDrop(ctx context.Context, table string, columnName string) error + func (m *MySQLProvider) AlterTableRename(ctx context.Context, table, oldCol, newCol string) error + func (m *MySQLProvider) Close() error + func (m *MySQLProvider) CreateIndex(ctx context.Context, table string, index db.IndexDef) error + func (m *MySQLProvider) CreateTable(ctx context.Context, name string, columns []db.ColumnDef, ifNotExists bool) error + func (m *MySQLProvider) CreateView(ctx context.Context, view db.ViewDef) error + func (m *MySQLProvider) DatabaseStats(ctx context.Context) (*db.DbStats, error) + func (m *MySQLProvider) DescribeTable(ctx context.Context, table string) ([]db.ColumnInfo, error) + func (m *MySQLProvider) DropIndex(ctx context.Context, table, indexName string) error + func (m *MySQLProvider) DropTable(ctx context.Context, name string, ifExists bool) error + func (m *MySQLProvider) DropView(ctx context.Context, name string) error + func (m *MySQLProvider) Exec(ctx context.Context, query string, args ...any) (int64, error) + func (m *MySQLProvider) Kind() db.ProviderKind + func (m *MySQLProvider) ListConstraints(ctx context.Context, table string) ([]db.ConstraintInfo, error) + func (m *MySQLProvider) ListIndexes(ctx context.Context, table string) ([]db.IndexInfo, error) + func (m *MySQLProvider) ListTables(ctx context.Context, _ string) ([]db.TableInfo, error) + func (m *MySQLProvider) ListViews(ctx context.Context, _ string) ([]db.ViewInfo, error) + func (m *MySQLProvider) Ping(ctx context.Context) error + func (m *MySQLProvider) Query(ctx context.Context, query string, args ...any) ([]map[string]any, error) + func (m *MySQLProvider) TableSize(ctx context.Context, table string) (*db.TableStats, error) + type PartitionInfo struct + Expression string + Name string + Parent string + type PolicyDef struct + Command string + Name string + Permissive bool + Roles []string + Table string + Using string + WithCheck string + type PolicyInfo struct + Command string + Name string + Permissive string + Roles string + Table string + Using string + WithCheck string + type PostgresProvider struct + func NewPostgres(sqlDB *sql.DB) *PostgresProvider + func (p *PostgresProvider) AddTsvectorColumn(ctx context.Context, table, column, language string, sourceColumns []string) error + func (p *PostgresProvider) AddVectorColumn(ctx context.Context, table, column string, dimensions int) error + func (p *PostgresProvider) AlterTableAdd(ctx context.Context, table string, column db.ColumnDef) error + func (p *PostgresProvider) AlterTableDrop(ctx context.Context, table string, columnName string) error + func (p *PostgresProvider) AlterTableRename(ctx context.Context, table, oldCol, newCol string) error + func (p *PostgresProvider) Analyze(ctx context.Context, table string, verbose bool) error + func (p *PostgresProvider) BulkUpsertEmbeddings(ctx context.Context, table, idColumn, column string, rows []EmbeddingRow) error + func (p *PostgresProvider) Close() error + func (p *PostgresProvider) Cluster(ctx context.Context, table, index string) error + func (p *PostgresProvider) CreateGINIndex(ctx context.Context, table, column, indexName string) error + func (p *PostgresProvider) CreateIndex(ctx context.Context, table string, index db.IndexDef) error + func (p *PostgresProvider) CreateMaterializedView(ctx context.Context, name, query string, withData bool) error + func (p *PostgresProvider) CreatePartition(ctx context.Context, parent, name, bound string) error + func (p *PostgresProvider) CreatePartitionedTable(ctx context.Context, name string, columns []db.ColumnDef, ...) error + func (p *PostgresProvider) CreatePolicy(ctx context.Context, pol PolicyDef) error + func (p *PostgresProvider) CreateRole(ctx context.Context, name, password string, login, createdb, superuser bool) error + func (p *PostgresProvider) CreateSchema(ctx context.Context, name, authorization string) error + func (p *PostgresProvider) CreateTable(ctx context.Context, name string, columns []db.ColumnDef, ifNotExists bool) error + func (p *PostgresProvider) CreateTrigger(ctx context.Context, table, name, timing string, events []string, ...) error + func (p *PostgresProvider) CreateTriggerFunction(ctx context.Context, name, body, language string, replace bool) error + func (p *PostgresProvider) CreateVectorIndex(ctx context.Context, table, column, method, distance string, ...) error + func (p *PostgresProvider) CreateView(ctx context.Context, view db.ViewDef) error + func (p *PostgresProvider) DatabaseStats(ctx context.Context) (*db.DbStats, error) + func (p *PostgresProvider) DeleteEmbeddings(ctx context.Context, table, idColumn string, ids []string, where string) (int64, error) + func (p *PostgresProvider) DescribeTable(ctx context.Context, table string) ([]db.ColumnInfo, error) + func (p *PostgresProvider) DetachPartition(ctx context.Context, parent, partition string, concurrent bool) error + func (p *PostgresProvider) DisableRLS(ctx context.Context, table string) error + func (p *PostgresProvider) DropIndex(ctx context.Context, _ string, indexName string) error + func (p *PostgresProvider) DropSchema(ctx context.Context, name string, cascade bool) error + func (p *PostgresProvider) DropTable(ctx context.Context, name string, ifExists bool) error + func (p *PostgresProvider) DropTrigger(ctx context.Context, table, name string, cascade bool) error + func (p *PostgresProvider) DropView(ctx context.Context, name string) error + func (p *PostgresProvider) EnableExtension(ctx context.Context, name, schema string) error + func (p *PostgresProvider) EnableRLS(ctx context.Context, table string, force bool) error + func (p *PostgresProvider) EnableVectors(ctx context.Context) error + func (p *PostgresProvider) Exec(ctx context.Context, query string, args ...any) (int64, error) + func (p *PostgresProvider) FTSSearch(ctx context.Context, table, column, query, language string, limit int) ([]map[string]any, error) + func (p *PostgresProvider) GetSearchPath(ctx context.Context) (string, error) + func (p *PostgresProvider) GetVectorStats(ctx context.Context, table, column string) (*VectorStats, error) + func (p *PostgresProvider) Grant(ctx context.Context, privileges, on, to string) error + func (p *PostgresProvider) IndexBloat(ctx context.Context, minBloatPct float64) ([]IndexBloatInfo, error) + func (p *PostgresProvider) Kind() db.ProviderKind + func (p *PostgresProvider) ListChannels(ctx context.Context) ([]string, error) + func (p *PostgresProvider) ListConstraints(ctx context.Context, table string) ([]db.ConstraintInfo, error) + func (p *PostgresProvider) ListExtensions(ctx context.Context, available bool) ([]ExtensionInfo, error) + func (p *PostgresProvider) ListIndexes(ctx context.Context, table string) ([]db.IndexInfo, error) + func (p *PostgresProvider) ListPartitions(ctx context.Context, table string) ([]PartitionInfo, error) + func (p *PostgresProvider) ListPolicies(ctx context.Context, table string) ([]PolicyInfo, error) + func (p *PostgresProvider) ListPublications(ctx context.Context) ([]PublicationInfo, error) + func (p *PostgresProvider) ListReplicationSlots(ctx context.Context) ([]ReplicationSlot, error) + func (p *PostgresProvider) ListRoles(ctx context.Context) ([]RoleInfo, error) + func (p *PostgresProvider) ListSchemas(ctx context.Context) ([]SchemaInfo, error) + func (p *PostgresProvider) ListTables(ctx context.Context, schema string) ([]db.TableInfo, error) + func (p *PostgresProvider) ListTriggers(ctx context.Context, table string) ([]TriggerInfo, error) + func (p *PostgresProvider) ListViews(ctx context.Context, schema string) ([]db.ViewInfo, error) + func (p *PostgresProvider) Listen(ctx context.Context, channel string) error + func (p *PostgresProvider) Notify(ctx context.Context, channel, payload string) error + func (p *PostgresProvider) Ping(ctx context.Context) error + func (p *PostgresProvider) Query(ctx context.Context, query string, args ...any) ([]map[string]any, error) + func (p *PostgresProvider) RefreshMaterializedView(ctx context.Context, name string, concurrently bool) error + func (p *PostgresProvider) Reindex(ctx context.Context, target, name string, concurrent bool) error + func (p *PostgresProvider) ReplicationStatus(ctx context.Context) ([]ReplicationStat, error) + func (p *PostgresProvider) Revoke(ctx context.Context, privileges, on, from string) error + func (p *PostgresProvider) SetSearchPath(ctx context.Context, schemas []string) error + func (p *PostgresProvider) TableBloat(ctx context.Context, table string) ([]BloatInfo, error) + func (p *PostgresProvider) TableSize(ctx context.Context, table string) (*db.TableStats, error) + func (p *PostgresProvider) UpsertEmbedding(ctx context.Context, table, idColumn, idValue, column string, vector []float64, ...) error + func (p *PostgresProvider) Vacuum(ctx context.Context, table string, analyze, full bool) error + func (p *PostgresProvider) VectorSearch(ctx context.Context, table, column string, queryVector []float64, ...) ([]map[string]any, error) + type PublicationInfo struct + AllTables bool + Delete bool + Insert bool + Name string + Owner string + Tables []string + Update bool + type RedisProvider struct + func (r *RedisProvider) AlterTableAdd(context.Context, string, db.ColumnDef) error + func (r *RedisProvider) AlterTableDrop(context.Context, string, string) error + func (r *RedisProvider) AlterTableRename(context.Context, string, string, string) error + func (r *RedisProvider) Client() *redis.Client + func (r *RedisProvider) Close() error + func (r *RedisProvider) CreateIndex(context.Context, string, db.IndexDef) error + func (r *RedisProvider) CreateTable(context.Context, string, []db.ColumnDef, bool) error + func (r *RedisProvider) CreateView(context.Context, db.ViewDef) error + func (r *RedisProvider) DatabaseStats(ctx context.Context) (*db.DbStats, error) + func (r *RedisProvider) DescribeTable(context.Context, string) ([]db.ColumnInfo, error) + func (r *RedisProvider) DropIndex(context.Context, string, string) error + func (r *RedisProvider) DropTable(context.Context, string, bool) error + func (r *RedisProvider) DropView(context.Context, string) error + func (r *RedisProvider) Exec(ctx context.Context, query string, args ...any) (int64, error) + func (r *RedisProvider) Kind() db.ProviderKind + func (r *RedisProvider) ListConstraints(context.Context, string) ([]db.ConstraintInfo, error) + func (r *RedisProvider) ListIndexes(context.Context, string) ([]db.IndexInfo, error) + func (r *RedisProvider) ListTables(ctx context.Context, _ string) ([]db.TableInfo, error) + func (r *RedisProvider) ListViews(context.Context, string) ([]db.ViewInfo, error) + func (r *RedisProvider) Ping(ctx context.Context) error + func (r *RedisProvider) Query(ctx context.Context, query string, args ...any) ([]map[string]any, error) + func (r *RedisProvider) TableSize(ctx context.Context, _ string) (*db.TableStats, error) + type ReplicationSlot struct + Active bool + Name string + Plugin string + RestLSN string + SlotType string + type ReplicationStat struct + AppName string + ClientIP string + FlushLSN string + PID int64 + ReplayLSN string + SentLSN string + State string + UserName string + WriteLSN string + type RoleInfo struct + ConnLimit int + CreateDB bool + CreateRole bool + Login bool + Name string + Replication bool + SuperUser bool + type SQLiteProvider struct + func NewSQLite(sqlDB *sql.DB) *SQLiteProvider + func (s *SQLiteProvider) AlterTableAdd(ctx context.Context, table string, column db.ColumnDef) error + func (s *SQLiteProvider) AlterTableDrop(ctx context.Context, table string, columnName string) error + func (s *SQLiteProvider) AlterTableRename(ctx context.Context, table, oldCol, newCol string) error + func (s *SQLiteProvider) Close() error + func (s *SQLiteProvider) CreateIndex(ctx context.Context, table string, index db.IndexDef) error + func (s *SQLiteProvider) CreateTable(ctx context.Context, name string, columns []db.ColumnDef, ifNotExists bool) error + func (s *SQLiteProvider) CreateView(ctx context.Context, view db.ViewDef) error + func (s *SQLiteProvider) DatabaseStats(ctx context.Context) (*db.DbStats, error) + func (s *SQLiteProvider) DescribeTable(ctx context.Context, table string) ([]db.ColumnInfo, error) + func (s *SQLiteProvider) DropIndex(ctx context.Context, _ string, indexName string) error + func (s *SQLiteProvider) DropTable(ctx context.Context, name string, ifExists bool) error + func (s *SQLiteProvider) DropView(ctx context.Context, name string) error + func (s *SQLiteProvider) Exec(ctx context.Context, query string, args ...any) (int64, error) + func (s *SQLiteProvider) Kind() db.ProviderKind + func (s *SQLiteProvider) ListConstraints(ctx context.Context, table string) ([]db.ConstraintInfo, error) + func (s *SQLiteProvider) ListIndexes(ctx context.Context, table string) ([]db.IndexInfo, error) + func (s *SQLiteProvider) ListTables(ctx context.Context, _ string) ([]db.TableInfo, error) + func (s *SQLiteProvider) ListViews(ctx context.Context, _ string) ([]db.ViewInfo, error) + func (s *SQLiteProvider) Ping(ctx context.Context) error + func (s *SQLiteProvider) Query(ctx context.Context, query string, args ...any) ([]map[string]any, error) + func (s *SQLiteProvider) TableSize(ctx context.Context, table string) (*db.TableStats, error) + type SchemaInfo struct + Default bool + Name string + Owner string + type TriggerInfo struct + Condition string + Enabled string + Events []string + Function string + Level string + Name string + Table string + Timing string + type VectorStats struct + Column string + Dimensions int + IndexName string + IndexSize string + IndexType string + RowCount int64 + Table string