Versions in this module Expand all Collapse all v0 v0.2.7 Nov 28, 2026 v0.2.6 Nov 27, 2026 Changes in this version + func LoadMasterKey(dataDir string, engine Engine) ([]byte, error) + type BackupManifest struct + CreatedAt time.Time + Engine Engine + Format string + RowsByTable map[string]int64 + SchemaVersion int + Sensitive bool + Version string + type Config struct + AppVersion string + CAFile string + ConnMaxLifetime time.Duration + ConnectTimeout time.Duration + DSN string + Database string + Engine Engine + Host string + MaxIdleConns int + MaxOpenConns int + Password string + Path string + Port int + Schema string + TLSMode string + Username string + func ConfigFromEnv(dataDir, appVersion string) (Config, error) + func (c Config) Validate() error + type Engine string + const EngineMySQL + const EnginePostgres + const EngineSQLite + type Store struct + func Open(path string) (*Store, error) + func OpenConfig(cfg Config) (*Store, error) + func OpenWithVersion(path, appVersion string) (*Store, error) + func (s *Store) APIKeyByHash(hash string) (core.APIKey, error) + func (s *Store) APIKeys() core.APIKeyStore + func (s *Store) AcquireLease(ctx context.Context, name, owner string, ttl time.Duration) (bool, error) + func (s *Store) AddLineage(edge core.LineageEdge) error + func (s *Store) AddMember(groupID, userID string) error + func (s *Store) AlertByID(id string) (core.Alert, error) + func (s *Store) Alerts() core.AlertStore + func (s *Store) Bookmarks() core.BookmarkStore + func (s *Store) ByEmail(email string) (core.User, error) + func (s *Store) ByID(id string) (core.User, error) + func (s *Store) Close() error + func (s *Store) CollectionByID(id string) (core.Collection, error) + func (s *Store) Collections() core.CollectionStore + func (s *Store) ConnectionSecrets(key []byte) (core.ConnectionSecretStore, error) + func (s *Store) Create(user core.User) error + func (s *Store) CreateAPIKey(key core.APIKey) error + func (s *Store) CreateAlert(a core.Alert) error + func (s *Store) CreateBookmark(b core.Bookmark) error + func (s *Store) CreateCollection(c core.Collection) error + func (s *Store) CreateDashboard(d core.Dashboard) error + func (s *Store) CreateGlossary(term core.GlossaryTerm) error + func (s *Store) CreateGroup(group core.Group) error + func (s *Store) CreateMetric(m core.Metric) error + func (s *Store) CreateModel(m core.Model) error + func (s *Store) CreateNotification(n core.Notification) error + func (s *Store) CreateQuestion(q core.Question) error + func (s *Store) CreateRevision(r core.Revision) error + func (s *Store) CreateRun(item core.Run) error + func (s *Store) CreateSchedule(item core.Schedule) error + func (s *Store) CreateSegment(seg core.Segment) error + func (s *Store) CreateSession(session core.Session) error + func (s *Store) CreateSubscription(item core.Subscription) error + func (s *Store) DashboardByID(id string) (core.Dashboard, error) + func (s *Store) DashboardByPublicUUID(uuid string) (core.Dashboard, error) + func (s *Store) Dashboards() core.DashboardStore + func (s *Store) Delete(id string) error + func (s *Store) DeleteAPIKey(id string) error + func (s *Store) DeleteAlert(id string) error + func (s *Store) DeleteBookmark(id, userID string) error + func (s *Store) DeleteCollection(id string) error + func (s *Store) DeleteExpired(now time.Time) error + func (s *Store) DeleteSession(id string) error + func (s *Store) DeleteSnapshot(databaseID string) error + func (s *Store) DeleteSubscription(id string) error + func (s *Store) DeleteUploadedTable(id string) error + func (s *Store) Engine() Engine + func (s *Store) ExportLogical(ctx context.Context, writer io.Writer, version string) (BackupManifest, error) + func (s *Store) Fields() core.FieldStore + func (s *Store) Get(key string) (string, bool, error) + func (s *Store) GetSnapshot(databaseID string) (core.SchemaSnapshot, error) + func (s *Store) GetTableAnnotation(databaseID, schema, table string) (core.TableAnnotation, error) + func (s *Store) Glossary() core.GlossaryStore + func (s *Store) Groups() core.GroupStore + func (s *Store) GroupsForUser(userID string) ([]core.Group, error) + func (s *Store) HasMember(groupID, userID string) (bool, error) + func (s *Store) ImportCatalog(items []core.Database) error + func (s *Store) IsCollectionSharedWith(collectionID, userID string) (bool, error) + func (s *Store) Lineage() core.LineageStore + func (s *Store) List() ([]core.Database, error) + func (s *Store) ListAPIKeys(userID string) ([]core.APIKey, error) + func (s *Store) ListAlerts() ([]core.Alert, error) + func (s *Store) ListAllAPIKeys() ([]core.APIKey, error) + func (s *Store) ListAllNotifications() ([]core.Notification, error) + func (s *Store) ListBookmarks(userID string) ([]core.Bookmark, error) + func (s *Store) ListCollectionShares(collectionID string) ([]core.CollectionShare, error) + func (s *Store) ListCollections() ([]core.Collection, error) + func (s *Store) ListDashboards(includeArchived bool) ([]core.Dashboard, error) + func (s *Store) ListDatabaseFields(databaseID string) ([]core.FieldMeta, error) + func (s *Store) ListFields(databaseID, schema, table string) ([]core.FieldMeta, error) + func (s *Store) ListGlossary() ([]core.GlossaryTerm, error) + func (s *Store) ListGroups() ([]core.Group, error) + func (s *Store) ListLineage(entityType, id string) ([]core.LineageEdge, error) + func (s *Store) ListMaterializedTables() ([]core.MaterializedTable, error) + func (s *Store) ListMaterializedTablesByDatabase(databaseID string) ([]core.MaterializedTable, error) + func (s *Store) ListMetrics() ([]core.Metric, error) + func (s *Store) ListModels() ([]core.Model, error) + func (s *Store) ListNotifications(userID string) ([]core.Notification, error) + func (s *Store) ListQuestions(includeArchived bool) ([]core.Question, error) + func (s *Store) ListRevisions(targetType, targetID string) ([]core.Revision, error) + func (s *Store) ListRuns(scheduleID string) ([]core.Run, error) + func (s *Store) ListScheduleSummaries() ([]core.ScheduleSummary, error) + func (s *Store) ListSchedules() ([]core.Schedule, error) + func (s *Store) ListSegments() ([]core.Segment, error) + func (s *Store) ListSubscriptions() ([]core.Subscription, error) + func (s *Store) ListSubscriptionsByDashboard(dashboardID string) ([]core.Subscription, error) + func (s *Store) ListUploadedTables() ([]core.UploadedTable, error) + func (s *Store) ListUsers() ([]core.User, error) + func (s *Store) Materialized() core.MaterializedTableStore + func (s *Store) MaterializedTableByTarget(databaseID, schema, name string) (core.MaterializedTable, error) + func (s *Store) MetricByID(id string) (core.Metric, error) + func (s *Store) Metrics() core.MetricStore + func (s *Store) MigrateSQLiteToProduction(ctx context.Context, targetConfig Config) (TransferReport, error) + func (s *Store) ModelByID(id string) (core.Model, error) + func (s *Store) Models() core.ModelStore + func (s *Store) Notifications() core.NotificationStore + func (s *Store) Ping(ctx context.Context) error + func (s *Store) PreviewUploadedTable(ctx context.Context, id string) (core.UploadedTablePreview, error) + func (s *Store) ProductionMigrationCompleted() (bool, string, error) + func (s *Store) PublicDashboardAccess(ctx context.Context, uuid string) (core.DashboardPublicAccess, error) + func (s *Store) PublicDashboardPageAvailable(ctx context.Context, uuid string, embed bool) (bool, error) + func (s *Store) QuestionByID(id string) (core.Question, error) + func (s *Store) Questions() core.QuestionStore + func (s *Store) ReleaseLease(ctx context.Context, name, owner string) error + func (s *Store) ReplaceCollectionShares(collectionID string, userIDs []string) error + func (s *Store) ReplaceMembers(groupID string, userIDs []string) error + func (s *Store) Revisions() core.RevisionStore + func (s *Store) Runs() core.RunStore + func (s *Store) Save(database core.Database) error + func (s *Store) SaveField(field core.FieldMeta) error + func (s *Store) SaveSnapshot(item core.SchemaSnapshot) error + func (s *Store) SaveTableAnnotation(databaseID, schema, table string, annotation core.TableAnnotation) error + func (s *Store) SaveUploadedTable(item core.UploadedTable, rows [][]string) error + func (s *Store) ScheduleByID(id string) (core.Schedule, error) + func (s *Store) Schedules() core.ScheduleStore + func (s *Store) SchemaVersion() int + func (s *Store) Search(query string) ([]core.SearchHit, error) + func (s *Store) SegmentByID(id string) (core.Segment, error) + func (s *Store) Segments() core.SegmentStore + func (s *Store) SessionByID(id string) (core.Session, error) + func (s *Store) Sessions() core.SessionStore + func (s *Store) Set(key, value string) error + func (s *Store) SetActive(id string, active bool) error + func (s *Store) SetDashboardArchived(id string, archivedAt *time.Time) error + func (s *Store) SetPassword(id, passwordHash string) error + func (s *Store) SetQuestionArchived(id string, archivedAt *time.Time) error + func (s *Store) SubscriptionByID(id string) (core.Subscription, error) + func (s *Store) Subscriptions() core.SubscriptionStore + func (s *Store) UpdateAlert(a core.Alert) error + func (s *Store) UpdateCollection(c core.Collection) error + func (s *Store) UpdateDashboard(d core.Dashboard) error + func (s *Store) UpdateModel(m core.Model) error + func (s *Store) UpdateQuestion(q core.Question) error + func (s *Store) UpdateRun(item core.Run) error + func (s *Store) UpdateSchedule(item core.Schedule) error + func (s *Store) UpdateSubscription(item core.Subscription) error + func (s *Store) UpdateUserProfile(id, name, email, locale, theme, avatarURL string) error + func (s *Store) UpsertGroup(group core.Group) error + func (s *Store) UpsertMaterializedTable(item core.MaterializedTable) error + func (s *Store) UserByFeishuOpenID(openID string) (core.User, error) + func (s *Store) Users() core.UserStore + type TransferReport struct + CompletedAt time.Time + RestartRequired bool + Rows int64 + RowsByTable map[string]int64 + SourceEngine Engine + Tables int + TargetEngine Engine