pub struct PureRustConnectionBuilder(/* private fields */);
Expand description

A builder for a firebird client implemented in pure rust. Does not currently support embedded connections.

Use builder_pure_rust() to obtain a new instance.

Implementations§

source§

impl PureRustConnectionBuilder

source

pub fn connect(&self) -> Result<Connection<RustFbClient>, FbError>

source

pub fn create_database(&self) -> Result<Connection<RustFbClient>, FbError>

source

pub fn user<S: Into<String>>(&mut self, user: S) -> &mut Self

Username. Default: SYSDBA

source

pub fn db_name<S: Into<String>>(&mut self, db_name: S) -> &mut Self

Database name or path. Default: test.fdb

source

pub fn host<S: Into<String>>(&mut self, host: S) -> &mut Self

Hostname or IP address of the server. Default: localhost

source

pub fn port(&mut self, port: u16) -> &mut Self

TCP Port of the server. Default: 3050

source

pub fn pass<S: Into<String>>(&mut self, pass: S) -> &mut Self

Password. Default: masterkey

source

pub fn dialect(&mut self, dialect: Dialect) -> &mut Self

SQL Dialect. Default: 3

source

pub fn stmt_cache_size(&mut self, stmt_cache_size: usize) -> &mut Self

Statement cache size. Default: 20

source

pub fn charset(&mut self, charset: Charset) -> &mut Self

Connection charset. Default: UTF-8

source

pub fn page_size(&mut self, size: u32) -> &mut Self

Database page size. Used on db creation. Default: depends on firebird version

source

pub fn role<S: Into<String>>(&mut self, name: S) -> &mut Self

User role name. Default: empty

source

pub fn no_db_triggers(&mut self) -> &mut Self

Disabled the database triggers

source

pub fn transaction(&mut self, conf: TransactionConfiguration) -> &mut Self

Default transaction configuration

source

pub fn with_transaction<F>(&mut self, builder: F) -> &mut Self

Default transaction configuration builder

source

pub fn from_string(&mut self, s_conn: &str) -> Result<&mut Self, FbError>

Setup the connection using the string pattern.

You can use the others methods(host(),user()…) to config some default values.

Basic string syntax: firebird://{user}:{pass}@{host}:{port}/{db_name}?charset={charset}&dialect={dialect}

Trait Implementations§

source§

impl Clone for PureRustConnectionBuilder

source§

fn clone(&self) -> PureRustConnectionBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for PureRustConnectionBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl FirebirdClientFactory for PureRustConnectionBuilder

§

type C = RustFbClient

source§

fn new_instance(&self) -> Result<Self::C, FbError>

Construct a new instance of a client
source§

fn get_conn_conf( &self ) -> &ConnectionConfiguration<RustFbClientAttachmentConfig>

Pull the connection configuration details out as a borrow
source§

impl From<&PureRustConnectionBuilder> for ConnectionConfiguration<RustFbClientAttachmentConfig>

source§

fn from(arg: &PureRustConnectionBuilder) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

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> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V