Module diesel::dsl

source ·
Expand description

Includes various helper types and bare functions which are named too generically to be included in prelude, but are often used when using Diesel.

Re-exports§

  • pub use crate::pg::expression::dsl::*;
    postgres_backend

Structs§

  • DuplicatedKeysmysql_backend
    A marker type signaling that the given ON CONFLICT clause uses mysql’s ON DUPLICATE KEY syntax that triggers on all unique constraints
  • Represents the SQL CURRENT_TIMESTAMP constant. This is equivalent to the NOW() function on backends that support it.
  • Represents the SQL CURRENT_DATE constant.

Traits§

Functions§

  • Represents a SQL AVG function. This function can only take types which are Foldable.
  • Creates a SQL CASE WHEN ... END expression
  • copy_frompostgres_backend
    Creates a COPY FROM statement
  • copy_topostgres_backend
    Creates a COPY TO statement
  • Creates a SQL COUNT expression
  • Creates a SQL COUNT(DISTINCT ...) expression
  • Creates a SQL COUNT(*) expression
  • Represents the SQL DATE function. The argument should be a Timestamp expression, and the return value will be an expression of type Date.
  • Creates a DELETE statement.
  • existsi-implement-a-third-party-backend-and-opt-into-breaking-changes
    Creates a SQL EXISTS expression.
  • Creates an INSERT statement for the target table.
  • Creates an INSERT [OR] IGNORE statement.
  • Represents a SQL MAX function. This function can only take types which are ordered.
  • Represents a SQL MIN function. This function can only take types which are ordered.
  • Creates a SQL NOT expression
  • Creates a REPLACE statement.
  • Creates a bare select statement, with no from clause. Primarily used for testing diesel itself, but likely useful for third party crates as well. The given expressions must be selectable from anywhere.
  • Use literal SQL in the query builder.
  • Construct a full SQL query using raw SQL.
  • Represents a SQL SUM function. This function can only take types which are Foldable.
  • Creates an UPDATE statement.

Type Aliases§

Attribute Macros§

  • Automatically annotates return type of a query fragment function