pub struct IndexMetaBuilder { /* private fields */ }
Expand description
Builder for IndexMeta
Implementations§
Source§impl IndexMetaBuilder
impl IndexMetaBuilder
pub fn new(name: &str) -> Self
Sourcepub fn primary_key(self, pk_name: &str) -> Self
pub fn primary_key(self, pk_name: &str) -> Self
添加一个主键列的名字
Sourcepub fn primary_keys(
self,
pk_names: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn primary_keys( self, pk_names: impl IntoIterator<Item = impl Into<String>>, ) -> Self
设置索引中包含的主键列名字
Sourcepub fn defined_column(self, col_name: &str) -> Self
pub fn defined_column(self, col_name: &str) -> Self
添加一个预定义列的名字
Sourcepub fn defined_columns(
self,
col_names: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn defined_columns( self, col_names: impl IntoIterator<Item = impl Into<String>>, ) -> Self
设置预定义列的名字
pub fn index_update_mode(self, mode: IndexUpdateMode) -> Self
pub fn index_type(self, idx_type: IndexType) -> Self
pub fn index_sync_phase(self, phase: IndexSyncPhase) -> Self
pub fn build(self) -> IndexMeta
Trait Implementations§
Source§impl Clone for IndexMetaBuilder
impl Clone for IndexMetaBuilder
Source§fn clone(&self) -> IndexMetaBuilder
fn clone(&self) -> IndexMetaBuilder
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 IndexMetaBuilder
impl Debug for IndexMetaBuilder
Source§impl Default for IndexMetaBuilder
impl Default for IndexMetaBuilder
Source§fn default() -> IndexMetaBuilder
fn default() -> IndexMetaBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IndexMetaBuilder
impl RefUnwindSafe for IndexMetaBuilder
impl Send for IndexMetaBuilder
impl Sync for IndexMetaBuilder
impl Unpin for IndexMetaBuilder
impl UnwindSafe for IndexMetaBuilder
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