sqlite

package
v0.0.0-...-751b377 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	types.DB
}

func New

func New(ctx context.Context, dsn string, gormCfg *gorm.Config, autoMigrate bool) (*Index, error)

func (*Index) AutoMigrate

func (i *Index) AutoMigrate() error

func (*Index) Close

func (i *Index) Close() error

func (*Index) CreateDataset

func (i *Index) CreateDataset(ctx context.Context, dataset types.Dataset, opts *types.DatasetCreateOpts) error

func (*Index) DeleteDataset

func (i *Index) DeleteDataset(ctx context.Context, datasetID string) error

func (*Index) DeleteDocument

func (i *Index) DeleteDocument(ctx context.Context, documentID, datasetID string) error

func (*Index) DeleteFile

func (i *Index) DeleteFile(ctx context.Context, datasetID, fileID string) error

func (*Index) ExportDatasetsToFile

func (i *Index) ExportDatasetsToFile(ctx context.Context, path string, ids ...string) error

func (*Index) FindFile

func (i *Index) FindFile(ctx context.Context, searchFile types.File) (*types.File, error)

func (*Index) FindFileByMetadata

func (i *Index) FindFileByMetadata(ctx context.Context, dataset string, metadata types.FileMetadata, includeDocuments bool) (*types.File, error)

func (*Index) FindFilesByMetadata

func (i *Index) FindFilesByMetadata(ctx context.Context, dataset string, metadata types.FileMetadata, includeDocuments bool) ([]types.File, error)

func (*Index) GetDataset

func (i *Index) GetDataset(ctx context.Context, datasetID string, opts *types.DatasetGetOpts) (*types.Dataset, error)

func (*Index) GetDocumentByID

func (i *Index) GetDocumentByID(ctx context.Context, documentID string) (*types.Document, error)

func (*Index) ImportDatasetsFromFile

func (i *Index) ImportDatasetsFromFile(ctx context.Context, path string) error

func (*Index) ListDatasets

func (i *Index) ListDatasets(ctx context.Context) ([]types.Dataset, error)

func (*Index) PruneFiles

func (i *Index) PruneFiles(ctx context.Context, datasetID string, pathPrefix string, keep []string) ([]types.File, error)

func (*Index) UpdateDataset

func (i *Index) UpdateDataset(ctx context.Context, dataset types.Dataset) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL