Crate elephantry
source ·Expand description
SQL type | Rust type | Feature |
---|---|---|
bigint /int8 | i64 | |
bit | u8 | bit |
bit(n) | [u8; n] | bit |
bit varying | bit_vec::BitVec | bit |
boolean | bool | |
box | elephantry::Box | geo |
bytea | elephantry::Bytea | |
char | char | |
varchar | String | |
cidr | ipnetwork::IpNetwork | net |
circle | elephantry::Circle | geo |
date | chrono::NaiveDate | date |
double precision /float8 | f64 | |
hstore | elephantry::Hstore | |
inet | std::net::IpAddr | net |
integer /int4 | i32 | |
interval | elephantry::Interval | date |
json | serde_json::Value | 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::MacAddr6 | net |
macaddr8 | macaddr::MacAddr8 | net |
money | postgres_money::Money | money |
multirange | elephantry::Multirange | multirange |
numeric | bigdecimal::BigDecimal | 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::Time | time |
timetz | elephantry::TimeTz | time |
timestamp | chrono::NaiveDateTime | date |
timestamptz | chrono::DateTime | date |
uuid | uuid::Uuid | uuid |
xml | xmltree::Element | 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 transaction::Transaction;
Modules§
Macros§
- Easily create pk argument for where clause, including
find_by_pk
function. - Likes
pk
macro but for value argument, includingupdate_by_pk
function.
Structs§
- Rust type for array.
- This
struct
is created by theConnection::async
method. - Box
geo
Rust type for box. - Rust type for bytea.
- Circle
geo
Rust type for circle. - Coordinate
geo
- Coordinates
geo
- Rust type for hstore.
- Interval
date
Rust type for interval. - Jsonb
json
Rust type for jsonb. - Line
geo
Rust type for line. - Money
money
Rust type for money. Representation of the Postgres ‘money’ type - Multirange
multirange
- This
struct
is created by theConnection::paginate_find_where
method. - Path
geo
Rust type for path. - Point
geo
Rust type for point. - Polygon
geo
Rust type for polygon. - Connections pool.
- Define the content of SELECT or RETURNING (projection) statements.
- Represent a rows of result.
- Segment
geo
Rust type for segment. - Time
time
Rust type for time. The clock time within a given date. Nanosecond precision. - Timezone
time
An offset from UTC. - Represent a set of values, a row of results.
- 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§
- Trait to allow a rust type to be translated form a SQL value.
- Impl this trait to create a link between an entity and a structure.
- Trait to reflect relation structure.
- Trait to allow a rust type to be translated to a SQL value.
Type Aliases§
Derive Macros§
- Impl
Entity
trait.