pub struct FullTextIndex {
pub name: String,
pub table: String,
pub columns: Vec<String>,
pub language: SearchLanguage,
pub index_type: Option<String>,
}Expand description
Full-text index definition.
Fields§
§name: StringIndex name.
table: StringTable name.
columns: Vec<String>Columns in the index.
language: SearchLanguageLanguage/configuration.
index_type: Option<String>Index type (for MySQL: FULLTEXT).
Implementations§
Source§impl FullTextIndex
impl FullTextIndex
Sourcepub fn builder(name: impl Into<String>) -> FullTextIndexBuilder
pub fn builder(name: impl Into<String>) -> FullTextIndexBuilder
Create a new full-text index builder.
Sourcepub fn to_postgres_sql(&self) -> String
pub fn to_postgres_sql(&self) -> String
Generate PostgreSQL CREATE INDEX SQL.
Sourcepub fn to_mysql_sql(&self) -> String
pub fn to_mysql_sql(&self) -> String
Generate MySQL CREATE INDEX SQL.
Sourcepub fn to_sqlite_sql(&self) -> String
pub fn to_sqlite_sql(&self) -> String
Generate SQLite FTS5 virtual table SQL.
Sourcepub fn to_mssql_sql(&self, catalog_name: &str) -> Vec<String>
pub fn to_mssql_sql(&self, catalog_name: &str) -> Vec<String>
Generate MSSQL full-text catalog and index SQL.
Sourcepub fn to_sql(&self, db_type: DatabaseType) -> QueryResult<Vec<String>>
pub fn to_sql(&self, db_type: DatabaseType) -> QueryResult<Vec<String>>
Generate index SQL for the specified database type.
Sourcepub fn to_drop_sql(&self, db_type: DatabaseType) -> QueryResult<String>
pub fn to_drop_sql(&self, db_type: DatabaseType) -> QueryResult<String>
Generate DROP INDEX SQL.
Trait Implementations§
Source§impl Clone for FullTextIndex
impl Clone for FullTextIndex
Source§fn clone(&self) -> FullTextIndex
fn clone(&self) -> FullTextIndex
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 FullTextIndex
impl Debug for FullTextIndex
Source§impl<'de> Deserialize<'de> for FullTextIndex
impl<'de> Deserialize<'de> for FullTextIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FullTextIndex
impl PartialEq for FullTextIndex
Source§impl Serialize for FullTextIndex
impl Serialize for FullTextIndex
impl Eq for FullTextIndex
impl StructuralPartialEq for FullTextIndex
Auto Trait Implementations§
impl Freeze for FullTextIndex
impl RefUnwindSafe for FullTextIndex
impl Send for FullTextIndex
impl Sync for FullTextIndex
impl Unpin for FullTextIndex
impl UnwindSafe for FullTextIndex
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