#[non_exhaustive]pub enum OracleType {
Show 30 variants
Varchar2(u32),
NVarchar2(u32),
Char(u32),
NChar(u32),
Rowid,
Raw(u32),
BinaryFloat,
BinaryDouble,
Number(u8, i8),
Float(u8),
Date,
Timestamp(u8),
TimestampTZ(u8),
TimestampLTZ(u8),
IntervalDS(u8, u8),
IntervalYM(u8),
CLOB,
NCLOB,
BLOB,
BFILE,
RefCursor,
Boolean,
Object(ObjectType),
Long,
LongRaw,
Json,
Xml,
Vector(u32, VecFmt),
Int64,
UInt64,
}
Expand description
Oracle data type
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Varchar2(u32)
VARCHAR2(size)
NVarchar2(u32)
NVARCHAR2(size)
Char(u32)
CHAR(size)
NChar(u32)
NCHAR(size)
Rowid
ROWID
Raw(u32)
RAW(size)
BinaryFloat
BINARY_FLOAT
IEEE 754 single-precision (32-bit) floating-point number
BinaryDouble
BINARY_DOUBLE
IEEE 754 double-precision (64-bit) floating-point number
Number(u8, i8)
NUMBER(precision, scale)
precision
is between 0 and 38. When it is 0, its actual precision is
38 and (precision, scale)
is omitted in text represention.
scale
is between -87 and 127. When it is 0, this is represented
as NUMBER(precision)
in text.
Float(u8)
FLOAT(precision)
This is a subtype of NUMBER. The internal format is same with NUMBER, which means that numbers are stored as decimal not as binary. Use BINARY_DOUBLE or BINARY_FLOAT to store f64 or f32 rust types.
precision
is between 0 and 126. When it is 126, (precision)
is
omitted in text represention.
Date
DATE data type
Timestamp(u8)
TIMESTAMP(fsprec)
Timestamp data type without time zone.
fsprec
is fractional seconds precision between 0 and 9. When it is
6, (fsprec)
is omitted in text represention.
TimestampTZ(u8)
TIMESTAMP(fsprec) WITH TIME ZONE
Timestamp data type with time zone.
fsprec
is fractional seconds precision between 0 and 9. When it is
6, (fsprec)
is omitted in text represention.
TimestampLTZ(u8)
TIMESTAMP(fsprec) WITH LOCAL TIME ZONE
Timestamp data type in local session time zone. Clients in different session time zones retrieves different timestamp.
fsprec
is fractional seconds precision between 0 and 9. When it is
6, (fsprec)
is omitted in text represention.
IntervalDS(u8, u8)
INTERVAL DAY(lfprec) TO SECOND(fsprec)
lfprec
is leading field precision between 0 and 9. When it is 2,
(lfprec)
is omitted in text represention.
fsprec
is fractional seconds precision between 0 and 9. When it is
6, (fsprec)
is omitted in text represention.
IntervalYM(u8)
INTERVAL YEAR(lfprec) TO MONTH
lfprec
is leading field precision between 0 and 9. When it is 2,
(lfprec)
is omitted in text represention.
CLOB
CLOB
NCLOB
NCLOB
BLOB
BLOB
BFILE
BFILE
RefCursor
REF CURSOR (not supported)
Boolean
BOOLEAN (not supported)
Object(ObjectType)
Object
Long
LONG
LongRaw
LONG RAW
Json
JSON data type introduced in Oracle 21c
Xml
XML
Vector(u32, VecFmt)
VECTOR data type
The first tuple element is number of dimensions. 0
corresponds to *
in data type definition.
The second is dimension element format. VecFmt::Flexible
corresponds to *
.
Examples:
Definition in SQL | value in the oracle crate |
---|---|
VECTOR VECTOR(*, *) | OracleType::Vector(0, VecFmt::Flexible) |
VECTOR(*, FLOAT32) | OracleType::Vector(0, VecFmt::Float32) |
VECTOR(4096) VECTOR(4096, *) | OracleType::Vector(4096, VecFmt::Flexible) |
VECTOR(8192, FLOAT64) | OracleType::Vector(8192, VecFmt::Float64) |
Int64
Integer type in Oracle object type attributes. This will be renamed to Integer in future.
UInt64
Not an Oracle type, used only internally to bind/define values as u64
Trait Implementations§
Source§impl Clone for OracleType
impl Clone for OracleType
Source§fn clone(&self) -> OracleType
fn clone(&self) -> OracleType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more