fbclient library

Access Firebird databases via libfbclient native client library.

This package implements a wrapper around the new, object-oriented Firebird database access routines. It wraps the versioned interfaces and allows to relatively easy interact with native code from libfbclient on all platforms where libfbclient dynamic library is available. Code using fbclient package should be coupled with actual libfbclient binary from official Firebird distribution. The currently supported libfbclient version is 4.x, so it's best to use the client library from Firebird v4 distribution. See the FbClient class docs for remarks about the exact location of the libfbclient with respect to the final application executable. Also, please refer to the doc/Using_OO_API.html document in the Firebird installation folder for an overview of using the new OO Firebird API.

Classes

FbBlobId
The blob identifier.
FbClient
Encapsulates the native Firebird client library.
FbConsts
Various Firebird constants, extracted from the header files.
FbDec16
A Dart mapping for the FbDec16 native type.
FbDec34
A Dart mapping for the FbDec34 native type.
FbErrorCodes
ISC error codes.
FbI128
FbQuad
A Dart representation of an IscQuad native structure.
IAttachment
IBatch
IBatchCompletionState
IBlob
IConfig
IConfigEntry
IConfigManager
ICryptKeyCallback
IDecFloat16
IDecFloat34
IDisposable
The base for disposable interfaces, i.e. such that can be disposed of when no longer needed by calling the dispose method. They are not the same as reference counted interface, because in refcounted ones calling release does not need to mean an immediate deletion of the interface object, it just decrements the reference count and the actual object is removed from memory when the refcount reaches zero. A disposable interface, on the other hand, gets rid of the object upon calling dispose.
IDtc
IDtcStart
IEventCallback
IEvents
IFirebirdConf
IInt128
IMaster
The master interface, which is an entry point to all other specialized interfaces.
IMessageMetadata
IMetadataBuilder
IOffsetsCallback
IPluginBase
The base interface for all interfaces defining plugins. Allows to build a basic owner-owned relationship.
IPluginConfig
IPluginFactory
IPluginManager
IPluginModule
IPluginSet
IProvider
IReferenceCounted
The base for all reference counted interfaces. Allows to call release when an interface is no longer needed.
IReplicator
IRequest
IResultSet
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.
IService
IStatement
IStatus
Interface wrapping the status of a database operation.
ITimer
ITimerControl
ITransaction
IUtil
IVersionCallback
IVersioned
Basic interface, from which all specialized interfaces descend.
IXpbBuilder
TracingAllocator
A debugging (tracing) native memory allocator.

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.

Properties

mem Allocator
The default allocator used by all parts of fbclient, whenever a native memory needs to be allocated.
getter/setter pair

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

FbBoolean = UnsignedChar
FB_BOOLEAN is just an unsigned char (with 1/0 for true/false).
FbInterface = Pointer<UintPtr>
IscDate = Int32
A mapping for the native IscDate type from the Firebird client library.
IscTime = Uint32
A mapping for the native IscTime type from the Firebird client library.
StatusVec = Pointer<IntPtr>
The status vector, containing errors or warnings.

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.