[][src]Struct rsfbclient::ConnectionBuilder

pub struct ConnectionBuilder<C: FirebirdClient> { /* fields omitted */ }

The default builder for creating database connections

Implementations

impl ConnectionBuilder<NativeFbClient>[src]

pub fn linked() -> Self[src]

Uses the firebird client linked with the application at compile time

pub fn embedded(self) -> ConnectionBuilderEmbedded<NativeFbClient>[src]

Force the embedded server utilization. Host, port and pass will be ignored.

impl<C> ConnectionBuilder<C> where
    C: FirebirdClient + FirebirdClientRemoteAttach<C>, 
[src]

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

Hostname or IP address of the server. Default: localhost

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

TCP Port of the server. Default: 3050

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

Database name or path. Default: test.fdb

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

Username. Default: SYSDBA

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

Password. Default: masterkey

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

SQL Dialect. Default: 3

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

Statement cache size. Default: 20

pub fn connect(&self) -> Result<Connection<C>, FbError>[src]

Open a new connection to the database

Trait Implementations

impl<C> Clone for ConnectionBuilder<C> where
    C: FirebirdClient
[src]

impl<C> Sync for ConnectionBuilder<C> where
    C: FirebirdClient
[src]

The PhantomMarker makes it not Sync, but it is not true, as the ConnectionBuilder does not store C

Auto Trait Implementations

impl<C> RefUnwindSafe for ConnectionBuilder<C> where
    C: RefUnwindSafe,
    <C as FirebirdClient>::Args: RefUnwindSafe

impl<C> Send for ConnectionBuilder<C> where
    <C as FirebirdClient>::Args: Send

impl<C> Unpin for ConnectionBuilder<C> where
    C: Unpin,
    <C as FirebirdClient>::Args: Unpin

impl<C> UnwindSafe for ConnectionBuilder<C> where
    C: UnwindSafe,
    <C as FirebirdClient>::Args: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.