You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`transaction.commit(function(err))` commit current transaction
141
142
-`transaction.rollback(function(err))` rollback current transaction
142
143
144
+
### Statement options
145
+
146
+
```js
147
+
constoptions= {
148
+
timeout:1000, // Statement timeout in ms, default is 0 (no timeout)
149
+
}
150
+
```
151
+
143
152
## Examples
144
153
145
154
### Parametrized Queries
@@ -683,6 +692,29 @@ Firebird.attach({
683
692
- Working with DECFLOAT values as strings or Buffers to preserve exact precision
684
693
685
694
For legacy Firebird 4 servers with SRP authentication only, use the following configuration in `firebird.conf`:
695
+
Firebird 4 wire protocol (versions 16 and 17) is partially supported, including:
696
+
-**Time Zone Support**: Native support for `TIME WITH TIME ZONE` and `TIMESTAMP WITH TIME ZONE` (Protocol 16+).
697
+
-**INT128 support**: Native support for 128-bit integers.
698
+
-**Statement Timeout**: Support for statement-level timeouts.
699
+
700
+
#### Using Timezones (FB 4.0+)
701
+
702
+
Columns of type `TIMESTAMP WITH TIME ZONE` and `TIME WITH TIME ZONE` are automatically mapped to JavaScript `Date` objects. Values are read as UTC and represented in the local timezone of the Node.js process.
703
+
704
+
```js
705
+
// Select timezone columns
706
+
db.query('SELECT TS_TZ_COL, T_TZ_COL FROM FB4_TABLE', function(err, result) {
707
+
console.log(result[0].ts_tz_col); // JavaScript Date object
708
+
});
709
+
710
+
// Insert using Date objects
711
+
db.query('INSERT INTO FB4_TABLE (TS_TZ_COL) VALUES (?)', [newDate()], function(err) {
712
+
// ...
713
+
});
714
+
```
715
+
716
+
Srp256 authentication and wire encryption are now supported natively,
717
+
so you only need the following minimal configuration in `firebird.conf`:
@@ -27,8 +29,6 @@ Firebird 3 introduced Protocol 13, which brought significant changes focusing on
27
29
-**UTF-8 User Identification:** ✅ Implemented - all user identification is properly handled with UTF-8 encoding via `isc_dpb_utf8_filename` flag for Firebird 3+.
28
30
-**Database Encryption Callback:** ✅ Implemented - support for database encryption key callback (`op_crypt_key_callback`) during the connect phase, allowing connections to encrypted databases. The `dbCryptConfig` connection option supports both plain text and base64-encoded encryption keys.
29
31
30
-
The following features are planned for future implementation:
31
-
32
32
## Firebird 4 Support
33
33
34
34
Firebird 4 introduced Protocol versions 16 and 17, continuing to build upon the foundation of Firebird 3. The following features have been implemented:
@@ -44,23 +44,33 @@ The following features are planned for future implementation:
44
44
-**Statement Timeouts:** Implement support for setting maximum execution times for SQL statements at the wire protocol level (Protocol 16 feature).
45
45
-**Time Zone Data Types:** Add support for TIMESTAMP WITH TIME ZONE and TIME WITH TIME ZONE types.
46
46
-**Full IEEE 754 DECFLOAT Support:** Implement proper IEEE 754 Decimal64 and Decimal128 encoding/decoding for DECFLOAT types (currently uses simplified implementation).
47
+
-**Protocol Versions 16 and 17:** ✅ Protocol 16 Implemented - support for statement timeout, INT128, and timezones. 🚧 Protocol 17 Missing.
48
+
-**Statement Timeout:** ✅ Implemented - support for `op_execute` with statement timeout (Protocol 16+).
49
+
-**`INT128` Data Type:** ✅ Implemented - support for 128-bit integer data type.
50
+
-**Time Zone Support:** ✅ Implemented - support for `TIME WITH TIME ZONE`, `TIMESTAMP WITH TIME ZONE`, and `sessionTimeZone` connection option (Protocol 16+).
51
+
-**`DECFLOAT` Data Type:** ❌ TODO - support for `DECFLOAT(16)` and `DECFLOAT(34)`.
47
52
48
53
## Firebird 5 Support
49
54
50
-
Firebird 5 introduces a host of new SQL features and performance improvements that will require significant client-side implementation:
55
+
Firebird 5 introduces Protocol version 18 and a host of new SQL features and performance improvements:
56
+
57
+
-**Protocol Version 18:** ❌ TODO - implement the latest protocol version.
58
+
-**Bidirectional Cursors:** ❌ TODO - implement support for scrollable cursors for remote database access.
59
+
-**`RETURNING` Multiple Rows:** ❌ TODO - enhance DML operations to support returning multiple rows.
60
+
-**`SKIP LOCKED`:** ❌ TODO - add support for the `SKIP LOCKED` clause in `SELECT WITH LOCK`, `UPDATE`, and `DELETE` statements.
61
+
-**Parallel Workers Information:** ❌ TODO - support for parallel workers information in SQL information items.
51
62
52
-
-**Bidirectional Cursors:** Implement support for scrollable cursors for remote database access.
53
-
-**`RETURNING` Multiple Rows:** Enhance DML operations to support returning multiple rows.
54
-
-**`SKIP LOCKED`:** Add support for the `SKIP LOCKED` clause in `SELECT WITH LOCK`, `UPDATE`, and `DELETE` statements.
55
-
-**New Data Types and Functions:** Add support for new built-in functions and packages.
56
63
57
64
## Firebird 6 and Beyond
58
65
59
66
As Firebird 6 and future versions are released, we will continue to monitor new features and plan for their implementation. Key areas of interest include:
60
67
61
-
-**JSON Support:** Implement client-side support for the new SQL-compliant JSON functions.
62
-
-**Tablespaces:** Add support for tablespaces.
63
-
-**SQL Schemas:** Implement support for SQL schemas.
68
+
-**Native `JSON` Data Type:** Implement support for the new native `JSON` type (often handled as optimized binary storage).
69
+
-**SQL-Standard `ROW` Type:** Support for structured data types (records) as columns or variables.
70
+
-**SQL-Compliant JSON Functions:** Implement client-side support for `JSON_VALUE`, `JSON_QUERY`, `JSON_EXISTS`, and `JSON_OBJECT`.
71
+
-**Tablespaces:** Add support for tablespaces to control physical storage locations.
72
+
-**SQL Schemas:** Implement support for SQL-standard schemas for better namespace organization.
73
+
-**Enhanced Collation Support:** Support for collations defined directly as part of the data type declaration.
0 commit comments