Skip to main content

PostgresDialect

Struct PostgresDialect 

Source
pub struct PostgresDialect;

Trait Implementations§

Source§

impl Clone for PostgresDialect

Source§

fn clone(&self) -> PostgresDialect

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PostgresDialect

Source§

impl Debug for PostgresDialect

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for PostgresDialect

Source§

fn default() -> PostgresDialect

Returns the “default value” for a type. Read more
Source§

impl SqlDialect for PostgresDialect

Source§

fn kind(&self) -> DatabaseKind

Source§

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

Source§

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

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 compile_in( &self, entity: &EntityDescriptor, left: &Expr, op: BinaryOp, right: &Expr, params: &mut Vec<Value>, ) -> Result<String, 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 fallback_default_value_sql(&self, data_type: DataType) -> &'static str

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_batch_insert( &self, entity: &EntityDescriptor, command: &BatchInsertCommand, ) -> Result<CompiledQuery, SqlCompileError>

Source§

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

Source§

fn compile_batch_update( &self, entity: &EntityDescriptor, command: &BatchUpdateCommand, ) -> 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_gbk_function( &self, entity: &EntityDescriptor, args: &[Expr], params: &mut Vec<Value>, ) -> Result<String, SqlCompileError>

Compile a GBK sort expression. The default implementation returns an error because GBK encoding conversion is dialect-specific. PostgreSQL dialects should override this to use convert_to(arg, 'GBK').
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>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more