Crate elephantry

Source
Expand description
SQL typeRust typeFeature
bigint/int8i64
bitu8bit
bit(n)[u8; n]bit
bit varyingbit_vec::BitVecbit
booleanbool
boxelephantry::Boxgeo
byteaelephantry::Bytea
charchar
varcharString
cidripnetwork::IpNetworknet
circleelephantry::Circlegeo
datechrono::NaiveDatedate
double precision/float8f64
hstoreelephantry::Hstore
inetstd::net::IpAddrnet
integer/int4i32
intervalelephantry::Intervaldate
jsonserde_json::Valuejson
jsonbelephantry::Jsonbjson
lineelephantry::Linegeo
lqueryelephantry::Lqueryltree
lsegelephantry::Segmentgeo
ltreeelephantry::Ltreeltree
ltxtqueryelephantry::Ltxtqueryltree
null()
macaddrmacaddr::MacAddr6net
macaddr8macaddr::MacAddr8net
moneypostgres_money::Moneymoney
multirangeelephantry::Multirangemultirange
numericbigdecimal::BigDecimalnumeric
pathelephantry::Pathgeo
pointelephantry::Pointgeo
polygonelephantry::Polygongeo
real/float4f32
recordtuple
smallint/int2i16
textString
timeelephantry::Timetime
timetzelephantry::TimeTztime
timestampchrono::NaiveDateTimedate
timestamptzchrono::DateTimedate
uuiduuid::Uuiduuid
xmlxmltree::Elementxml
[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§

config
connection
entity
inspectinspect
database inspection module.
pq
libpq abstraction layer.
r2d2r2d2
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.
Boxgeo
Rust type for box.
Bytea
Rust type for bytea.
Circlegeo
Rust type for circle.
Coordinategeo
Coordinatesgeo
Hstore
Rust type for hstore.
Intervaldate
Rust type for interval.
Jsonbjson
Rust type for jsonb.
Linegeo
Rust type for line.
Lquery
Ltree
Ltxtquery
Moneymoney
Rust type for money. Representation of the Postgres ‘money’ type
Multirangemultirange
Pager
This struct is created by the Connection::paginate_find_where method.
Pathgeo
Rust type for path.
Pointgeo
Rust type for point.
Polygongeo
Rust type for polygon.
Pool
Connections pool.
Projection
Define the content of SELECT or RETURNING (projection) statements.
Rows
Represent a rows of result.
Segmentgeo
Rust type for segment.
Timetime
Rust type for time. The clock time within a given date. Nanosecond precision.
Timezonetime
An offset from UTC.
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§

FromSql
Trait to allow a rust type to be translated form a SQL value.
FromText
Model
Impl this trait to create a link between an entity and a structure.
Projectable
Structure
Trait to reflect relation structure.
ToSql
Trait to allow a rust type to be translated to a SQL value.
ToText

Type Aliases§

Result
TimeTztime
Rust type for timetz.

Derive Macros§

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