Documentation
¶
Index ¶
- Variables
- type BackupConfig
- type BackupManager
- func (b *BackupManager) Backup(ctx context.Context, config BackupConfig) (*BackupResult, error)
- func (b *BackupManager) DeleteBackup(ctx context.Context, path string) error
- func (b *BackupManager) ListBackups(ctx context.Context) ([]string, error)
- func (b *BackupManager) Restore(ctx context.Context, backupPath string) (*RestoreResult, error)
- type BackupResult
- type CacheEntry
- type CatalogManager
- func (m *CatalogManager) CreateNamespace(ctx context.Context, namespace string) error
- func (m *CatalogManager) DropNamespace(ctx context.Context, namespace string) error
- func (m *CatalogManager) ListNamespaces(ctx context.Context) ([]string, error)
- func (m *CatalogManager) Underlying() catalog.Catalog
- type DataService
- func (s *DataService) Delete(ctx context.Context, namespace, table string, filter map[string]interface{}) error
- func (s *DataService) Ingest(ctx context.Context, namespace, table string, schema *catalog.Schema, ...) error
- func (s *DataService) Query(ctx context.Context, namespace, table, sql string, where, orderBy string, ...) (*query.Result, error)
- func (s *DataService) RefreshAllViews(ctx context.Context) error
- func (s *DataService) RefreshView(ctx context.Context, namespace, table string) error
- func (s *DataService) Update(ctx context.Context, namespace, table string, data []map[string]interface{}, ...) error
- type ExpireConfig
- type ExpireResult
- type Lakehouse
- func (l *Lakehouse) Catalog() *CatalogManager
- func (l *Lakehouse) Close() error
- func (l *Lakehouse) Data() *DataService
- func (l *Lakehouse) IsEncrypted() bool
- func (l *Lakehouse) Lifecycle() *lifecycle.Handler
- func (l *Lakehouse) Ping(ctx context.Context) error
- func (l *Lakehouse) Schema() *SchemaManager
- func (l *Lakehouse) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (l *Lakehouse) Snapshot() *SnapshotManager
- func (l *Lakehouse) Storage() *StorageManager
- func (l *Lakehouse) Table() *TableManager
- func (l *Lakehouse) Transaction() *TransactionManager
- func (l *Lakehouse) Warehouse() *warehouse.Warehouse
- type Option
- func WithCatalog(cat catalog.Catalog) Option
- func WithDataCatalog(dc catalog.DataCatalog) Option
- func WithDir(dir string) Option
- func WithEncryption(masterKey string) Option
- func WithLogger(logger *slog.Logger) Option
- func WithPrefix(prefix string) Option
- func WithQueryEngine(q query.QueryEngine) Option
- func WithRouter(r *http.ServeMux) Option
- func WithStorage(st storage.Storage) Option
- func WithWarehouse(wh *warehouse.Warehouse) Option
- type QueryCache
- type RestoreResult
- type SchemaManager
- func (m *SchemaManager) AddColumn(ctx context.Context, namespace, name string, field catalog.Field) error
- func (m *SchemaManager) AddColumns(ctx context.Context, namespace, name string, fields []catalog.Field) error
- func (m *SchemaManager) DropColumn(ctx context.Context, namespace, name, column string) error
- func (m *SchemaManager) FieldExists(ctx context.Context, namespace, name, field string) bool
- func (m *SchemaManager) Get(ctx context.Context, namespace, name string) (*catalog.Schema, error)
- func (m *SchemaManager) GetField(ctx context.Context, namespace, name, field string) (*catalog.Field, error)
- func (m *SchemaManager) ListFields(ctx context.Context, namespace, name string) ([]catalog.Field, error)
- func (m *SchemaManager) RenameColumn(ctx context.Context, namespace, name, oldName, newName string) error
- type SnapshotManager
- func (m *SnapshotManager) Count(ctx context.Context, namespace, name string) (int, error)
- func (m *SnapshotManager) Expire(ctx context.Context, namespace, name string, config ExpireConfig) (*ExpireResult, error)
- func (m *SnapshotManager) GetByVersion(ctx context.Context, namespace, name string, version int64) (*catalog.Snapshot, error)
- func (m *SnapshotManager) GetLatest(ctx context.Context, namespace, name string) (*catalog.Snapshot, error)
- func (m *SnapshotManager) List(ctx context.Context, namespace, name string) ([]catalog.Snapshot, error)
- type StorageManager
- func (m *StorageManager) Delete(ctx context.Context, path string) error
- func (m *StorageManager) List(ctx context.Context, prefix string) ([]storage.Entry, error)
- func (m *StorageManager) Read(ctx context.Context, path string) ([]byte, error)
- func (m *StorageManager) Stat(ctx context.Context, path string) (*storage.Entry, error)
- func (m *StorageManager) Write(ctx context.Context, path string, data []byte) error
- type TableManager
- func (m *TableManager) Commit(ctx context.Context, namespace, name string, updates []catalog.Update) error
- func (m *TableManager) Create(ctx context.Context, namespace, name string, schema *catalog.Schema) (*catalog.Table, error)
- func (m *TableManager) Drop(ctx context.Context, namespace, name string) error
- func (m *TableManager) Exists(ctx context.Context, namespace, name string) bool
- func (m *TableManager) GetDataFiles(ctx context.Context, namespace, name string) ([]catalog.DataFile, error)
- func (m *TableManager) GetDataFilesAtVersion(ctx context.Context, namespace, name string, version int64) ([]catalog.DataFile, error)
- func (m *TableManager) GetSchema(ctx context.Context, namespace, name string) (*catalog.Schema, error)
- func (m *TableManager) List(ctx context.Context, namespace string) ([]string, error)
- func (m *TableManager) Load(ctx context.Context, namespace, name string) (*catalog.Table, error)
- func (m *TableManager) LoadAtVersion(ctx context.Context, namespace, name string, version int64) (*catalog.Table, error)
- func (m *TableManager) WriteData(ctx context.Context, namespace, name string, sql string) (*catalog.DataFile, error)
- type TransactionManager
- type Tx
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFieldNotFound = fmt.Errorf("field not found")
View Source
var ErrSnapshotNotFound = fmt.Errorf("snapshot not found")
Functions ¶
This section is empty.
Types ¶
type BackupConfig ¶
type BackupManager ¶
type BackupManager struct {
// contains filtered or unexported fields
}
func NewBackupManager ¶
func NewBackupManager(dir string, logger *slog.Logger) *BackupManager
func (*BackupManager) Backup ¶
func (b *BackupManager) Backup(ctx context.Context, config BackupConfig) (*BackupResult, error)
func (*BackupManager) DeleteBackup ¶
func (b *BackupManager) DeleteBackup(ctx context.Context, path string) error
func (*BackupManager) ListBackups ¶
func (b *BackupManager) ListBackups(ctx context.Context) ([]string, error)
func (*BackupManager) Restore ¶
func (b *BackupManager) Restore(ctx context.Context, backupPath string) (*RestoreResult, error)
type BackupResult ¶
type CacheEntry ¶
type CatalogManager ¶
type CatalogManager struct {
// contains filtered or unexported fields
}
func NewCatalogManager ¶
func NewCatalogManager(cat catalog.Catalog, logger *slog.Logger) *CatalogManager
func (*CatalogManager) CreateNamespace ¶
func (m *CatalogManager) CreateNamespace(ctx context.Context, namespace string) error
func (*CatalogManager) DropNamespace ¶
func (m *CatalogManager) DropNamespace(ctx context.Context, namespace string) error
func (*CatalogManager) ListNamespaces ¶
func (m *CatalogManager) ListNamespaces(ctx context.Context) ([]string, error)
func (*CatalogManager) Underlying ¶
func (m *CatalogManager) Underlying() catalog.Catalog
type DataService ¶
type DataService struct {
// contains filtered or unexported fields
}
func NewDataService ¶
func NewDataService(ic catalog.DataCatalog, q query.QueryEngine) *DataService
func (*DataService) Delete ¶
func (s *DataService) Delete(ctx context.Context, namespace, table string, filter map[string]interface{}) error
Delete removes rows matching the filter
func (*DataService) Ingest ¶
func (s *DataService) Ingest(ctx context.Context, namespace, table string, schema *catalog.Schema, data []map[string]interface{}) error
Ingest inserts data into an Iceberg table via iceberg-go Append
func (*DataService) Query ¶
func (s *DataService) Query(ctx context.Context, namespace, table, sql string, where, orderBy string, columns []string, limit, offset int) (*query.Result, error)
Query executes SQL via DuckDB iceberg_scan
func (*DataService) RefreshAllViews ¶
func (s *DataService) RefreshAllViews(ctx context.Context) error
RefreshAllViews creates DuckDB views for all existing tables in the catalog.
func (*DataService) RefreshView ¶
func (s *DataService) RefreshView(ctx context.Context, namespace, table string) error
RefreshView creates/updates DuckDB view for SQL compatibility
type ExpireConfig ¶
type ExpireResult ¶
type Lakehouse ¶
type Lakehouse struct {
// contains filtered or unexported fields
}
func (*Lakehouse) Catalog ¶
func (l *Lakehouse) Catalog() *CatalogManager
func (*Lakehouse) Data ¶
func (l *Lakehouse) Data() *DataService
func (*Lakehouse) IsEncrypted ¶
func (*Lakehouse) Schema ¶
func (l *Lakehouse) Schema() *SchemaManager
func (*Lakehouse) Snapshot ¶
func (l *Lakehouse) Snapshot() *SnapshotManager
func (*Lakehouse) Storage ¶
func (l *Lakehouse) Storage() *StorageManager
func (*Lakehouse) Table ¶
func (l *Lakehouse) Table() *TableManager
func (*Lakehouse) Transaction ¶
func (l *Lakehouse) Transaction() *TransactionManager
type Option ¶
type Option func(*Lakehouse)
func WithCatalog ¶
func WithDataCatalog ¶
func WithDataCatalog(dc catalog.DataCatalog) Option
func WithEncryption ¶
func WithLogger ¶
func WithPrefix ¶
func WithQueryEngine ¶
func WithQueryEngine(q query.QueryEngine) Option
func WithRouter ¶
func WithStorage ¶
func WithWarehouse ¶
type QueryCache ¶
type QueryCache struct {
// contains filtered or unexported fields
}
func NewQueryCache ¶
func NewQueryCache(maxSize int64, logger *slog.Logger) *QueryCache
func (*QueryCache) Count ¶
func (c *QueryCache) Count() int
func (*QueryCache) Invalidate ¶
func (c *QueryCache) Invalidate(sql string)
func (*QueryCache) InvalidateAll ¶
func (c *QueryCache) InvalidateAll()
func (*QueryCache) Size ¶
func (c *QueryCache) Size() int64
type SchemaManager ¶
type SchemaManager struct {
// contains filtered or unexported fields
}
func NewSchemaManager ¶
func NewSchemaManager(cat catalog.Catalog, logger *slog.Logger) *SchemaManager
func (*SchemaManager) AddColumns ¶
func (*SchemaManager) DropColumn ¶
func (m *SchemaManager) DropColumn(ctx context.Context, namespace, name, column string) error
func (*SchemaManager) FieldExists ¶
func (m *SchemaManager) FieldExists(ctx context.Context, namespace, name, field string) bool
func (*SchemaManager) ListFields ¶
func (*SchemaManager) RenameColumn ¶
func (m *SchemaManager) RenameColumn(ctx context.Context, namespace, name, oldName, newName string) error
type SnapshotManager ¶
type SnapshotManager struct {
// contains filtered or unexported fields
}
func NewSnapshotManager ¶
func NewSnapshotManager(cat catalog.Catalog, logger *slog.Logger) *SnapshotManager
func (*SnapshotManager) Expire ¶
func (m *SnapshotManager) Expire(ctx context.Context, namespace, name string, config ExpireConfig) (*ExpireResult, error)
func (*SnapshotManager) GetByVersion ¶
type StorageManager ¶
type StorageManager struct {
// contains filtered or unexported fields
}
func NewStorageManager ¶
func NewStorageManager(st storage.Storage, logger *slog.Logger) *StorageManager
func (*StorageManager) Delete ¶
func (m *StorageManager) Delete(ctx context.Context, path string) error
type TableManager ¶
type TableManager struct {
// contains filtered or unexported fields
}
func NewTableManager ¶
func (*TableManager) Drop ¶
func (m *TableManager) Drop(ctx context.Context, namespace, name string) error
func (*TableManager) Exists ¶
func (m *TableManager) Exists(ctx context.Context, namespace, name string) bool
func (*TableManager) GetDataFiles ¶
func (*TableManager) GetDataFilesAtVersion ¶
func (*TableManager) LoadAtVersion ¶
type TransactionManager ¶
type TransactionManager struct {
// contains filtered or unexported fields
}
func NewTransactionManager ¶
func NewTransactionManager(cat catalog.Catalog, logger *slog.Logger) *TransactionManager
func (*TransactionManager) Begin ¶
func (m *TransactionManager) Begin() *Tx
func (*TransactionManager) CommitTables ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.