MWA Software is pleased to announce the release of its Firebird Pascal API package (fbintf). This package has been derived from IBX for Lazarus and is part of the IBX2 development (see separate announcement). The intent is to provide common Pascal language bindings to the Firebird API that are independent of the Firebird API version. The IBX derived code is licensed under the Interbase Public License, with the remaining code licensed under the Initial Developer's Public License.
The fbintf package provides the Firebird API in a format where all data types for SQL data, interface parameters and results are native Pascal types, including all parameter blocks and database information. The Pascal API is pitched at a similar level and purpose to the IBPP Firebird API provided to the C++ world. The package is intended to be suitable for use on any platform supported by the Free Pascal Compile, and Delphi Win32. It is a required dependency for version 2 onwards of IBX for Lazarus, and is provided as both a standalone package and as part of IBX2. Latest fixes are available via subversion and as part of the IBX trunk.
It is available for download from:
fbintf1.4-2 1,4,2 |
This package contains the Firebird Pascal Client API. It is included in IBX2 and does not have to be downloaded separately. ... |
Created Size Downloads |
2024-06-03 1.97 MB 320 |
fbintf1.4-2.tar 1.4.2 |
This package contains the Firebird Pascal Client API. It is included in IBX2 and does not have to be downloaded separately. ... |
Created Size Downloads |
2024-06-03 1.87 MB 223 |
Minimum requirements:
- FPC version 3.0.0
- Delphi 2010
The Firebird Pascal API is intended to be simple to use and to place the minimum burden on the API user when it comes to managing the Firebird client library and the various Pascal objects that are created to provide the API. It is implemented as reference counted COM interfaces which, for the API user, are as easy to use as other managed types such as AnsiStrings and dynamic arrays. The user only needs to worry about accessing and using the interface; disposing of interfaces is performed automatically whenever an interface goes out of scope. It is intended to be a full implementation of the Firebird API, including events, services, blobs and arrays.
Two interface implementations are provided. One is for the new Firebird 3 Client API and the other for the legacy Firebird Client API used for Firebird 2.x and earlier. The Firebird 3 API implementation is used whenever possible and the older API only if the Firebird 3 API is not available.
The package is supported by a 141 page User Guide and a comprehensive test suite. The test suite includes 16 separate tests covering 104 individual test objectives. It is console mode and run from a batch script with automatic comparison against a reference results log. It uses the “heaptrc” unit to check for memory leaks. The objective of the test suite is to provide confidence in the correct operation of the software over a variety of platforms and with only expected variances between the two Firebird APIs. It is also intended to be the basis for regression testing. Documentation on the use of the test suite is provided with the package.
Given the level at which the package works and the power of Pascal “interfaces”, embedded SQL statements are possible, such as:
Attachment.ExecuteSQL([isc_tpb_write, isc_tpb_nowait,isc_tpb_concurrency],
'Execute Procedure DELETE_EMPLOYEE ?', [8]);
and
writeln('Employee Count = ',
MyAttachment.OpenCursorAtStart('Select count(*) from EMPLOYEE')[0].AsInteger);
The fbintf package may be used on its own or as part of IBX and has the potential to provide a common Firebird API to all FPC and Delphi database applications.