Trait ToSqlNull

Source
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 TypeOracle Type
str, Stringnvarchar2(0)
i8, i16, i32, i64, u8, u16, u32, u64, f32, f64number
Vec<u8>raw(0)
boolboolean (PL/SQL only)
Timestamptimestamp(9) with time zone
IntervalDSinterval day(9) to second(9)
IntervalYMinterval year(9) to month
RefCursorref cursor
VecRefvector

When chrono feature is enabled, the followings are added.

Rust TypeOracle Type
chrono::Datetimestamp(0) with time zone
chrono::DateTimetimestamp(9) with time zone
chrono::naive::NaiveDatetimestamp(0)
chrono::naive::NaiveDateTimetimestamp(9)
chrono::Duration, which is alias of chrono::TimeDelta since chrono 0.4.43 ]interval day(9) to second(9)

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToSqlNull for &str

Source§

impl ToSqlNull for &[u8]

Source§

impl ToSqlNull for bool

Source§

impl ToSqlNull for f32

Source§

impl ToSqlNull for f64

Source§

impl ToSqlNull for i8

Source§

impl ToSqlNull for i16

Source§

impl ToSqlNull for i32

Source§

impl ToSqlNull for i64

Source§

impl ToSqlNull for isize

Source§

impl ToSqlNull for u8

Source§

impl ToSqlNull for u16

Source§

impl ToSqlNull for u32

Source§

impl ToSqlNull for u64

Source§

impl ToSqlNull for usize

Source§

impl ToSqlNull for String

Source§

impl ToSqlNull for Vec<u8>

Source§

impl ToSqlNull for NaiveDate

Available on crate feature chrono only.
Source§

impl ToSqlNull for NaiveDateTime

Available on crate feature chrono only.
Source§

impl ToSqlNull for Duration

Available on crate feature chrono only.
Source§

impl<Tz> ToSqlNull for Date<Tz>
where Tz: TimeZone,

Available on crate feature chrono only.
Source§

impl<Tz> ToSqlNull for DateTime<Tz>
where Tz: TimeZone,

Available on crate feature chrono only.

Implementors§