Skip to main content

VectorTable

Struct VectorTable 

Source
pub struct VectorTable<'vtab> { /* private fields */ }
Expand description

The virtual table implementation for vector search.

db is a raw pointer to the VTabConnection that SQLite provides to connect/create. SQLite guarantees the connection outlives the virtual table, so this pointer is valid for the entire lifetime of VectorTable.

Trait Implementations§

Source§

impl<'vtab> CreateVTab<'vtab> for VectorTable<'vtab>

Source§

const SHADOW_NAMES: &'static [&'static str]

List of shadow table names. Read more
Source§

fn create( db: &'vtab VTabConnection, aux: &'vtab Self::Aux, args: &[&str], ) -> Result<(String, Self)>

Corresponds to xCreate. Read more
Source§

fn destroy(self) -> DisconnectResult<Self>

Corresponds to xDestroy, when DROP TABLE is run on the virtual table. The virtual table implementation should destroy any underlying state that was created by Self::create.
Source§

impl<'vtab> FindFunctionVTab<'vtab> for VectorTable<'vtab>

Source§

fn functions(&'vtab self) -> &'vtab VTabFunctionList<'vtab, Self>

Retrieve a reference to the VTabFunctionList associated with this virtual table.
Source§

impl<'vtab> TransactionVTab<'vtab> for VectorTable<'vtab>

Source§

type Transaction = VectorTransaction

Source§

fn begin(&'vtab self) -> Result<Self::Transaction>

Begin a transaction.
Source§

impl<'vtab> UpdateVTab<'vtab> for VectorTable<'vtab>

Source§

fn update(&'vtab self, info: &mut ChangeInfo) -> Result<i64>

Modify a single row in the virtual table. The info parameter may be used to determine the type of change being performed by this update. Read more
Source§

impl<'vtab> VTab<'vtab> for VectorTable<'vtab>

Source§

type Aux = ()

Additional data associated with the virtual table module. Read more
Source§

type Cursor = VectorCursor

Cursor implementation for this virtual table.
Source§

fn connect( db: &'vtab VTabConnection, _aux: &'vtab Self::Aux, args: &[&str], ) -> Result<(String, Self)>

Corresponds to xConnect. Read more
Source§

fn best_index(&'vtab self, info: &mut IndexInfo) -> Result<()>

Corrresponds to xBestIndex. Read more
Source§

fn open(&'vtab self) -> Result<Self::Cursor>

Create an uninitialized query.
Source§

fn disconnect(self) -> Result<(), (Self, Error)>

Corresponds to xDisconnect. This method is called when the database connection is being closed. The implementation should not remove the underlying data, but it should release any resources associated with the virtual table implementation. This method is the inverse of Self::connect. Read more
Source§

impl Send for VectorTable<'_>

Source§

impl Sync for VectorTable<'_>

Auto Trait Implementations§

§

impl<'vtab> !Freeze for VectorTable<'vtab>

§

impl<'vtab> !RefUnwindSafe for VectorTable<'vtab>

§

impl<'vtab> Unpin for VectorTable<'vtab>

§

impl<'vtab> UnsafeUnpin for VectorTable<'vtab>

§

impl<'vtab> !UnwindSafe for VectorTable<'vtab>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.