SqliteQueryBuilder

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 write_escaped(&self, buffer: &mut impl Write, string: &str)

Sourceยง

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

Unescape a SQL string literal
Sourceยง

fn needs_escape(&self, s: &str) -> bool

Return if string literal needs to be escaped
Sourceยง

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

Escape a SQL string literal
Sourceยง

impl ForeignKeyBuilder for SqliteQueryBuilder

Sourceยง

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

Translate TableRef into SQL statement.
Sourceยง

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

Translate ForeignKeyCreateStatement into SQL statement.
Sourceยง

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

Translate ForeignKeyDropStatement into SQL statement.
Sourceยง

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

Translate ForeignKeyAction into SQL statement.
Sourceยง

impl IndexBuilder for SqliteQueryBuilder

Sourceยง

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

Translate IndexCreateStatement into SQL statement.
Sourceยง

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

Translate TableRef into SQL statement.
Sourceยง

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

Translate IndexDropStatement into SQL statement.
Sourceยง

fn prepare_table_index_expression( &self, create: &IndexCreateStatement, sql: &mut impl 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 impl SqlWriter, )

Translate LockType into SQL statement.
Sourceยง

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

Translate SubQueryOper into SQL statement.
Sourceยง

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

Translate BinOper into SQL statement.
Sourceยง

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

Sourceยง

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

Translate QueryStatement into SQL statement.
Sourceยง

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

Sourceยง

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

Translate OrderExpr into SQL statement.
Sourceยง

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

Write Value into SQL statement as parameter.
Sourceยง

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

Write insert default rows expression.
Sourceยง

fn placeholder(&self) -> (&'static 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 impl SqlWriter, )

Translate InsertStatement into SQL statement.
Sourceยง

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

Translate SelectStatement into SQL statement.
Sourceยง

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

Sourceยง

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

Translate UpdateStatement into SQL statement.
Sourceยง

fn prepare_update_join( &self, _: &[TableRef], _: &ConditionHolder, _: &mut impl SqlWriter, )

Sourceยง

fn prepare_update_from(&self, from: &[TableRef], sql: &mut impl SqlWriter)

Sourceยง

fn prepare_update_column( &self, _: &Option<Box<TableRef>>, _: &[TableRef], column: &DynIden, sql: &mut impl SqlWriter, )

Sourceยง

fn prepare_update_condition( &self, _: &[TableRef], condition: &ConditionHolder, sql: &mut impl SqlWriter, )

Sourceยง

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

Translate ORDER BY expression in UpdateStatement.
Sourceยง

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

Translate LIMIT expression in UpdateStatement.
Sourceยง

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

Translate DeleteStatement into SQL statement.
Sourceยง

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

Translate ORDER BY expression in DeleteStatement.
Sourceยง

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

Translate LIMIT expression in DeleteStatement.
Sourceยง

fn prepare_expr(&self, simple_expr: &Expr, sql: &mut impl SqlWriter)

Translate Expr into SQL statement.
Sourceยง

fn prepare_expr_common(&self, simple_expr: &Expr, sql: &mut impl SqlWriter)

Sourceยง

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

Translate CaseStatement into SQL statement.
Sourceยง

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

Translate SelectDistinct into SQL statement.
Sourceยง

fn prepare_index_hints( &self, _table_ref: &TableRef, _select: &SelectStatement, _sql: &mut impl SqlWriter, )

Translate [IndexHint] into SQL statement.
Sourceยง

fn prepare_table_sample( &self, _select: &SelectStatement, _sql: &mut impl SqlWriter, )

Translate [TableSample] into SQL statement.
Sourceยง

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

Translate SelectExpr into SQL statement.
Sourceยง

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

Translate JoinExpr into SQL statement.
Sourceยง

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

Sourceยง

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

Translate TableRef into SQL statement.
Sourceยง

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

Sourceยง

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

Translate UnOper into SQL statement.
Sourceยง

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

Sourceยง

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

Translate LogicalChainOper into SQL statement.
Sourceยง

fn prepare_function_name_common( &self, function: &Func, sql: &mut impl SqlWriter, )

Translate Function into SQL statement.
Sourceยง

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

Sourceยง

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

Sourceยง

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

Sourceยง

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

Sourceยง

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

Sourceยง

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

Sourceยง

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

Sourceยง

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

Sourceยง

fn prepare_function_name(&self, function: &Func, sql: &mut impl SqlWriter)

Sourceยง

fn prepare_type_ref(&self, type_name: &TypeRef, sql: &mut impl SqlWriter)

Translate TypeRef into an SQL statement.
Sourceยง

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

Translate JoinType into SQL statement.
Sourceยง

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

Sourceยง

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

Translate JoinOn into SQL statement.
Sourceยง

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

Translate Order into SQL statement.
Sourceยง

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

Translate Order::Field into SQL statement
Sourceยง

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

Write Value inline.
Sourceยง

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

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

fn prepare_tuple(&self, exprs: &[Expr], sql: &mut impl SqlWriter)

Translate Expr::Tuple into SQL statement.
Sourceยง

fn prepare_keyword(&self, keyword: &Keyword, sql: &mut impl 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 impl SqlWriter, )

Sourceยง

fn write_string_quoted(&self, string: &str, buffer: &mut impl Write)

Sourceยง

fn insert_default_keyword(&self) -> &str

The keywords for insert default row.
Sourceยง

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

Write TRUE constant
Sourceยง

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

Write FALSE constant
Sourceยง

impl QuotedBuilder for SqliteQueryBuilder

Sourceยง

fn quote(&self) -> Quote

The type of quote the builder uses.
Sourceยง

fn prepare_iden(&self, iden: &DynIden, sql: &mut impl SqlWriter)

To prepare iden and write to SQL.
Sourceยง

impl TableBuilder for SqliteQueryBuilder

Sourceยง

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

Translate ColumnDef into SQL statement.
Sourceยง

fn prepare_column_type( &self, column_type: &ColumnType, sql: &mut impl 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 impl SqlWriter, )

Translate TableDropOpt into SQL statement.
Sourceยง

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

Translate TableTruncateStatement into SQL statement.
Sourceยง

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

Translate TableAlterStatement into SQL statement.
Sourceยง

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

Translate TableRenameStatement into SQL statement.
Sourceยง

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

Translate TableCreateStatement into SQL statement.
Sourceยง

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

Translate TableRef into SQL statement.
Sourceยง

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

Translate ColumnDef into SQL statement.
Sourceยง

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

Translate ColumnSpec into SQL statement.
Sourceยง

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

column comment
Sourceยง

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

Translate TableOpt into SQL statement.
Sourceยง

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

Default function
Sourceยง

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

Translate TablePartition into SQL statement.
Sourceยง

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

Translate TableDropStatement into SQL statement.
Sourceยง

fn prepare_check_constraint(&self, check: &Check, sql: &mut impl SqlWriter)

Translate the check constraint into SQL statement
Sourceยง

fn prepare_generated_column( &self, gen: &Expr, stored: bool, sql: &mut impl SqlWriter, )

Translate the generated column into SQL statement
Sourceยง

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

Translate IF NOT EXISTS expression in TableCreateStatement.
Sourceยง

fn prepare_create_temporary_table( &self, create: &TableCreateStatement, sql: &mut impl SqlWriter, )

Translate TEMPORARY expression in TableCreateStatement.
Sourceยง

impl TableRefBuilder for SqliteQueryBuilder

Sourceยง

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

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

fn prepare_table_name(&self, table_name: &TableName, sql: &mut impl SqlWriter)

Translate TableName into an SQL statement.
Sourceยง

fn prepare_schema_name( &self, schema_name: &SchemaName, sql: &mut impl SqlWriter, )

Translate SchemaName into an 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.