pub struct VectorXLite { /* private fields */ }Implementations§
Source§impl VectorXLite
impl VectorXLite
pub fn new( connection_pool: Pool<SqliteConnectionManager>, ) -> Result<VectorXLite, VecXError>
Source§impl VectorXLite
impl VectorXLite
pub fn create_collection( &self, collection_config: CollectionConfig, ) -> Result<(), VecXError>
pub fn insert(&self, create_point: InsertPoint) -> Result<(), VecXError>
pub fn search( &self, search_point: SearchPoint, ) -> Result<Vec<HashMap<String, String>>, VecXError>
Sourcepub fn collection_exists(
&self,
collection_name: &str,
) -> Result<bool, VecXError>
pub fn collection_exists( &self, collection_name: &str, ) -> Result<bool, VecXError>
Checks whether a collection with the given name exists.
This method verifies if a collection exists by checking for the presence of the associated tables in the database (payload table and/or virtual vector table).
§Arguments
collection_name- The name of the collection to check
§Returns
Ok(true)- If the collection exists (at least one associated table is found)Ok(false)- If the collection does not existErr(VecXError)- If there’s an error querying the database
§Examples
// Check if a collection exists before creating it
if !vlite.collection_exists("my_collection")? {
// Create the collection if it doesn't exist
let config = CollectionConfig::builder()
.collection_name("my_collection")
.vector_dimension(128)
.build()?;
vlite.create_collection(config)?;
}pub fn delete(&self, delete_point: DeletePoint) -> Result<(), VecXError>
pub fn delete_collection( &self, delete_collection: DeleteCollection, ) -> Result<(), VecXError>
Auto Trait Implementations§
impl Freeze for VectorXLite
impl !RefUnwindSafe for VectorXLite
impl Send for VectorXLite
impl Sync for VectorXLite
impl Unpin for VectorXLite
impl !UnwindSafe for VectorXLite
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more