pub struct NativeFbClient<T: LinkageMarker> { /* private fields */ }
Expand description

Client that wraps the native fbclient library

Trait Implementations§

source§

impl<T: LinkageMarker> FirebirdClientDbEvents for NativeFbClient<T>

source§

fn wait_for_event(
    &mut self,
    db_handle: &mut Self::DbHandle,
    name: String
) -> Result<(), FbError>

Wait for an event to be posted on database
source§

impl<T: LinkageMarker> FirebirdClientDbOps for NativeFbClient<T>

§

type DbHandle = u32

A database handle
§

type AttachmentConfig = NativeFbAttachmentConfig

Configuration details for attaching to the database. A user of an implementation of this trait can configure attachment details (database name, user name, etcetera) and then pass this configuration to the implementation via this type when a new attachment is requested
source§

fn attach_database(
    &mut self,
    config: &Self::AttachmentConfig
) -> Result<isc_db_handle, FbError>

Create a new attachment to a database with the provided configuration Returns a database handle on success
source§

fn detach_database(
    &mut self,
    db_handle: &mut isc_db_handle
) -> Result<(), FbError>

Disconnect from the database
source§

fn drop_database(&mut self, db_handle: &mut isc_db_handle) -> Result<(), FbError>

Drop the database
source§

fn create_database(
    &mut self,
    config: &Self::AttachmentConfig,
    page_size: Option<u32>
) -> Result<isc_db_handle, FbError>

Create the database and attach Returns a database handle on success
source§

impl<T: LinkageMarker> FirebirdClientSqlOps for NativeFbClient<T>

§

type DbHandle = u32

A database handle
§

type TrHandle = u32

A transaction handle
§

type StmtHandle = StmtHandleData

A statement handle
source§

fn begin_transaction(
    &mut self,
    db_handle: &mut Self::DbHandle,
    confs: TransactionConfiguration
) -> Result<Self::TrHandle, FbError>

Start a new transaction, with the specified transaction parameter buffer
source§

fn transaction_operation(
    &mut self,
    tr_handle: &mut Self::TrHandle,
    op: TrOp
) -> Result<(), FbError>

Commit / Rollback a transaction
source§

fn exec_immediate(
    &mut self,
    db_handle: &mut Self::DbHandle,
    tr_handle: &mut Self::TrHandle,
    dialect: Dialect,
    sql: &str
) -> Result<(), FbError>

Execute a sql immediately, without returning rows
source§

fn prepare_statement(
    &mut self,
    db_handle: &mut Self::DbHandle,
    tr_handle: &mut Self::TrHandle,
    dialect: Dialect,
    sql: &str
) -> Result<(StmtType, Self::StmtHandle), FbError>

Allocate and prepare a statement Returns the statement type and handle
source§

fn free_statement(
    &mut self,
    stmt_handle: &mut Self::StmtHandle,
    op: FreeStmtOp
) -> Result<(), FbError>

Closes or drops a statement
source§

fn execute(
    &mut self,
    db_handle: &mut Self::DbHandle,
    tr_handle: &mut Self::TrHandle,
    stmt_handle: &mut Self::StmtHandle,
    params: Vec<SqlType>
) -> Result<usize, FbError>

Execute the prepared statement with parameters and returns the affected rows count
source§

fn fetch(
    &mut self,
    db_handle: &mut Self::DbHandle,
    tr_handle: &mut Self::TrHandle,
    stmt_handle: &mut Self::StmtHandle
) -> Result<Option<Vec<Column>>, FbError>

Fetch rows from the executed statement, coercing the types according to the provided blr
source§

fn execute2(
    &mut self,
    db_handle: &mut Self::DbHandle,
    tr_handle: &mut Self::TrHandle,
    stmt_handle: &mut Self::StmtHandle,
    params: Vec<SqlType>
) -> Result<Vec<Column>, FbError>

Execute the prepared statement with input and output parameters. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for NativeFbClient<T>

§

impl<T> Send for NativeFbClient<T>

§

impl<T> Sync for NativeFbClient<T>where
    <T as LinkageMarker>::L: Sync,

§

impl<T> Unpin for NativeFbClient<T>where
    <T as LinkageMarker>::L: Unpin,

§

impl<T> !UnwindSafe for NativeFbClient<T>

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<Hdl, A> FirebirdClient for Awhere
    A: FirebirdClientDbOps<DbHandle = Hdl> + FirebirdClientSqlOps<DbHandle = Hdl>,
    Hdl: Send,