sea_query::backend

Struct SqliteQueryBuilder

source
pub struct SqliteQueryBuilder;
Available on crate feature backend-sqlite only.
Expand description

Sqlite query builder.

Trait Implementationsยง

sourceยง

impl Debug for SqliteQueryBuilder

sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
sourceยง

impl Default for SqliteQueryBuilder

sourceยง

fn default() -> SqliteQueryBuilder

Returns the โ€œdefault valueโ€ for a type. Read more
sourceยง

impl EscapeBuilder for SqliteQueryBuilder

sourceยง

fn escape_string(&self, string: &str) -> String

Escape a SQL string literal
sourceยง

fn unescape_string(&self, string: &str) -> String

Unescape a SQL string literal
sourceยง

impl ForeignKeyBuilder for SqliteQueryBuilder

sourceยง

fn prepare_table_ref_fk_stmt( &self, table_ref: &TableRef, sql: &mut dyn SqlWriter, )

Translate TableRef into SQL statement.
sourceยง

fn prepare_foreign_key_create_statement( &self, create: &ForeignKeyCreateStatement, sql: &mut dyn SqlWriter, )

Translate ForeignKeyCreateStatement into SQL statement.
sourceยง

fn prepare_foreign_key_drop_statement( &self, drop: &ForeignKeyDropStatement, sql: &mut dyn SqlWriter, )

Translate ForeignKeyDropStatement into SQL statement.
sourceยง

fn prepare_foreign_key_action( &self, foreign_key_action: &ForeignKeyAction, sql: &mut dyn SqlWriter, )

Translate ForeignKeyAction into SQL statement.
sourceยง

impl IndexBuilder for SqliteQueryBuilder

sourceยง

fn prepare_index_create_statement( &self, create: &IndexCreateStatement, sql: &mut dyn SqlWriter, )

Translate IndexCreateStatement into SQL statement.
sourceยง

fn prepare_table_ref_index_stmt( &self, table_ref: &TableRef, sql: &mut dyn SqlWriter, )

Translate TableRef into SQL statement.
sourceยง

fn prepare_index_drop_statement( &self, drop: &IndexDropStatement, sql: &mut dyn SqlWriter, )

Translate IndexDropStatement into SQL statement.
sourceยง

fn prepare_table_index_expression( &self, create: &IndexCreateStatement, sql: &mut dyn SqlWriter, )

Translate IndexCreateStatement into SQL expression. This is the default implementation for PostgresQueryBuilder and SqliteQueryBuilder. MysqlQueryBuilder overrides this default implementation.
sourceยง

impl OperLeftAssocDecider for SqliteQueryBuilder

sourceยง

impl PrecedenceDecider for SqliteQueryBuilder

sourceยง

impl QueryBuilder for SqliteQueryBuilder

sourceยง

fn prepare_select_lock( &self, _select_lock: &LockClause, _sql: &mut dyn SqlWriter, )

Translate LockType into SQL statement.
sourceยง

fn prepare_sub_query_oper(&self, oper: &SubQueryOper, sql: &mut dyn SqlWriter)

Translate SubQueryOper into SQL statement.
sourceยง

fn prepare_bin_oper(&self, bin_oper: &BinOper, sql: &mut dyn SqlWriter)

Translate BinOper into SQL statement.
sourceยง

fn prepare_union_statement( &self, union_type: UnionType, select_statement: &SelectStatement, sql: &mut dyn SqlWriter, )

sourceยง

fn prepare_query_statement( &self, query: &SubQueryStatement, sql: &mut dyn SqlWriter, )

Translate QueryStatement into SQL statement.
sourceยง

fn prepare_with_clause_recursive_options( &self, _: &WithClause, _: &mut dyn SqlWriter, )

sourceยง

fn prepare_order_expr(&self, order_expr: &OrderExpr, sql: &mut dyn SqlWriter)

Translate OrderExpr into SQL statement.
sourceยง

fn prepare_value(&self, value: &Value, sql: &mut dyn SqlWriter)

Write Value into SQL statement as parameter.
sourceยง

fn insert_default_values(&self, _: u32, sql: &mut dyn SqlWriter)

Write insert default rows expression.
sourceยง

fn placeholder(&self) -> (&str, bool)

The type of placeholder the builder uses for values, and whether it is numbered.
sourceยง

fn values_list_tuple_prefix(&self) -> &str

Prefix for tuples in VALUES list (e.g. ROW for Mysql)
sourceยง

fn prepare_insert_statement( &self, insert: &InsertStatement, sql: &mut dyn SqlWriter, )

Translate InsertStatement into SQL statement.
sourceยง

fn prepare_select_statement( &self, select: &SelectStatement, sql: &mut dyn SqlWriter, )

Translate SelectStatement into SQL statement.
sourceยง

fn prepare_select_limit_offset( &self, select: &SelectStatement, sql: &mut dyn SqlWriter, )

sourceยง

fn prepare_update_statement( &self, update: &UpdateStatement, sql: &mut dyn SqlWriter, )

Translate UpdateStatement into SQL statement.
sourceยง

fn prepare_update_order_by( &self, update: &UpdateStatement, sql: &mut dyn SqlWriter, )

Translate ORDER BY expression in UpdateStatement.
sourceยง

fn prepare_update_limit( &self, update: &UpdateStatement, sql: &mut dyn SqlWriter, )

Translate LIMIT expression in UpdateStatement.
sourceยง

fn prepare_delete_statement( &self, delete: &DeleteStatement, sql: &mut dyn SqlWriter, )

Translate DeleteStatement into SQL statement.
sourceยง

fn prepare_delete_order_by( &self, delete: &DeleteStatement, sql: &mut dyn SqlWriter, )

Translate ORDER BY expression in DeleteStatement.
sourceยง

fn prepare_delete_limit( &self, delete: &DeleteStatement, sql: &mut dyn SqlWriter, )

Translate LIMIT expression in DeleteStatement.
sourceยง

fn prepare_simple_expr(&self, simple_expr: &SimpleExpr, sql: &mut dyn SqlWriter)

Translate SimpleExpr into SQL statement.
sourceยง

fn prepare_simple_expr_common( &self, simple_expr: &SimpleExpr, sql: &mut dyn SqlWriter, )

sourceยง

fn prepare_case_statement(&self, stmts: &CaseStatement, sql: &mut dyn SqlWriter)

Translate CaseStatement into SQL statement.
sourceยง

fn prepare_select_distinct( &self, select_distinct: &SelectDistinct, sql: &mut dyn SqlWriter, )

Translate SelectDistinct into SQL statement.
sourceยง

fn prepare_index_hints( &self, _select: &SelectStatement, _sql: &mut dyn SqlWriter, )

Translate [IndexHint] into SQL statement.
sourceยง

fn prepare_select_expr(&self, select_expr: &SelectExpr, sql: &mut dyn SqlWriter)

Translate SelectExpr into SQL statement.
sourceยง

fn prepare_join_expr(&self, join_expr: &JoinExpr, sql: &mut dyn SqlWriter)

Translate JoinExpr into SQL statement.
sourceยง

fn prepare_join_table_ref(&self, join_expr: &JoinExpr, sql: &mut dyn SqlWriter)

sourceยง

fn prepare_table_ref(&self, table_ref: &TableRef, sql: &mut dyn SqlWriter)

Translate TableRef into SQL statement.
sourceยง

fn prepare_column_ref(&self, column_ref: &ColumnRef, sql: &mut dyn SqlWriter)

sourceยง

fn prepare_un_oper(&self, un_oper: &UnOper, sql: &mut dyn SqlWriter)

Translate UnOper into SQL statement.
sourceยง

fn prepare_bin_oper_common(&self, bin_oper: &BinOper, sql: &mut dyn SqlWriter)

sourceยง

fn prepare_logical_chain_oper( &self, log_chain_oper: &LogicalChainOper, i: usize, length: usize, sql: &mut dyn SqlWriter, )

Translate LogicalChainOper into SQL statement.
sourceยง

fn prepare_function_name_common( &self, function: &Function, sql: &mut dyn SqlWriter, )

Translate Function into SQL statement.
sourceยง

fn prepare_function_arguments( &self, func: &FunctionCall, sql: &mut dyn SqlWriter, )

sourceยง

fn prepare_with_query(&self, query: &WithQuery, sql: &mut dyn SqlWriter)

sourceยง

fn prepare_with_clause(&self, with_clause: &WithClause, sql: &mut dyn SqlWriter)

sourceยง

fn prepare_with_clause_common_tables( &self, with_clause: &WithClause, sql: &mut dyn SqlWriter, )

sourceยง

fn prepare_with_query_clause_common_table( &self, cte: &CommonTableExpression, sql: &mut dyn SqlWriter, )

sourceยง

fn prepare_with_query_clause_materialization( &self, cte: &CommonTableExpression, sql: &mut dyn SqlWriter, )

sourceยง

fn prepare_with_clause_start( &self, with_clause: &WithClause, sql: &mut dyn SqlWriter, )

sourceยง

fn prepare_insert(&self, replace: bool, sql: &mut dyn SqlWriter)

sourceยง

fn prepare_function_name(&self, function: &Function, sql: &mut dyn SqlWriter)

sourceยง

fn prepare_join_type(&self, join_type: &JoinType, sql: &mut dyn SqlWriter)

Translate JoinType into SQL statement.
sourceยง

fn prepare_join_type_common( &self, join_type: &JoinType, sql: &mut dyn SqlWriter, )

sourceยง

fn prepare_join_on(&self, join_on: &JoinOn, sql: &mut dyn SqlWriter)

Translate JoinOn into SQL statement.
sourceยง

fn prepare_order(&self, order_expr: &OrderExpr, sql: &mut dyn SqlWriter)

Translate Order into SQL statement.
sourceยง

fn prepare_field_order( &self, order_expr: &OrderExpr, values: &Values, sql: &mut dyn SqlWriter, )

Translate Order::Field into SQL statement
sourceยง

fn prepare_constant(&self, value: &Value, sql: &mut dyn SqlWriter)

Write Value inline.
sourceยง

fn prepare_values_list( &self, value_tuples: &[ValueTuple], sql: &mut dyn SqlWriter, )

Translate a &[ValueTuple] into a VALUES list.
sourceยง

fn prepare_tuple(&self, exprs: &[SimpleExpr], sql: &mut dyn SqlWriter)

Translate SimpleExpr::Tuple into SQL statement.
sourceยง

fn prepare_keyword(&self, keyword: &Keyword, sql: &mut dyn SqlWriter)

Translate Keyword into SQL statement.
sourceยง

fn value_to_string(&self, v: &Value) -> String

Convert a SQL value into syntax-specific string
sourceยง

fn value_to_string_common(&self, v: &Value) -> String

sourceยง

fn prepare_on_conflict_action_common( &self, on_conflict_action: &Option<OnConflictAction>, sql: &mut dyn SqlWriter, )

sourceยง

fn insert_default_keyword(&self) -> &str

The keywords for insert default row.
sourceยง

fn prepare_constant_true(&self, sql: &mut dyn SqlWriter)

Write TRUE constant
sourceยง

fn prepare_constant_false(&self, sql: &mut dyn SqlWriter)

Write FALSE constant
sourceยง

impl QuotedBuilder for SqliteQueryBuilder

sourceยง

fn quote(&self) -> Quote

The type of quote the builder uses.
sourceยง

impl TableBuilder for SqliteQueryBuilder

sourceยง

fn prepare_column_def(&self, column_def: &ColumnDef, sql: &mut dyn SqlWriter)

Translate ColumnDef into SQL statement.
sourceยง

fn prepare_column_type(&self, column_type: &ColumnType, sql: &mut dyn SqlWriter)

Translate ColumnType into SQL statement.
sourceยง

fn column_spec_auto_increment_keyword(&self) -> &str

The keyword for setting a column to be auto increment.
sourceยง

fn prepare_table_drop_opt( &self, _drop_opt: &TableDropOpt, _sql: &mut dyn SqlWriter, )

Translate TableDropOpt into SQL statement.
sourceยง

fn prepare_table_truncate_statement( &self, _truncate: &TableTruncateStatement, _sql: &mut dyn SqlWriter, )

Translate TableTruncateStatement into SQL statement.
sourceยง

fn prepare_table_alter_statement( &self, alter: &TableAlterStatement, sql: &mut dyn SqlWriter, )

Translate TableAlterStatement into SQL statement.
sourceยง

fn prepare_table_rename_statement( &self, rename: &TableRenameStatement, sql: &mut dyn SqlWriter, )

Translate TableRenameStatement into SQL statement.
sourceยง

fn prepare_table_create_statement( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, )

Translate TableCreateStatement into SQL statement.
sourceยง

fn prepare_table_ref_table_stmt( &self, table_ref: &TableRef, sql: &mut dyn SqlWriter, )

Translate TableRef into SQL statement.
sourceยง

fn prepare_column_def_internal( &self, _is_alter_column: bool, column_def: &ColumnDef, sql: &mut dyn SqlWriter, )

Translate ColumnDef into SQL statement.
sourceยง

fn prepare_column_spec(&self, column_spec: &ColumnSpec, sql: &mut dyn SqlWriter)

Translate ColumnSpec into SQL statement.
sourceยง

fn column_comment(&self, _comment: &str, _sql: &mut dyn SqlWriter)

column comment
sourceยง

fn prepare_table_opt( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, )

Translate TableOpt into SQL statement.
sourceยง

fn prepare_table_opt_def( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, )

Default function
sourceยง

fn prepare_table_partition( &self, _table_partition: &TablePartition, _sql: &mut dyn SqlWriter, )

Translate TablePartition into SQL statement.
sourceยง

fn prepare_table_drop_statement( &self, drop: &TableDropStatement, sql: &mut dyn SqlWriter, )

Translate TableDropStatement into SQL statement.
sourceยง

fn prepare_check_constraint(&self, check: &SimpleExpr, sql: &mut dyn SqlWriter)

Translate the check constraint into SQL statement
sourceยง

fn prepare_generated_column( &self, gen: &SimpleExpr, stored: bool, sql: &mut dyn SqlWriter, )

Translate the generated column into SQL statement
sourceยง

fn prepare_create_table_if_not_exists( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, )

Translate IF NOT EXISTS expression in TableCreateStatement.
sourceยง

impl TableRefBuilder for SqliteQueryBuilder

sourceยง

fn prepare_table_ref_iden(&self, table_ref: &TableRef, sql: &mut dyn SqlWriter)

Translate TableRef that without values into SQL statement.
sourceยง

impl GenericBuilder for SqliteQueryBuilder

sourceยง

impl SchemaBuilder for SqliteQueryBuilder

Auto Trait Implementationsยง

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.