[][src]Trait rsfbclient_core::FirebirdClientSqlOps

pub trait FirebirdClientSqlOps {
    type DbHandle: Send;
    type TrHandle: Send;
    type StmtHandle: Send;
    pub fn begin_transaction(
        &mut self,
        db_handle: &mut Self::DbHandle,
        isolation_level: TrIsolationLevel
    ) -> Result<Self::TrHandle, FbError>;
pub fn transaction_operation(
        &mut self,
        tr_handle: &mut Self::TrHandle,
        op: TrOp
    ) -> Result<(), FbError>;
pub fn exec_immediate(
        &mut self,
        db_handle: &mut Self::DbHandle,
        tr_handle: &mut Self::TrHandle,
        dialect: Dialect,
        sql: &str
    ) -> Result<(), FbError>;
pub fn prepare_statement(
        &mut self,
        db_handle: &mut Self::DbHandle,
        tr_handle: &mut Self::TrHandle,
        dialect: Dialect,
        sql: &str
    ) -> Result<(StmtType, Self::StmtHandle), FbError>;
pub fn free_statement(
        &mut self,
        stmt_handle: &mut Self::StmtHandle,
        op: FreeStmtOp
    ) -> Result<(), FbError>;
pub fn execute(
        &mut self,
        db_handle: &mut Self::DbHandle,
        tr_handle: &mut Self::TrHandle,
        stmt_handle: &mut Self::StmtHandle,
        params: Vec<SqlType>
    ) -> Result<(), FbError>;
pub 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>;
pub fn fetch(
        &mut self,
        db_handle: &mut Self::DbHandle,
        tr_handle: &mut Self::TrHandle,
        stmt_handle: &mut Self::StmtHandle
    ) -> Result<Option<Vec<Column>>, FbError>; }

Responsible for actual transaction and statement execution

Associated Types

type DbHandle: Send[src]

A database handle

type TrHandle: Send[src]

A transaction handle

type StmtHandle: Send[src]

A statement handle

Loading content...

Required methods

pub fn begin_transaction(
    &mut self,
    db_handle: &mut Self::DbHandle,
    isolation_level: TrIsolationLevel
) -> Result<Self::TrHandle, FbError>
[src]

Start a new transaction, with the specified transaction parameter buffer

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

Commit / Rollback a transaction

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

Execute a sql immediately, without returning rows

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

Allocate and prepare a statement Returns the statement type and handle

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

Closes or drops a statement

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

Execute the prepared statement with parameters

pub 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>
[src]

Execute the prepared statement with input and output parameters.

The output parameters will be returned as in the Result

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

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

Loading content...

Implementors

Loading content...