Skip to main content

SqlDialect

Trait SqlDialect 

Source
pub trait SqlDialect {
Show 26 methods // Required methods fn kind(&self) -> DatabaseKind; fn quote_ident(&self, ident: &str) -> String; fn placeholder(&self, index: usize) -> String; // Provided methods fn schema_setup_sqls(&self) -> &'static [&'static str] { ... } fn schema_type_sql( &self, data_type: DataType, _property: &PropertyDescriptor, ) -> Result<&'static str, SqlCompileError> { ... } fn column_definition_sql( &self, property: &PropertyDescriptor, ) -> Result<String, SqlCompileError> { ... } fn compile_create_table( &self, entity: &EntityDescriptor, ) -> Result<String, SqlCompileError> { ... } fn compile_add_column( &self, entity: &EntityDescriptor, property: &PropertyDescriptor, ) -> Result<String, SqlCompileError> { ... } fn compile_select( &self, entity: &EntityDescriptor, query: &SelectQuery, ) -> Result<CompiledQuery, SqlCompileError> { ... } fn compile_select_sql( &self, entity: &EntityDescriptor, query: &SelectQuery, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError> { ... } fn compile_insert( &self, entity: &EntityDescriptor, command: &InsertCommand, ) -> Result<CompiledQuery, SqlCompileError> { ... } fn compile_update( &self, entity: &EntityDescriptor, command: &UpdateCommand, ) -> Result<CompiledQuery, SqlCompileError> { ... } fn compile_delete( &self, entity: &EntityDescriptor, command: &DeleteCommand, ) -> Result<CompiledQuery, SqlCompileError> { ... } fn compile_recover( &self, entity: &EntityDescriptor, command: &RecoverCommand, ) -> Result<CompiledQuery, SqlCompileError> { ... } fn column_sql( &self, entity: &EntityDescriptor, field: &str, ) -> Result<String, SqlCompileError> { ... } fn order_by_sql( &self, entity: &EntityDescriptor, order_by: &OrderBy, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError> { ... } fn select_projection( &self, entity: &EntityDescriptor, query: &SelectQuery, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError> { ... } fn aggregate_projection( &self, entity: &EntityDescriptor, query: &SelectQuery, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError> { ... } fn aggregate_call_sql( &self, function: AggregateFunction, field: &str, ) -> String { ... } fn aggregate_function_sql( &self, function: AggregateFunction, ) -> &'static str { ... } fn compile_expr( &self, entity: &EntityDescriptor, expr: &Expr, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError> { ... } fn compile_function( &self, entity: &EntityDescriptor, function: ExprFunction, args: &[Expr], params: &mut Vec<Value>, ) -> Result<String, SqlCompileError> { ... } fn compile_single_arg_function( &self, entity: &EntityDescriptor, function: &str, args: &[Expr], params: &mut Vec<Value>, ) -> Result<String, SqlCompileError> { ... } fn compile_subquery( &self, entity: &EntityDescriptor, left: &Expr, op: BinaryOp, sub_entity: &EntityDescriptor, query: &SelectQuery, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError> { ... } fn compile_joined( &self, entity: &EntityDescriptor, parts: &[Expr], joiner: &str, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError> { ... } fn compile_in( &self, entity: &EntityDescriptor, left: &Expr, op: BinaryOp, right: &Expr, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError> { ... }
}

Required Methods§

Source

fn kind(&self) -> DatabaseKind

Source

fn quote_ident(&self, ident: &str) -> String

Source

fn placeholder(&self, index: usize) -> String

Provided Methods§

Source

fn schema_setup_sqls(&self) -> &'static [&'static str]

Source

fn schema_type_sql( &self, data_type: DataType, _property: &PropertyDescriptor, ) -> Result<&'static str, SqlCompileError>

Source

fn column_definition_sql( &self, property: &PropertyDescriptor, ) -> Result<String, SqlCompileError>

Source

fn compile_create_table( &self, entity: &EntityDescriptor, ) -> Result<String, SqlCompileError>

Source

fn compile_add_column( &self, entity: &EntityDescriptor, property: &PropertyDescriptor, ) -> Result<String, SqlCompileError>

Source

fn compile_select( &self, entity: &EntityDescriptor, query: &SelectQuery, ) -> Result<CompiledQuery, SqlCompileError>

Source

fn compile_select_sql( &self, entity: &EntityDescriptor, query: &SelectQuery, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Source

fn compile_insert( &self, entity: &EntityDescriptor, command: &InsertCommand, ) -> Result<CompiledQuery, SqlCompileError>

Source

fn compile_update( &self, entity: &EntityDescriptor, command: &UpdateCommand, ) -> Result<CompiledQuery, SqlCompileError>

Source

fn compile_delete( &self, entity: &EntityDescriptor, command: &DeleteCommand, ) -> Result<CompiledQuery, SqlCompileError>

Source

fn compile_recover( &self, entity: &EntityDescriptor, command: &RecoverCommand, ) -> Result<CompiledQuery, SqlCompileError>

Source

fn column_sql( &self, entity: &EntityDescriptor, field: &str, ) -> Result<String, SqlCompileError>

Source

fn order_by_sql( &self, entity: &EntityDescriptor, order_by: &OrderBy, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Source

fn select_projection( &self, entity: &EntityDescriptor, query: &SelectQuery, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Source

fn aggregate_projection( &self, entity: &EntityDescriptor, query: &SelectQuery, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Source

fn aggregate_call_sql(&self, function: AggregateFunction, field: &str) -> String

Source

fn aggregate_function_sql(&self, function: AggregateFunction) -> &'static str

Source

fn compile_expr( &self, entity: &EntityDescriptor, expr: &Expr, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Source

fn compile_function( &self, entity: &EntityDescriptor, function: ExprFunction, args: &[Expr], params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Source

fn compile_single_arg_function( &self, entity: &EntityDescriptor, function: &str, args: &[Expr], params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Source

fn compile_subquery( &self, entity: &EntityDescriptor, left: &Expr, op: BinaryOp, sub_entity: &EntityDescriptor, query: &SelectQuery, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Source

fn compile_joined( &self, entity: &EntityDescriptor, parts: &[Expr], joiner: &str, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Source

fn compile_in( &self, entity: &EntityDescriptor, left: &Expr, op: BinaryOp, right: &Expr, params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Implementors§