[−][src]Module diesel::prelude
Re-exports important traits and types. Meant to be glob imported when using Diesel.
Macros
allow_columns_to_appear_in_same_group_by_clause | Allow two or more columns which are otherwise unrelated to be used together in a group by clause. |
allow_tables_to_appear_in_same_query | Allow two or more tables which are otherwise unrelated to be used together in a query. |
joinable | Allow two tables to be referenced in a join query without providing an
explicit |
sql_function | Declare a sql function for use in your code. |
table | Specifies that a table exists, and what columns it has. This will create a
new public module, with the same name, as the name of the table. In this
module, you'll find a unit struct named |
Structs
MysqlConnection | A connection to a MySQL database. Connection URLs should be in the form
|
PgConnection | The connection string expected by |
SqliteConnection | Connections for the SQLite backend. Unlike other backends, SQLite supported connection URLs are: |
Enums
ConnectionError | Errors which can occur during |
Traits
AppearsOnTable | Indicates that all elements of an expression are valid given a from clause. |
AsChangeset | Types which can be passed to
|
BelongingToDsl | Constructs a query that finds record(s) based on directional association with other record(s). |
BoolExpressionMethods | Methods present on boolean expressions |
BoxableExpression | Helper trait used when boxing expressions. |
Column | A column on a database table. Types which implement this trait should have
been generated by the |
CombineDsl | Extension trait to combine queries using a combinator like |
Connection | A connection to a database |
DecoratableTarget | Interface to add information to conflict targets. Designed to be open for further additions to conflict targets like constraints |
EscapeExpressionMethods | Adds the |
Expression | Represents a typed fragment of SQL. |
ExpressionMethods | Methods present on all expressions, except tuples |
GroupedBy | The |
Identifiable | This trait indicates that a struct represents a single row in a database table. |
Insertable | Represents that a structure can be used to insert a new row into the
database. This is automatically implemented for |
IntoSql | Converts a type to its representation for use in Diesel's query builder. |
JoinOnDsl | Specify the |
JoinTo | Indicates that two tables can be joined without an explicit |
NullableExpressionMethods | Methods present on all expressions |
OptionalExtension | See the method documentation. |
PgArrayExpressionMethods | PostgreSQL specific methods present on array expressions. |
PgExpressionMethods | PostgreSQL specific methods which are present on all expressions. |
PgNetExpressionMethods | PostgreSQL specific methods present between CIDR/INET expressions |
PgRangeExpressionMethods | PostgreSQL specific methods present on range expressions. |
PgSortExpressionMethods | PostgreSQL expression methods related to sorting. |
PgTextExpressionMethods | PostgreSQL specific methods present on text expressions. |
PgTimestampExpressionMethods | PostgreSQL specific methods present on timestamp expressions. |
QueryDsl | Methods used to construct select statements. |
QuerySource | Represents a type which can appear in the |
Queryable | Trait indicating that a record can be queried from the database. |
QueryableByName | Deserializes the result of a query constructed with |
RunQueryDsl | Methods used to execute queries. |
SaveChangesDsl | Sugar for types which implement both |
SelectableExpression | Indicates that an expression can be selected from a source. |
Table | A SQL database table. Types which implement this trait should have been
generated by the |
TextExpressionMethods | Methods present on text expressions |
Type Definitions
ConnectionResult | A specialized result type for establishing connections. |
QueryResult | A specialized result type for queries. |
Derive Macros
AsChangeset | Implements |
Associations | Implement required traits for the associations API |
Identifiable | Implements |
Insertable | Implements |
Queryable | Implements |
QueryableByName | Implements |