Module diesel::query_builder

source ·
Expand description

Contains traits responsible for the actual construction of SQL statements

The types in this module are part of Diesel’s public API, but are generally only useful for implementing Diesel plugins. Applications should generally not need to care about the types inside of this module.


  • Types related to managing bind parameters during query construction.



  • Types which can be passed to update.set.
  • Types that can be converted into a complete, typed SQL query.
  • A type which manages serializing bind parameters during query construction.
  • Interface to add information to conflict targets. Designed to be open for further additions to conflict targets like constraints
  • A trait used to construct type erased boxed variant of the current query node
  • A type which can be passed to update or delete.
  • A complete SQL query with a return type.
  • Constructs a SQL query from a Diesel AST.
  • An untyped fragment of SQL.
  • Uniquely identifies queries by their type for the purpose of prepared statement caching.
  • Indicates that a type is a SELECT statement.


  • Takes a query QueryFragment expression as an argument and returns a type that implements fmt::Display and fmt::Debug to show the query.

Type Aliases

Derive Macros