Module diesel::prelude [] [src]

Re-exports important traits and types. Meant to be glob imported when using Diesel.

Reexports

pub use associations::Identifiable;
pub use connection::Connection;
pub use deserialize::Queryable;
pub use expression::AppearsOnTable;
pub use expression::BoxableExpression;
pub use expression::Expression;
pub use expression::IntoSql;
pub use expression::SelectableExpression;
pub use expression_methods::*;
pub use query_dsl::QueryDsl;
pub use query_dsl::RunQueryDsl;
pub use query_source::Column;
pub use query_source::QuerySource;
pub use query_source::Table;
pub use result::ConnectionError;
pub use result::ConnectionResult;
pub use result::OptionalExtension;
pub use result::QueryResult;

Structs

MysqlConnection

A connection to a MySQL database. Connection URLs should be in the form mysql://[user[:password]@]host/database_name

PgConnection

The connection string expected by PgConnection::establish should be a PostgreSQL connection string, as documented at https://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-CONNSTRING

SqliteConnection

Connections for the SQLite backend. Unlike other backends, "connection URLs" for SQLite are file paths or special identifiers like :memory.

Traits

BelongingToDsl

Constructs a query that finds record(s) based on directional association with other record(s).

GroupedBy

The grouped_by function groups records by their parent.

Insertable

Represents that a structure can be used to insert a new row into the database. This is automatically implemented for &[T] and &Vec<T> for inserting more than one record.

JoinOnDsl

Specify the ON clause for a join statement. This will override any implicit ON clause that would come from joinable!

JoinTo

Indicates that two tables can be joined without an explicit ON clause.

SaveChangesDsl

Sugar for types which implement both AsChangeset and Identifiable