Packages
efirebirdsql
0.6.3
0.9.15
0.9.14
0.9.13
0.9.12
0.9.11
0.9.10
0.9.9
0.9.8
0.9.7
0.9.6
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
0.8.5
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.0
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.10
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.0
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.4
0.1.3
0.1.2
0.1.1
Firebird Client
Current section
Files
Jump to
Current section
Files
efirebirdsql
README.rst
README.rst
=============
efirebirdsql
=============
Erlang Firebird client library.
Examples
-----------
Simple query and fetch all results::
{ok, C} = efirebirdsql:connect(
"server", "username", "password", "/path/to/database", []),
ok = efirebirdsql:execute(C, <<"select * from foo">>),
{ok, Results} = efirebirdsql:fetchall(C).
Fetch one by one::
ok = efirebirdsql:execute(C, <<"select * from foo">>),
{ok, R1} = efirebirdsql:fetchone(C),
{ok, R2} = efirebirdsql:fetchone(C),
{ok, R3} = efirebirdsql:fetchone(C).
Separate start_link() and connect()::
C = start_link(),
ok = efirebirdsql:connect(C,
"server", "username", "password", "/path/to/database", []),
Commit and rollback transaction::
{ok, C} = efirebirdsql:connect(
"server", "username", "password", "/path/to/database", [{auto_commit, false}]),
ok = efirebirdsql:execute(C, <<"update foo set column='A'">>),
ok = efirebirdsql:commit(),
ok = efirebirdsql:execute(C, <<"update foo set column='B'">>),
ok = efirebirdsql:rollback().
See also test/efirebirdsql_tests.erl
Available connect option parameters
-----------------------------------
.. csv-table::
:header: Name,Comment,Default,Note
port, Port number, 3050
auto_commit, Autocommit flag, true
auth_plugin, Authentication plugin name, \"Srp\", Firebird 3.0+
wire_crypt, Wire encryptio flag, true, Firebird 3.0+