Expand description
Foreign types (ie defined in another crate), have type alias.
| SQL type | Rust type | Feature |
|---|---|---|
bigint/int8 | i64 | |
bit | u8 | bit |
bit(n) | [u8; n] | bit |
bit varying | bit_vec::BitVecelephantry::Bits | bit |
boolean | bool | |
box | elephantry::Box | geo |
bytea | elephantry::Bytea | |
char | char | |
varchar | String | |
cidr | ipnetwork::IpNetworkelephantry::Cidr | net |
circle | elephantry::Circle | geo |
date | chrono::NaiveDateelephantry::Datejiff::civil::Date | date jiff |
double precision/float8 | f64 | |
hstore | elephantry::Hstore | |
inet | std::net::IpAddr | net |
integer/int4 | i32 | |
interval | elephantry::Interval | date |
json | serde_json::Valueelephantry::Json | json |
jsonb | elephantry::Jsonb | json |
line | elephantry::Line | geo |
lquery | elephantry::Lquery | ltree |
lseg | elephantry::Segment | geo |
ltree | elephantry::Ltree | ltree |
ltxtquery | elephantry::Ltxtquery | ltree |
null | () | |
macaddr | macaddr::MacAddr6elephantry::MacAddr | net |
macaddr8 | macaddr::MacAddr8elephantry::MacAddr8 | net |
money | postgres_money::Moneyelephantry::Money | money |
multirange | elephantry::Multirange | multirange |
numeric | bigdecimal::BigDecimalelephantry::Numeric | numeric |
path | elephantry::Path | geo |
point | elephantry::Point | geo |
polygon | elephantry::Polygon | geo |
real/float4 | f32 | |
record | tuple | |
smallint/int2 | i16 | |
text | String | |
time | elephantry::Timetime::Timechrono::NaiveTimejiff::civil::Time | time chrono jiff |
timetz | elephantry::TimeTz(chrono::NaiveTime, chrono::FixedOffset)(jiff::civil::Time, jiff::tz::TimeZone) | time chrono jiff |
timestamp | chrono::NaiveDateTimeelephantry::Timestampjiff::civil::DateTime | date jiff |
timestamptz | chrono::DateTimeelephantry::Timestampjiff::Zoned | date jiff |
uuid | uuid::Uuidelephantry::Uid | uuid |
xml | xmltree::Elementelephantry::Xml | xml |
[x, y) | std::ops::Range | |
[x,) | std::ops::RangeFrom | |
[,y) | std::ops::RangeTo | |
(,) | std::ops::RangeFull |
Re-exports§
pub use crate::config::Config;pub use connection::Connection;pub use entity::Entity;pub use from_sql::FromSql;pub use to_sql::ToSql;pub use transaction::Transaction;
Modules§
- config
- connection
- entity
- from_
sql - pq
- libpq abstraction layer.
- to_sql
- transaction
Macros§
- pk
- Easily create pk argument for where clause, including
find_by_pkfunction. - values
- Likes
pkmacro but for value argument, includingupdate_by_pkfunction.
Structs§
- Array
- Rust type for array.
- Async
- This
structis created by theConnection::asyncmethod. - Bytea
- Rust type for bytea.
- Hstore
- Rust type for hstore.
- Notify
- Pager
- This
structis created by theConnection::paginate_find_wheremethod. - Pool
- Connections pool.
- Projection
- Define the content of SELECT or RETURNING (projection) statements.
- Rows
- Represent a rows of result.
- Tuple
- Represent a set of values, a row of results.
- Where
- This struct represents a WHERE clause of a SQL statement. It deals with AND & OR operator you can add using handy methods. This allows you to build queries dynamically.
Enums§
Traits§
- From
Text - Model
- Impl this trait to create a link between an entity and a structure.
- Projectable
- Structure
- Trait to reflect relation structure.
- ToText