pub trait ToSqlNull {
// Required method
fn oratype_for_null(conn: &Connection) -> Result<OracleType>;
}
Expand description
A trait specifying Oracle type to bind a null value.
This trait is used only when binding a None
value of Option<T>
.
The type of the null value is determined by the rust type.
Rust Type | Oracle Type |
---|---|
str , String | nvarchar2(0) |
i8 , i16 , i32 , i64 , u8 , u16 , u32 , u64 , f32 , f64 | number |
Vec\<u8> | raw(0) |
bool | boolean (PL/SQL only) |
Timestamp | timestamp(9) with time zone |
IntervalDS | interval day(9) to second(9) |
IntervalYM | interval year(9) to month |
RefCursor | ref cursor |
When chrono
feature is enabled, the followings are added.
Rust Type | Oracle Type |
---|---|
chrono::Date | timestamp(0) with time zone |
chrono::DateTime | timestamp(9) with time zone |
chrono::naive::NaiveDate | timestamp(0) |
chrono::naive::NaiveDateTime | timestamp(9) |
chrono::Duration | interval day(9) to second(9) |
Required Methods§
fn oratype_for_null(conn: &Connection) -> Result<OracleType>
Object Safety§
This trait is not object safe.