pub struct VectorInsertQuery {
pub table: String,
pub columns: Vec<String>,
pub vector_column: String,
pub upsert: bool,
pub conflict_columns: Vec<String>,
pub update_columns: Vec<String>,
pub returning: Option<String>,
}Expand description
Configuration for a vector insert/upsert operation.
Fields§
§table: StringTable to insert into.
columns: Vec<String>Columns to insert (in order).
vector_column: StringName of the vector column.
upsert: boolWhether to upsert (ON CONFLICT DO UPDATE).
conflict_columns: Vec<String>Conflict column(s) for upsert.
update_columns: Vec<String>Columns to update on conflict (empty = all non-conflict columns).
returning: Option<String>Whether to return inserted IDs.
Implementations§
Source§impl VectorInsertQuery
impl VectorInsertQuery
Sourcepub fn with_columns(self, columns: Vec<String>) -> Self
pub fn with_columns(self, columns: Vec<String>) -> Self
Set the columns to insert.
Sourcepub fn with_vector_column(self, column: impl Into<String>) -> Self
pub fn with_vector_column(self, column: impl Into<String>) -> Self
Set the vector column name.
Sourcepub fn with_upsert(self, conflict_columns: Vec<String>) -> Self
pub fn with_upsert(self, conflict_columns: Vec<String>) -> Self
Enable upsert mode.
Sourcepub fn with_update_columns(self, columns: Vec<String>) -> Self
pub fn with_update_columns(self, columns: Vec<String>) -> Self
Set columns to update on conflict.
Sourcepub fn with_returning(self, column: impl Into<String>) -> Self
pub fn with_returning(self, column: impl Into<String>) -> Self
Set the RETURNING clause.
Trait Implementations§
Source§impl Clone for VectorInsertQuery
impl Clone for VectorInsertQuery
Source§fn clone(&self) -> VectorInsertQuery
fn clone(&self) -> VectorInsertQuery
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VectorInsertQuery
impl Debug for VectorInsertQuery
Auto Trait Implementations§
impl Freeze for VectorInsertQuery
impl RefUnwindSafe for VectorInsertQuery
impl Send for VectorInsertQuery
impl Sync for VectorInsertQuery
impl Unpin for VectorInsertQuery
impl UnsafeUnpin for VectorInsertQuery
impl UnwindSafe for VectorInsertQuery
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