Crate elephantry

Crate elephantry 

Source
Expand description

Foreign types (ie defined in another crate), have type alias.

SQL typeRust typeFeature
bigint/int8i64
bitu8bit
bit(n)[u8; n]bit
bit varyingbit_vec::BitVec
elephantry::Bits
bit
booleanbool
boxelephantry::Boxgeo
byteaelephantry::Bytea
charchar
varcharString
cidripnetwork::IpNetwork
elephantry::Cidr
net
circleelephantry::Circlegeo
datechrono::NaiveDate
elephantry::Date
jiff::civil::Date
date

jiff
double precision/float8f64
hstoreelephantry::Hstore
inetstd::net::IpAddrnet
integer/int4i32
intervalelephantry::Intervaldate
jsonserde_json::Value
elephantry::Json
json
jsonbelephantry::Jsonbjson
lineelephantry::Linegeo
lqueryelephantry::Lqueryltree
lsegelephantry::Segmentgeo
ltreeelephantry::Ltreeltree
ltxtqueryelephantry::Ltxtqueryltree
null()
macaddrmacaddr::MacAddr6
elephantry::MacAddr
net
macaddr8macaddr::MacAddr8
elephantry::MacAddr8
net
moneypostgres_money::Money
elephantry::Money
money
multirangeelephantry::Multirangemultirange
numericbigdecimal::BigDecimal
elephantry::Numeric
numeric
pathelephantry::Pathgeo
pointelephantry::Pointgeo
polygonelephantry::Polygongeo
real/float4f32
recordtuple
smallint/int2i16
textString
timeelephantry::Time
time::Time
chrono::NaiveTime
jiff::civil::Time
time

chrono
jiff
timetzelephantry::TimeTz
(chrono::NaiveTime, chrono::FixedOffset)
(jiff::civil::Time, jiff::tz::TimeZone)
time
chrono
jiff
timestampchrono::NaiveDateTime
elephantry::Timestamp
jiff::civil::DateTime
date

jiff
timestamptzchrono::DateTime
elephantry::Timestamp
jiff::Zoned
date

jiff
uuiduuid::Uuid
elephantry::Uid
uuid
xmlxmltree::Element
elephantry::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_pk function.
values
Likes pk macro but for value argument, including update_by_pk function.

Structs§

Array
Rust type for array.
Async
This struct is created by the Connection::async method.
Bytea
Rust type for bytea.
Hstore
Rust type for hstore.
Notify
Pager
This struct is created by the Connection::paginate_find_where method.
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§

FromText
Model
Impl this trait to create a link between an entity and a structure.
Projectable
Structure
Trait to reflect relation structure.
ToText

Type Aliases§

Result

Derive Macros§

Composite
Impl FromSql/ToSql traits for composite type.
Entity
Impl Entity trait.
Enum
Impl FromSql/ToSql traits for enum type.