Documentation
¶
Index ¶
- type Store
- func (s *Store) Backup(ctx context.Context, destPath string) error
- func (s *Store) BackupOnline(ctx context.Context, destPath string, pagesBatchSize int) error
- func (s *Store) Checkpoint(ctx context.Context) error
- func (s *Store) Close() error
- func (s *Store) CountRecords(ctx context.Context) (int64, error)
- func (s *Store) CreateRecord(ctx context.Context, r *pb.CollectionRecord) error
- func (s *Store) DeleteRecord(ctx context.Context, id string) error
- func (s *Store) ExecuteRaw(q string, args ...interface{}) error
- func (s *Store) GetRecord(ctx context.Context, id string) (*pb.CollectionRecord, error)
- func (s *Store) ListRecords(ctx context.Context, offset, limit int) ([]*pb.CollectionRecord, error)
- func (s *Store) Path() string
- func (s *Store) ReIndex(ctx context.Context) error
- func (s *Store) Search(ctx context.Context, q *collection.SearchQuery) ([]*collection.SearchResult, error)
- func (s *Store) SetJSONConverter(conv collection.ProtoToJSONConverter)
- func (s *Store) UpdateRecord(ctx context.Context, r *pb.CollectionRecord) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Backup ¶
Backup creates an online backup of the database to the specified path. This method is WAL-friendly and allows concurrent reads/writes during backup. It uses SQLite's online backup mechanism through a dedicated connection.
func (*Store) BackupOnline ¶
BackupOnline creates an online backup using incremental page copying. This minimizes lock time by copying pages in small batches. Best for very large databases where VACUUM INTO might take too long.
func (*Store) CreateRecord ¶
func (*Store) ExecuteRaw ¶
func (*Store) ListRecords ¶
func (*Store) Search ¶
func (s *Store) Search(ctx context.Context, q *collection.SearchQuery) ([]*collection.SearchResult, error)
func (*Store) SetJSONConverter ¶
func (s *Store) SetJSONConverter(conv collection.ProtoToJSONConverter)
SetJSONConverter sets the function used to convert binary proto_data to JSON for the jsontext column. This must be called before CreateRecord/UpdateRecord if EnableJSON is true and proto_data contains binary protobuf.