pub struct Postgres;Trait Implementations§
impl Copy for Postgres
Source§impl Dialect for Postgres
impl Dialect for Postgres
Source§const IDENTIFIER_QUOTE: char = '"'
const IDENTIFIER_QUOTE: char = '"'
SQL identifier quote character, e.g.
" for Postgres/SQLite, `
for MySQL.Source§const STRING_AGG: StringAggSyntax
const STRING_AGG: StringAggSyntax
How this dialect spells “concatenate a group’s values, separated”,
and with it whether the separator can be a parameter. One value
rather than a name beside a syntax, because the two only make sense
together:
group_concat(x, ', ') is valid MySQL and means something
else entirely — each row’s values run together, not the group’s.Source§const PLACEHOLDERS_ARE_NUMBERED: bool = true
const PLACEHOLDERS_ARE_NUMBERED: bool = true
Whether one bound parameter can be named from several places in a
statement. It follows from how the dialect spells a placeholder:
Postgres’s
$N names a parameter, so repeating $1 is repeating one
value, while ? is the next parameter, so a second one consumes a
second value. Naming one again keeps a statement’s parameters down to
the values it actually holds, at the cost of a rendered text that
depends on which of them are equal: a driver caching prepared
statements by SQL text sees a bulk INSERT as one statement per
repetition pattern, as it already sees one per row count.Source§fn write_placeholder(n: usize, out: &mut String)
fn write_placeholder(n: usize, out: &mut String)
Writes the placeholder for the
nth bound parameter (1-indexed).
Postgres numbers them ($1, $2, …); MySQL/SQLite are purely
positional (? every time, matched by order of appearance).Source§const CAST_BIGINT: &'static str = "BIGINT"
const CAST_BIGINT: &'static str = "BIGINT"
How this dialect spells the two types an aggregate is cast back to.
CAST itself is standard; the type names are not — MySQL takes
SIGNED and DOUBLE where Postgres takes BIGINT and
DOUBLE PRECISION.const CAST_DOUBLE: &'static str = "DOUBLE PRECISION"
Source§const PARENTHESIZED_SET_OP_BRANCHES: bool = true
const PARENTHESIZED_SET_OP_BRANCHES: bool = true
Whether a set operation’s branches may be parenthesised. SQLite’s
grammar has no place for a parenthesised
SELECT around UNION.Source§const INSERT_NO_COLUMNS: &'static str = " DEFAULT VALUES"
const INSERT_NO_COLUMNS: &'static str = " DEFAULT VALUES"
How to insert a row that names no column, which is what a table
whose every column is generated leaves.
INSERT INTO t () VALUES ()
is MySQL’s spelling and a syntax error everywhere else.Source§const OFFSET_WITHOUT_LIMIT: Option<&'static str> = None
const OFFSET_WITHOUT_LIMIT: Option<&'static str> = None
What to put in a
LIMIT when a query has an OFFSET and no limit.
Postgres takes a bare OFFSET; SQLite and MySQL don’t, and each
spells “no limit” differently.impl SupportsDataModifyingCte for Postgres
impl SupportsFullOuterJoin for Postgres
impl SupportsOnConflict for Postgres
impl SupportsReturning for Postgres
impl SupportsRightJoin for Postgres
Auto Trait Implementations§
impl Freeze for Postgres
impl RefUnwindSafe for Postgres
impl Send for Postgres
impl Sync for Postgres
impl Unpin for Postgres
impl UnsafeUnpin for Postgres
impl UnwindSafe for Postgres
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more