[−][src]Trait rsfbclient_core::FirebirdClient
Associated Types
type DbHandle: Send + Clone + Copy
A database handle
type TrHandle: Send + Clone + Copy
A transaction handle
type StmtHandle: Send + Clone + Copy
A statement handle
type Args: Send + Sync + Clone
Arguments to instantiate the client
Required methods
fn new(charset: Charset, args: Self::Args) -> Result<Self, FbError> where
Self: Sized,
Self: Sized,
fn detach_database(&mut self, db_handle: Self::DbHandle) -> Result<(), FbError>
Disconnect from the database
fn drop_database(&mut self, db_handle: Self::DbHandle) -> Result<(), FbError>
Drop the database
fn begin_transaction(
&mut self,
db_handle: Self::DbHandle,
isolation_level: TrIsolationLevel
) -> Result<Self::TrHandle, FbError>
&mut self,
db_handle: Self::DbHandle,
isolation_level: TrIsolationLevel
) -> Result<Self::TrHandle, FbError>
Start a new transaction, with the specified transaction parameter buffer
fn transaction_operation(
&mut self,
tr_handle: Self::TrHandle,
op: TrOp
) -> Result<(), FbError>
&mut self,
tr_handle: Self::TrHandle,
op: TrOp
) -> Result<(), FbError>
Commit / Rollback a transaction
fn exec_immediate(
&mut self,
db_handle: Self::DbHandle,
tr_handle: Self::TrHandle,
dialect: Dialect,
sql: &str
) -> Result<(), FbError>
&mut self,
db_handle: Self::DbHandle,
tr_handle: Self::TrHandle,
dialect: Dialect,
sql: &str
) -> Result<(), FbError>
Execute a sql immediately, without returning rows
fn prepare_statement(
&mut self,
db_handle: Self::DbHandle,
tr_handle: Self::TrHandle,
dialect: Dialect,
sql: &str
) -> Result<(StmtType, Self::StmtHandle), FbError>
&mut self,
db_handle: Self::DbHandle,
tr_handle: Self::TrHandle,
dialect: Dialect,
sql: &str
) -> Result<(StmtType, Self::StmtHandle), FbError>
Alloc and prepare a statement
Returns the statement type and handle
fn free_statement(
&mut self,
stmt_handle: Self::StmtHandle,
op: FreeStmtOp
) -> Result<(), FbError>
&mut self,
stmt_handle: Self::StmtHandle,
op: FreeStmtOp
) -> Result<(), FbError>
Closes or drops a statement
fn execute(
&mut self,
db_handle: Self::DbHandle,
tr_handle: Self::TrHandle,
stmt_handle: Self::StmtHandle,
params: Vec<Param>
) -> Result<(), FbError>
&mut self,
db_handle: Self::DbHandle,
tr_handle: Self::TrHandle,
stmt_handle: Self::StmtHandle,
params: Vec<Param>
) -> Result<(), FbError>
Execute the prepared statement with parameters
fn fetch(
&mut self,
db_handle: Self::DbHandle,
tr_handle: Self::TrHandle,
stmt_handle: Self::StmtHandle
) -> Result<Option<Vec<Column>>, FbError>
&mut self,
db_handle: Self::DbHandle,
tr_handle: Self::TrHandle,
stmt_handle: Self::StmtHandle
) -> Result<Option<Vec<Column>>, FbError>
Fetch rows from the executed statement, coercing the types according to the provided blr