Versions in this module Expand all Collapse all v1 v1.0.0 Aug 6, 2026 Changes in this version + var ErrConflict = errors.New("document already exists") + var ErrInvalidIndex = errors.New("field is not indexed") + var ErrInvalidRequest = errors.New("invalid document request") + var ErrNotFound = errors.New("document not found") + type Document struct + Collection string + CreatedAt time.Time + ExpiresAt *time.Time + ID string + UpdatedAt time.Time + Value []byte + Version int64 + type IndexConfig struct + Fields []string + SearchFields []string + type QueryOptions struct + Cursor string + Limit int + Search string + Where *WhereFilter + type QueryResult struct + Documents []Document + HasMore bool + NextCursor string + type Store interface + ConfigureIndexes func(ctx context.Context, db int, collection string, cfg IndexConfig) (IndexConfig, error) + DeleteDoc func(ctx context.Context, db int, collection, id string) (bool, error) + GetDoc func(ctx context.Context, db int, collection, id string) (Document, error) + GetIndexConfig func(ctx context.Context, db int, collection string) (IndexConfig, error) + MigrateDocs func(ctx context.Context) error + PutDoc func(ctx context.Context, db int, collection, id string, value []byte, ...) (Document, bool, error) + QueryDocs func(ctx context.Context, db int, collection string, opts QueryOptions) (QueryResult, error) + type WhereFilter struct + Field string + Op string + Value string + type WriteOptions struct + IndexedFields []string + SearchFields []string + TTL time.Duration