Trait hdbconnect::ToHana

source ·
pub trait ToHana<T> {
    // Required method
    fn to_hana(self) -> T;
}
Expand description

Helper trait for serialization.

Helps providing parameters to prepared statements.

§Example for serialization

use hdbconnect::{ToHana,time::HanaOffsetDateTime};

use time::{macros::datetime,OffsetDateTime};

let ts: OffsetDateTime = datetime!(2012-02-02 02:02:02.200000000 +2);
let response = connection.prepare_and_execute(stmt, &(ts.to_hana())).unwrap();

Required Methods§

source

fn to_hana(self) -> T

Implementations on Foreign Types§

source§

impl ToHana<HanaDate> for Date

source§

impl ToHana<HanaOffsetDateTime> for OffsetDateTime

source§

impl ToHana<HanaPrimitiveDateTime> for PrimitiveDateTime

source§

impl ToHana<HanaTime> for Time

Implementors§