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.

Structs§

  • Represents the SQL CURRENT_TIMESTAMP constant. This is equivalent to the NOW() function on backends that support it.
  • Represents the SQL CURRENT_DATE constant.

Functions§

  • Represents a SQL AVG function. This function can only take types which are Foldable.
  • Creates a SQL CASE WHEN ... END expression
  • 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.
  • 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