Main database interface managing collections
Usage
vectrixdb(path = NULL, storage_type = "memory")
Arguments
- path
Storage path
- storage_type
Storage type
Public fields
path
Database storage path
Methods
Method new()
Create or open a VectrixDB database
Usage
VectrixDB$new(path = NULL, storage_type = "memory")
Arguments
path
Storage path
storage_type
Storage type ("memory" or "sqlite")
Method create_collection()
Create a new collection
Usage
VectrixDB$create_collection(
name,
dimension,
metric = "cosine",
enable_text_index = TRUE
)
Arguments
name
Collection name
dimension
Vector dimension
metric
Distance metric
enable_text_index
Enable text indexing
Returns
Collection object
Method get_collection()
Get an existing collection
Usage
VectrixDB$get_collection(name)
Returns
Collection object
Method list_collections()
List all collections
Usage
VectrixDB$list_collections()
Returns
Character vector of collection names
Method delete_collection()
Delete a collection
Usage
VectrixDB$delete_collection(name)
Method has_collection()
Check if collection exists
Usage
VectrixDB$has_collection(name)
Method stats()
Get database statistics
Method clone()
The objects of this class are cloneable with this method.
Usage
VectrixDB$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.