fbdb 1.0.2 fbdb: ^1.0.2 copied to clipboard
A Firebird SQL database access library for Dart and Flutter.
fbdb examples #
All fbdb examples are split between three subdirectories.
- The
fbdb
directory contains examples for the high-level, Dart-idiomatic API of FbDb:ex_01_simple_select.dart
- shows how to connect to a database, execute aSELECT
statement and fetch the results,ex_02_createdb_dropdb.dart
- shows how to create and drop databases using theFbDb
attachments,ex_03_transactions.dart
- illustrates transaction handling,ex_04_fetching.dart
- shows different methods of fetching rows from the query result set,ex_05_blobs.dart
- shows how to handle BLOB data,ex_06_output_params.dart
- shows how to obtain results from a stored procedure that is not selectable, i.e. returns its results via output parameters,ex_07_affected_rows.dart
- shows how to check how many rows have been affected by a DML query,ex_08_multiple_connections.dart
- shows how to open multiple concurrent connections in FbDb,ex_09_lock_wait.dart
- illustrates the difference between wait and no wait transactions and the role of the lock timeout parameter,ex_10_errors.dart
- shows how to detect and handle errors reported by the server,ex_11_mem_benchmark.dart
- strictly speaking it'snot an example, but a simple memory usage benchmark, using a customTracingAllocator
to record all allocations and releases of native memory blocks (including the background worker isolate).
- The
interfaces
directory contains some examples for the low-level API, i.e. the direct FFI bindings to the Firebird client library interfaces. Those are mainly re-implementations of the C++ examples, distributed together with the Firebird server (usually available in theexamples/interfaces
subdirectory of the Firebird root directory). The examples re-implemented in fbdb are:ex_01_create.dart
(an equivalent of01.create.cpp
from the Firebird examples) - shows how to create a new database using theIAttachment
interface,ex_02_update.dart
(an equivalent of02.update.cpp
from the Firebird examples) - shows how to executeUPDATE
queries, both with and without prepared statements,ex_03_select.dart
(an equivalent of03.select.cpp
from Firebird examples) - demonstrates simpleSELECT
statements with cursors and row fetching,ex_04_print_table.dart
(an equivalent of04.print_table.cpp
from the Firebird examples) - displays all tables from the database by querying a system table,ex_07_blob.dart
(an equivalent of07.blob.cpp
from the Firebird examples) - shows how to handle both writing and reading of BLOBs,ex_09_service.dart
(an equivalent of09.service.cpp
from the Firebird examples) - shows how to communicate with the service manager to obtain database information,ex_10_backup.dart
(an equivalent of10.backup.cpp
from the Firebird examples) - shows how to use services manager to make a backup of a database.
- The
tutorial
directory contains the complete source code and project files for the FbDb Tutorial application.