Expand description
§Supported types
| Rust type | Exasol type |
|---|---|
bool | BOOLEAN |
i8, i16, i32, i64 | DECIMAL |
f64 | DOUBLE |
String, &str | CHAR(n) ASCII/UTF8, VARCHAR(n) ASCII/UTF8 |
ExaIntervalYearToMonth | INTERVAL YEAR TO MONTH |
HashType | HASHTYPE |
Option<T> | T (for any T that implements Type) |
§chrono feature
| Rust type | Exasol type |
|---|---|
chrono::NaiveDate | DATE |
chrono::NaiveDateTime | TIMESTAMP |
chrono::TimeDelta | INTERVAL DAY TO SECOND |
§time feature
| Rust type | Exasol type |
|---|---|
time::Date | DATE |
time::PrimitiveDateTime | TIMESTAMP |
time::Duration | INTERVAL DAY TO SECOND |
§rust_decimal feature
| Rust type | Exasol type |
|---|---|
rust_decimal::Decimal | DECIMAL(p,s) |
§bigdecimal feature
| Rust type | Exasol type |
|---|---|
bigdecimal::BigDecimal | DECIMAL(p,s) |
§uuid feature
| Rust type | Exasol type |
|---|---|
uuid::Uuid | HASHTYPE |
§geo-types feature
| Rust type | Exasol type |
|---|---|
geo_types::Geometry | GEOMETRY |
Note: due to a bug in the Exasol websocket
API, GEOMETRY can’t be used as prepared
statement bind parameters. It can, however, be used as a column in a returned result set or with
runtime checked queries.
§json feature
The json feature enables Encode and Decode implementations for Json<T>,
serde_json::Value and &serde_json::value::RawValue.
§Array-like parameters
Array-like types can be passed as parameters, including in compile time checked queries, for batch parameter binding due to Exasol’s columnar nature.
Supported types are Vec<T>, &T (slices), [[T;N]] (arrays), iterators through the
ExaIter adapter, etc.
Parameter arrays must be of equal length (runtime checked) or an error will be thrown otherwise.
Custom types that implement Type can be used in array-like types by implementing
the ExaHasArrayType marker trait for them.
Modules§
- chrono
chrono - geo_
types geo-types - time
time - uuid
- Generate and parse universally unique identifiers (UUIDs).
Structs§
- BigDecimal
- A big decimal type.
- Decimal
Decimalrepresents a 128 bit representation of a fixed-precision decimal number. The finite set of values of typeDecimalare of the form m / 10e, where m is an integer such that -296 < m < 296, and e is an integer between 0 and 28 inclusive.- ExaInterval
Year ToMonth - A duration interval as a representation of the
INTERVAL YEAR TO MONTHdatatype. - ExaIter
- Adapter allowing any iterator of encodable values to be treated and passed as a one dimensional
parameter array for a column to Exasol in a single query invocation. Multi dimensional arrays
are not supported. The adapter is needed because
Encodeis still a foreign trait and thus cannot be implemented in a generic manner to all types implementingIntoIterator. - Hash
Type - Newtype used for more explicit encoding/decoding of arbitrary length data into/from HASHTYPE columns.
- Json
- Json for json and jsonb fields
- Json
RawValue - Reference to a range of bytes encompassing a single valid JSON value in the input data.
- Text
- Map a SQL text value to/from a Rust type using
DisplayandFromStr. - Uuid
- A Universally Unique Identifier (UUID).
Enums§
- Json
Value - Represents any valid JSON value.
Traits§
- ExaHas
Array Type - Marker trait that limits arrays encoding to one dimensioanl arrays.
- Type
- Indicates that a SQL type is supported for a database.