Rust Firebird Client
// To use the offcial ('native') Firebird client .dll/.so/.dylib // (needs to find dll at build time) rsfbclient::builder_native().with_dyn_link() // Or using dynamic loading rsfbclient::builder_native().with_dyn_load("/my/firebird/here/lib/libfbclient.so") // Or using the pure rust implementation rsfbclient::builder_pure_rust()
// For a remote server, using a dynamically linked native client let mut conn = rsfbclient::builder_native() .with_dyn_link() .with_remote() .host("my.host.com.br") .db_name("awesome.fdb") .connect()? // Or if you need a embedded/local only access let mut conn = rsfbclient::builder_native() .with_dyn_link() .with_embedded() .db_name("/path/to/awesome.fdb") .connect()?
You also can choose a string connection configuration
// Using the native Firebird client rsfbclient::builder_native() .from_string("firebird://SYSDBA:email@example.com:3050/awesome.fdb?charset=ascii") // Or using the pure rust implementation rsfbclient::builder_pure_rust() .from_string("firebird://SYSDBA:firstname.lastname@example.org:3050/awesome.fdb?charset=ascii")
let rows = conn.query_iter("select col_a, col_b, col_c from test", ())?; ...
Sometimes you will need store the Connection and Transaction types into a struct field without care about Firebird Client variation. To do this, you can use the SimpleConnection and SimpleTransaction types.
To use, you only need use the From trait, calling the
into() method. Example:
let mut conn: SimpleConnection = rsfbclient::builder_native() .with_dyn_link() .with_remote() .host("my.host.com.br") .db_name("awesome.fdb") .connect()? .into();
All features can be used at the same time if needed.
Will use the dynamic library of the official
fbclient at runtime and compiletime. Used in systems where there is already a firebird client installed and configured.
Can find the official
fbclient native library by path at runtime, does not need the library at compiletime. Useful when you need to build in a system without a firebird client installed.
Uses a pure rust implementation of the firebird wire protocol, does not need the native library at all. Useful for cross-compilation and allow a single binary to be deployed without needing to install the firebird client.
A connection to a firebird database
Generic aggregate of configuration data for firebird db Connections The data required for forming connections is partly client-implementation-dependent
A builder for a client using the official ('native') Firebird dll.
A builder for a firebird client implemented in pure rust. Does not currently support embedded connections.
A database row
A connection API without client types
A transaction API without client types
Firebird sql dialect
Sql parameter / column data
Implemented for types that can be used to execute sql statements
A generic factory for creating multiple preconfigured instances of a particular client implementation Intended mainly for use by connection pool
Implemented for types that represents a list of values of columns
Implemented for types that can be sent as parameters
Types with an associated boolean flag function,
Implemented for types that can be used to execute sql queries
Infos about the server, database, engine...
Get a new instance of NativeConnectionBuilder
Get a new instance of PureRustConnectionBuilder