Crate elephantry[−][src]
SQL type | Rust type | Feature |
---|---|---|
bigint | i64 | |
bit | u8 | bit |
bit varying | bit_vec::BitVec | bit |
boolean | bool | |
box | elephantry::Box | geo |
bytea | elephantry::Bytea | |
char | i8 | |
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 | i32 | |
json /jsonb | serde_json::value::Value | json |
line | elephantry::Line | geo |
lseg | elephantry::Segment | geo |
null | () | |
macaddr | macaddr::MacAddr6 | net |
macaddr8 | macaddr::MacAddr8 | net |
money | f32 | |
numeric | bigdecimal::BigDecimal | numeric |
path | elephantry::Path | geo |
point | elephantry::Point | geo |
polygon | elephantry::Polygon | geo |
real /float4 | f32 | |
record | tuple | |
smallint | 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 |
Re-exports
pub use transaction::Transaction; |
Modules
builder | |
inspect | database inspection module. |
pq | libpq abstraction layer. |
transaction |
Macros
pk | Easily create pk argument for where clause, including |
values | Likes |
Structs
Array | Rust type for array. |
Async | This |
Bytea | Rust type for bytea. |
Config | Connection configuration. |
Connection | A connection to a database. |
Hstore | Rust type for hstore. |
Pager | This |
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
Error |
Traits
Composite | Trait to convert rust struct to composite type. |
Entity | Trait to translate SQL row to struct and vice versa. |
Enum | Trait to convert rust enum to postgresql enum. |
FromSql | Trait to allow a rust type to be translated form a SQL value. |
Model | Impl this trait to create a link between an entity and a structure. |
Structure | Trait to reflect relation structure. |
ToSql | Trait to allow a rust type to be translated to a SQL value. |
Type Definitions
Result |
Derive Macros
Composite | Impl |
Entity | Impl |
Enum | Impl |