Versions in this module Expand all Collapse all v0 v0.0.1 Mar 23, 2024 Changes in this version + const B + const DefaultBlockReaderLimit + const GiB + const KiB + const MiB + const TiB + var ErrNoSchema = fmt.Errorf("no schema") + var ErrTableClosing = fmt.Errorf("table closing") + func DefaultIndexConfig() []*index.LevelConfig + func LoadSnapshot(ctx context.Context, db *DB, tx uint64, r io.ReaderAt, size int64, dir string, ...) (uint64, error) + func NewTableConfig(schema proto.Message, options ...TableOption) *tablepb.TableConfig + func SnapshotDir(db *DB, tx uint64) string + func StoreSnapshot(ctx context.Context, tx uint64, db *DB, snapshot io.Reader) error + func WriteSnapshot(ctx context.Context, tx uint64, db *DB, w io.Writer) error + type CloseOption func(*closeOptions) + func WithClearStorage() CloseOption + type Closer interface + Close func(cleanup bool) error + type ColumnStore struct + func New(options ...Option) (*ColumnStore, error) + func (s *ColumnStore) Close() error + func (s *ColumnStore) DB(ctx context.Context, name string, opts ...DBOption) (*DB, error) + func (s *ColumnStore) DBs() []string + func (s *ColumnStore) DatabasesDir() string + func (s *ColumnStore) DropDB(name string) error + func (s *ColumnStore) GetDB(name string) (*DB, error) + type DB struct + func (db *DB) Close(options ...CloseOption) error + func (db *DB) GetTable(name string) (*Table, error) + func (db *DB) HighWatermark() uint64 + func (db *DB) Table(name string, config *tablepb.TableConfig) (*Table, error) + func (db *DB) TableNames() []string + func (db *DB) TableProvider() *DBTableProvider + func (db *DB) Wait(tx uint64) + type DBOption func(*DB) error + func WithCompactionAfterOpen(compact bool, tableNames []string) DBOption + type DBTableProvider struct + func NewDBTableProvider(db *DB) *DBTableProvider + func (p *DBTableProvider) GetTable(name string) (logicalplan.TableReader, error) + type DataSink interface + Delete func(ctx context.Context, name string) error + Upload func(ctx context.Context, name string, r io.Reader) error + type DataSinkSource interface + type DataSource interface + Prefixes func(ctx context.Context, prefix string) ([]string, error) + Scan func(ctx context.Context, prefix string, schema *dynparquet.Schema, ...) error + type DefaultObjstoreBucket struct + func NewDefaultBucket(b storage.Bucket, options ...DefaultObjstoreBucketOption) *DefaultObjstoreBucket + func NewDefaultObjstoreBucket(b objstore.Bucket, options ...DefaultObjstoreBucketOption) *DefaultObjstoreBucket + func (b *DefaultObjstoreBucket) Prefixes(ctx context.Context, prefix string) ([]string, error) + func (b *DefaultObjstoreBucket) ProcessFile(ctx context.Context, blockDir string, lastBlockTimestamp uint64, ...) error + func (b *DefaultObjstoreBucket) Scan(ctx context.Context, prefix string, _ *dynparquet.Schema, ...) error + func (b *DefaultObjstoreBucket) String() string + type DefaultObjstoreBucketOption func(*DefaultObjstoreBucket) + func StorageWithBlockReaderLimit(limit int) DefaultObjstoreBucketOption + func StorageWithLogger(logger log.Logger) DefaultObjstoreBucketOption + func StorageWithTracer(tracer trace.Tracer) DefaultObjstoreBucketOption + type ErrCreateSchemaWriter struct + func (e ErrCreateSchemaWriter) Error() string + type ErrReadRow struct + func (e ErrReadRow) Error() string + type ErrTableNotFound struct + TableName string + func (e ErrTableNotFound) Error() string + type ErrWriteRow struct + func (e ErrWriteRow) Error() string + type GenericTable struct + func NewGenericTable[T any](db *DB, name string, mem memory.Allocator, options ...TableOption) (*GenericTable[T], error) + func (t *GenericTable[T]) Release() + func (t *GenericTable[T]) Write(ctx context.Context, values ...T) (uint64, error) + type Option func(*ColumnStore) error + func WithActiveMemorySize(size int64) Option + func WithCompactionAfterRecovery(tableNames []string) Option + func WithIndexConfig(indexConfig []*index.LevelConfig) Option + func WithIndexDegree(indexDegree int) Option + func WithLogger(logger log.Logger) Option + func WithManualBlockRotation() Option + func WithReadOnlyStorage(ds DataSource) Option + func WithReadWriteStorage(ds DataSinkSource) Option + func WithRecoveryConcurrency(concurrency int) Option + func WithRegistry(reg prometheus.Registerer) Option + func WithSnapshotTriggerSize(size int64) Option + func WithSplitSize(size int) Option + func WithStoragePath(path string) Option + func WithTracer(tracer trace.Tracer) Option + func WithWAL() Option + func WithWriteOnlyStorage(ds DataSink) Option + type ParquetWriter interface + Flush func() error + WriteRows func([]parquet.Row) (int, error) + type Sync interface + Sync func() error + type Table struct + func (t *Table) ActiveBlock() *TableBlock + func (t *Table) ActiveWriteBlock() (*TableBlock, func(), error) + func (t *Table) EnsureCompaction() error + func (t *Table) IndexConfig() []*index.LevelConfig + func (t *Table) InsertRecord(ctx context.Context, record arrow.Record) (uint64, error) + func (t *Table) Iterator(ctx context.Context, tx uint64, pool memory.Allocator, ...) error + func (t *Table) RotateBlock(_ context.Context, block *TableBlock, skipPersist bool) error + func (t *Table) Schema() *dynparquet.Schema + func (t *Table) SchemaIterator(ctx context.Context, tx uint64, pool memory.Allocator, ...) error + func (t *Table) View(ctx context.Context, fn func(ctx context.Context, tx uint64) error) error + type TableBlock struct + func (t *TableBlock) EnsureCompaction() error + func (t *TableBlock) Index() *index.LSM + func (t *TableBlock) InsertRecord(_ context.Context, tx uint64, record arrow.Record) error + func (t *TableBlock) Persist() error + func (t *TableBlock) Serialize(writer io.Writer) error + func (t *TableBlock) Size() int64 + type TableOption func(*tablepb.TableConfig) error + func FromConfig(config *tablepb.TableConfig) TableOption + func WithBlockReaderLimit(n int) TableOption + func WithRowGroupSize(numRows int) TableOption + func WithUniquePrimaryIndex(unique bool) TableOption + func WithoutWAL() TableOption + type TxNode struct + type TxPool struct + func NewTxPool(watermark *atomic.Uint64) *TxPool + func (l *TxPool) Insert(tx uint64) + func (l *TxPool) Iterate(iterate func(txn uint64) bool) + func (l *TxPool) Stop() + type WAL interface + Close func() error + FirstIndex func() (uint64, error) + LastIndex func() (uint64, error) + Log func(tx uint64, record *walpb.Record) error + LogRecord func(tx uint64, table string, record arrow.Record) error + Replay func(tx uint64, handler wal.ReplayHandlerFunc) error + Reset func(nextTx uint64) error + Truncate func(tx uint64) error