Trait SqlWriter
Source pub trait SqlWriter {
Show 45 methods
// Required method
fn as_dyn(&self) -> &dyn SqlWriter;
// Provided methods
fn alias_declaration(&self, context: &mut Context) -> bool { ... }
fn write_escaped(
&self,
_context: &mut Context,
buff: &mut String,
value: &str,
search: char,
replace: &str,
) { ... }
fn write_identifier_quoted(
&self,
context: &mut Context,
buff: &mut String,
value: &str,
) { ... }
fn write_table_ref(
&self,
context: &mut Context,
buff: &mut String,
value: &TableRef,
) { ... }
fn write_column_ref(
&self,
context: &mut Context,
buff: &mut String,
value: &ColumnRef,
) { ... }
fn write_column_type(
&self,
context: &mut Context,
buff: &mut String,
value: &Value,
) { ... }
fn write_value(
&self,
context: &mut Context,
buff: &mut String,
value: &Value,
) { ... }
fn write_value_none(&self, _context: &mut Context, buff: &mut String) { ... }
fn write_value_bool(
&self,
_context: &mut Context,
buff: &mut String,
value: bool,
) { ... }
fn write_value_infinity(
&self,
context: &mut Context,
buff: &mut String,
negative: bool,
) { ... }
fn write_value_string(
&self,
_context: &mut Context,
buff: &mut String,
value: &str,
) { ... }
fn write_value_blob(
&self,
_context: &mut Context,
buff: &mut String,
value: &[u8],
) { ... }
fn write_value_date(
&self,
_context: &mut Context,
buff: &mut String,
value: &Date,
timestamp: bool,
) { ... }
fn write_value_time(
&self,
_context: &mut Context,
buff: &mut String,
value: &Time,
timestamp: bool,
) { ... }
fn write_value_timestamp(
&self,
context: &mut Context,
buff: &mut String,
value: &PrimitiveDateTime,
) { ... }
fn write_value_timestamptz(
&self,
context: &mut Context,
buff: &mut String,
value: &OffsetDateTime,
) { ... }
fn value_interval_units(&self) -> &[(&str, i128)] { ... }
fn write_value_interval(
&self,
_context: &mut Context,
buff: &mut String,
value: &Interval,
) { ... }
fn write_value_list<'a>(
&self,
context: &mut Context,
buff: &mut String,
value: Either<&Box<[Value]>, &Vec<Value>>,
_ty: &Value,
) { ... }
fn write_value_map(
&self,
context: &mut Context,
buff: &mut String,
value: &HashMap<Value, Value>,
) { ... }
fn write_value_struct(
&self,
context: &mut Context,
buff: &mut String,
value: &Vec<(String, Value)>,
) { ... }
fn expression_unary_op_precedence<'a>(&self, value: &UnaryOpType) -> i32 { ... }
fn expression_binary_op_precedence<'a>(&self, value: &BinaryOpType) -> i32 { ... }
fn write_expression_operand(
&self,
context: &mut Context,
buff: &mut String,
value: &Operand<'_>,
) { ... }
fn write_expression_operand_question_mark(
&self,
_context: &mut Context,
buff: &mut String,
) { ... }
fn write_expression_unary_op(
&self,
context: &mut Context,
buff: &mut String,
value: &UnaryOp<&dyn Expression>,
) { ... }
fn write_expression_binary_op(
&self,
context: &mut Context,
buff: &mut String,
value: &BinaryOp<&dyn Expression, &dyn Expression>,
) { ... }
fn write_expression_ordered(
&self,
context: &mut Context,
buff: &mut String,
value: &Ordered<&dyn Expression>,
) { ... }
fn write_join_type(
&self,
_context: &mut Context,
buff: &mut String,
join_type: &JoinType,
) { ... }
fn write_join(
&self,
context: &mut Context,
buff: &mut String,
join: &Join<&dyn DataSet, &dyn DataSet, &dyn Expression>,
) { ... }
fn write_transaction_begin(&self, buff: &mut String) { ... }
fn write_transaction_commit(&self, buff: &mut String) { ... }
fn write_transaction_rollback(&self, buff: &mut String) { ... }
fn write_create_schema<E>(&self, buff: &mut String, if_not_exists: bool)
where Self: Sized,
E: Entity { ... }
fn write_drop_schema<E>(&self, buff: &mut String, if_exists: bool)
where Self: Sized,
E: Entity { ... }
fn write_create_table<E>(&self, buff: &mut String, if_not_exists: bool)
where Self: Sized,
E: Entity { ... }
fn write_column_comments<E>(&self, context: &mut Context, buff: &mut String)
where Self: Sized,
E: Entity { ... }
fn write_create_table_column_fragment(
&self,
context: &mut Context,
buff: &mut String,
column: &ColumnDef,
)
where Self: Sized { ... }
fn write_create_table_references_action(
&self,
_context: &mut Context,
buff: &mut String,
action: &Action,
) { ... }
fn write_drop_table<E>(&self, buff: &mut String, if_exists: bool)
where Self: Sized,
E: Entity { ... }
fn write_select<Item, Cols, Data, Cond>(
&self,
buff: &mut String,
columns: Cols,
from: &Data,
condition: &Cond,
limit: Option<u32>,
)
where Self: Sized,
Item: Expression,
Cols: IntoIterator<Item = Item> + Clone,
Data: DataSet,
Cond: Expression { ... }
fn write_insert<'b, E, It>(
&self,
buff: &mut String,
entities: It,
update: bool,
)
where Self: Sized,
E: Entity + 'b,
It: IntoIterator<Item = &'b E> { ... }
fn write_insert_update_fragment<'a, E, It>(
&self,
context: &mut Context,
buff: &mut String,
columns: It,
)
where Self: Sized,
E: Entity,
It: Iterator<Item = &'a ColumnDef> { ... }
fn write_delete<E, Expr>(&self, buff: &mut String, condition: &Expr)
where Self: Sized,
E: Entity,
Expr: Expression { ... }
}