fbdb library
Access Firebird databases via libfbclient native client library.
This package implements a wrapper around the new, object-oriented Firebird database access routines. It exposes a high-level, Dart-oriented API, based on asynchronous processing, streams and isolates. Under the hood, it uses the low-level Firebird interfaces via FFI.
Classes
- FbBlobId
- The blob identifier.
- FbConsts
- Various Firebird constants, extracted from the header files.
- FbDb
- Represents a database connection.
- FbDec16
- A Dart mapping for the FbDec16 native type.
- FbDec34
- A Dart mapping for the FbDec34 native type.
- FbErrorCodes
- ISC error codes.
- FbFieldDef
- The definition of a table field in the database.
- FbI128
- FbOptions
- Database connection options.
- FbQuad
- A Dart representation of an IscQuad native structure.
- FbQuery
- The database query object.
- FbTransaction
- IscQuad
- This structure is byte-compatible with the native IscQuad structure.
- IscTimestamp
- A Dart mapping for the native IscTimestamp structure.
- IscTimestampTz
- A Dart mapping for the native IscTimestampTz structure.
- IscTimestampTzEx
- A Dart mapping for the native IscTimestampTzEx structure.
- IscTimeTz
- A Dart mapping for the native IscTimeTz structure.
- IscTimeTzEx
- A Dart mapping for the native IscTimeTzEx structure.
- TracingAllocator
- A debugging (tracing) native memory allocator.
Enums
- FbFieldType
- Supported field types.
- FbRowFormat
- The format in which a query is supposed to return subsequent data rows.
- FbTrFlag
- Transaction flags.
Extensions
- DoubleBytes on double
- An extension to simplify writing / reading doubles to / from native memory.
- DoubleMem on double
- Simplifies writing / reading doubles to / from native memory.
- IntBytes on int
- Allows to convert an int value to a byte buffer.
- IntMem on int
- Extension to simplify writing / reading integers to / from native memory.
-
MemCopy
on Pointer<
NativeType> - A general extension, allowing to copy arbitrary blocks of native memory to / from Dart memory, as well as between native buffers.
-
PointerArithmetic
on Pointer<
NativeType> - An extension implementing pointer arithmetic on native pointers.
-
ReadWriteData
on Pointer<
Uint8> - Extension on byte buffers, allowing to read and write pieces of the buffers as specific data types (numbers, strings, etc.).
- StringMem on String
- Simplifies writing / reading strings to / from native memory.
Constants
-
fbTrRead
→ const Set<
FbTrFlag> - Default flags for read-only transaction.
-
fbTrWriteNoWait
→ const Set<
FbTrFlag> - Default flags for writing transaction not waiting on locks.
-
fbTrWriteWait
→ const Set<
FbTrFlag> - Default flags for writing transaction waiting on locks.
-
fbTypeMap
→ const Map<
int, FbFieldType> - Mappings between actual Firebird type codes and FbDb supported types.
Properties
Functions
-
byteCountForInt(
int value) → int -
Determine the minimum number of bytes required to represent
value
as a native signed int. Returns 1, 2, 4 or 8. -
byteCountForUint(
int value) → int -
Determine the minimum number of bytes required to represent
value
as a native unsigned int. Returns 1, 2, 4 or 8. -
fromBytesAsFloat(
Uint8List bytes) → double - Convert a list of bytes to floating point value.
-
fromBytesAsSigned(
Uint8List bytes) → int - Convert a list of bytes to an int value.
-
fromBytesAsUnsigned(
Uint8List bytes) → int - Convert a list of bytes to an int value.
-
readFromBufferAsFloat(
Pointer< Uint8> buffer, int offset, int byteCnt) → double - Read a specified piece of the buffer and convert it to a floating point number.
-
readFromBufferAsSigned(
Pointer< Uint8> buffer, int offset, int byteCnt) → int - Read a specified piece of the buffer and convert it to an integer number (signed).
-
readFromBufferAsString(
Pointer< Uint8> buffer, int offset, [int? byteCnt, bool allowMalformed = true]) → String - Read a specified piece of the buffer and convert it to a string, interpreting the bytes as UTF-8.
-
readFromBufferAsUnsigned(
Pointer< Uint8> buffer, int offset, int byteCnt) → int - Read a specified piece of the buffer and convert it to an integer number (unsigned).
Typedefs
Exceptions / Errors
- FbClientException
- Base exception class of the fbdb package.
- FbServerException
- Encapsulates the Firebird status vector and error message.
- FbStatusException
- An exception with status vector inside.
- MemException
- Base exception class for all memory related exceptions.