node-firebird 2.14.1 → 2.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +98 -0
- package/lib/index.js +102 -1
- package/lib/wire/xsqlvar.js +20 -16
- package/package.json +1 -2
- package/src/index.ts +100 -0
- package/src/wire/xsqlvar.ts +20 -16
package/lib/index.d.ts
CHANGED
|
@@ -25,6 +25,104 @@ export declare const ISOLATION_REPEATABLE_READ: number[];
|
|
|
25
25
|
*/
|
|
26
26
|
export declare const ISOLATION_SERIALIZABLE: number[];
|
|
27
27
|
export declare const ISOLATION_READ_COMMITTED_READ_ONLY: number[];
|
|
28
|
+
export declare const isc_dpb_version1: number;
|
|
29
|
+
export declare const isc_dpb_version2: number;
|
|
30
|
+
export declare const isc_dpb_cdd_pathname: number;
|
|
31
|
+
export declare const isc_dpb_allocation: number;
|
|
32
|
+
export declare const isc_dpb_journal: number;
|
|
33
|
+
export declare const isc_dpb_page_size: number;
|
|
34
|
+
export declare const isc_dpb_num_buffers: number;
|
|
35
|
+
export declare const isc_dpb_buffer_length: number;
|
|
36
|
+
export declare const isc_dpb_debug: number;
|
|
37
|
+
export declare const isc_dpb_garbage_collect: number;
|
|
38
|
+
export declare const isc_dpb_verify: number;
|
|
39
|
+
export declare const isc_dpb_sweep: number;
|
|
40
|
+
export declare const isc_dpb_enable_journal: number;
|
|
41
|
+
export declare const isc_dpb_disable_journal: number;
|
|
42
|
+
export declare const isc_dpb_dbkey_scope: number;
|
|
43
|
+
export declare const isc_dpb_number_of_users: number;
|
|
44
|
+
export declare const isc_dpb_trace: number;
|
|
45
|
+
export declare const isc_dpb_no_garbage_collect: number;
|
|
46
|
+
export declare const isc_dpb_damaged: number;
|
|
47
|
+
export declare const isc_dpb_license: number;
|
|
48
|
+
export declare const isc_dpb_sys_user_name: number;
|
|
49
|
+
export declare const isc_dpb_encrypt_key: number;
|
|
50
|
+
export declare const isc_dpb_activate_shadow: number;
|
|
51
|
+
export declare const isc_dpb_sweep_interval: number;
|
|
52
|
+
export declare const isc_dpb_delete_shadow: number;
|
|
53
|
+
export declare const isc_dpb_force_write: number;
|
|
54
|
+
export declare const isc_dpb_begin_log: number;
|
|
55
|
+
export declare const isc_dpb_quit_log: number;
|
|
56
|
+
export declare const isc_dpb_no_reserve: number;
|
|
57
|
+
export declare const isc_dpb_user_name: number;
|
|
58
|
+
export declare const isc_dpb_password: number;
|
|
59
|
+
export declare const isc_dpb_password_enc: number;
|
|
60
|
+
export declare const isc_dpb_sys_user_name_enc: number;
|
|
61
|
+
export declare const isc_dpb_interp: number;
|
|
62
|
+
export declare const isc_dpb_online_dump: number;
|
|
63
|
+
export declare const isc_dpb_old_file_size: number;
|
|
64
|
+
export declare const isc_dpb_old_num_files: number;
|
|
65
|
+
export declare const isc_dpb_old_file: number;
|
|
66
|
+
export declare const isc_dpb_old_start_page: number;
|
|
67
|
+
export declare const isc_dpb_old_start_seqno: number;
|
|
68
|
+
export declare const isc_dpb_old_start_file: number;
|
|
69
|
+
export declare const isc_dpb_old_dump_id: number;
|
|
70
|
+
export declare const isc_dpb_lc_messages: number;
|
|
71
|
+
export declare const isc_dpb_lc_ctype: number;
|
|
72
|
+
export declare const isc_dpb_cache_manager: number;
|
|
73
|
+
export declare const isc_dpb_shutdown: number;
|
|
74
|
+
export declare const isc_dpb_online: number;
|
|
75
|
+
export declare const isc_dpb_shutdown_delay: number;
|
|
76
|
+
export declare const isc_dpb_reserved: number;
|
|
77
|
+
export declare const isc_dpb_overwrite: number;
|
|
78
|
+
export declare const isc_dpb_sec_attach: number;
|
|
79
|
+
export declare const isc_dpb_connect_timeout: number;
|
|
80
|
+
export declare const isc_dpb_dummy_packet_interval: number;
|
|
81
|
+
export declare const isc_dpb_gbak_attach: number;
|
|
82
|
+
export declare const isc_dpb_sql_role_name: number;
|
|
83
|
+
export declare const isc_dpb_set_page_buffers: number;
|
|
84
|
+
export declare const isc_dpb_working_directory: number;
|
|
85
|
+
export declare const isc_dpb_sql_dialect: number;
|
|
86
|
+
export declare const isc_dpb_set_db_readonly: number;
|
|
87
|
+
export declare const isc_dpb_set_db_sql_dialect: number;
|
|
88
|
+
export declare const isc_dpb_gfix_attach: number;
|
|
89
|
+
export declare const isc_dpb_gstat_attach: number;
|
|
90
|
+
export declare const isc_dpb_set_db_charset: number;
|
|
91
|
+
export declare const isc_dpb_gsec_attach: number;
|
|
92
|
+
export declare const isc_dpb_address_path: number;
|
|
93
|
+
export declare const isc_dpb_process_id: number;
|
|
94
|
+
export declare const isc_dpb_no_db_triggers: number;
|
|
95
|
+
export declare const isc_dpb_trusted_auth: number;
|
|
96
|
+
export declare const isc_dpb_process_name: number;
|
|
97
|
+
export declare const isc_dpb_trusted_role: number;
|
|
98
|
+
export declare const isc_dpb_org_filename: number;
|
|
99
|
+
export declare const isc_dpb_utf8_filename: number;
|
|
100
|
+
export declare const isc_dpb_ext_call_depth: number;
|
|
101
|
+
export declare const isc_dpb_auth_block: number;
|
|
102
|
+
export declare const isc_dpb_client_version: number;
|
|
103
|
+
export declare const isc_dpb_remote_protocol: number;
|
|
104
|
+
export declare const isc_dpb_host_name: number;
|
|
105
|
+
export declare const isc_dpb_os_user: number;
|
|
106
|
+
export declare const isc_dpb_specific_auth_data: number;
|
|
107
|
+
export declare const isc_dpb_auth_plugin_list: number;
|
|
108
|
+
export declare const isc_dpb_auth_plugin_name: number;
|
|
109
|
+
export declare const isc_dpb_config: number;
|
|
110
|
+
export declare const isc_dpb_nolinger: number;
|
|
111
|
+
export declare const isc_dpb_reset_icu: number;
|
|
112
|
+
export declare const isc_dpb_map_attach: number;
|
|
113
|
+
export declare const isc_dpb_session_time_zone: number;
|
|
114
|
+
export declare const isc_dpb_set_db_replica: number;
|
|
115
|
+
export declare const isc_dpb_set_bind: number;
|
|
116
|
+
export declare const isc_dpb_decfloat_round: number;
|
|
117
|
+
export declare const isc_dpb_decfloat_traps: number;
|
|
118
|
+
export declare const isc_dpb_clear_map: number;
|
|
119
|
+
export declare const isc_dpb_upgrade_db: number;
|
|
120
|
+
export declare const isc_dpb_parallel_workers: number;
|
|
121
|
+
export declare const isc_dpb_worker_attach: number;
|
|
122
|
+
export declare const isc_dpb_owner: number;
|
|
123
|
+
export declare const isc_dpb_max_blob_cache_size: number;
|
|
124
|
+
export declare const isc_dpb_max_inline_blob_size: number;
|
|
125
|
+
export declare const isc_dpb_search_path: number;
|
|
28
126
|
export declare const escape: typeof escapeValue;
|
|
29
127
|
/**
|
|
30
128
|
* Firebird SQL type codes, as seen in `column.type` inside a `typeCast`
|
package/lib/index.js
CHANGED
|
@@ -17,7 +17,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
20
|
+
exports.isc_dpb_old_num_files = exports.isc_dpb_old_file_size = exports.isc_dpb_online_dump = exports.isc_dpb_interp = exports.isc_dpb_sys_user_name_enc = exports.isc_dpb_password_enc = exports.isc_dpb_password = exports.isc_dpb_user_name = exports.isc_dpb_no_reserve = exports.isc_dpb_quit_log = exports.isc_dpb_begin_log = exports.isc_dpb_force_write = exports.isc_dpb_delete_shadow = exports.isc_dpb_sweep_interval = exports.isc_dpb_activate_shadow = exports.isc_dpb_encrypt_key = exports.isc_dpb_sys_user_name = exports.isc_dpb_license = exports.isc_dpb_damaged = exports.isc_dpb_no_garbage_collect = exports.isc_dpb_trace = exports.isc_dpb_number_of_users = exports.isc_dpb_dbkey_scope = exports.isc_dpb_disable_journal = exports.isc_dpb_enable_journal = exports.isc_dpb_sweep = exports.isc_dpb_verify = exports.isc_dpb_garbage_collect = exports.isc_dpb_debug = exports.isc_dpb_buffer_length = exports.isc_dpb_num_buffers = exports.isc_dpb_page_size = exports.isc_dpb_journal = exports.isc_dpb_allocation = exports.isc_dpb_cdd_pathname = exports.isc_dpb_version2 = exports.isc_dpb_version1 = exports.ISOLATION_READ_COMMITTED_READ_ONLY = exports.ISOLATION_SERIALIZABLE = exports.ISOLATION_REPEATABLE_READ = exports.ISOLATION_READ_COMMITTED = exports.ISOLATION_READ_UNCOMMITTED = exports.WIRE_CRYPT_ENABLE = exports.WIRE_CRYPT_DISABLE = exports.AUTH_PLUGIN_SRP512 = exports.AUTH_PLUGIN_SRP384 = exports.AUTH_PLUGIN_SRP256 = exports.AUTH_PLUGIN_SRP = exports.AUTH_PLUGIN_LEGACY = exports.GDSCode = void 0;
|
|
21
|
+
exports.isc_dpb_set_db_replica = exports.isc_dpb_session_time_zone = exports.isc_dpb_map_attach = exports.isc_dpb_reset_icu = exports.isc_dpb_nolinger = exports.isc_dpb_config = exports.isc_dpb_auth_plugin_name = exports.isc_dpb_auth_plugin_list = exports.isc_dpb_specific_auth_data = exports.isc_dpb_os_user = exports.isc_dpb_host_name = exports.isc_dpb_remote_protocol = exports.isc_dpb_client_version = exports.isc_dpb_auth_block = exports.isc_dpb_ext_call_depth = exports.isc_dpb_utf8_filename = exports.isc_dpb_org_filename = exports.isc_dpb_trusted_role = exports.isc_dpb_process_name = exports.isc_dpb_trusted_auth = exports.isc_dpb_no_db_triggers = exports.isc_dpb_process_id = exports.isc_dpb_address_path = exports.isc_dpb_gsec_attach = exports.isc_dpb_set_db_charset = exports.isc_dpb_gstat_attach = exports.isc_dpb_gfix_attach = exports.isc_dpb_set_db_sql_dialect = exports.isc_dpb_set_db_readonly = exports.isc_dpb_sql_dialect = exports.isc_dpb_working_directory = exports.isc_dpb_set_page_buffers = exports.isc_dpb_sql_role_name = exports.isc_dpb_gbak_attach = exports.isc_dpb_dummy_packet_interval = exports.isc_dpb_connect_timeout = exports.isc_dpb_sec_attach = exports.isc_dpb_overwrite = exports.isc_dpb_reserved = exports.isc_dpb_shutdown_delay = exports.isc_dpb_online = exports.isc_dpb_shutdown = exports.isc_dpb_cache_manager = exports.isc_dpb_lc_ctype = exports.isc_dpb_lc_messages = exports.isc_dpb_old_dump_id = exports.isc_dpb_old_start_file = exports.isc_dpb_old_start_seqno = exports.isc_dpb_old_start_page = exports.isc_dpb_old_file = void 0;
|
|
22
|
+
exports.parseNamedPlaceholders = exports.parseConnectionString = exports.parseConnectionUri = exports.connection = exports.SQL_TYPES = exports.escape = exports.isc_dpb_search_path = exports.isc_dpb_max_inline_blob_size = exports.isc_dpb_max_blob_cache_size = exports.isc_dpb_owner = exports.isc_dpb_worker_attach = exports.isc_dpb_parallel_workers = exports.isc_dpb_upgrade_db = exports.isc_dpb_clear_map = exports.isc_dpb_decfloat_traps = exports.isc_dpb_decfloat_round = exports.isc_dpb_set_bind = void 0;
|
|
21
23
|
exports.attach = attach;
|
|
22
24
|
exports.drop = drop;
|
|
23
25
|
exports.create = create;
|
|
@@ -64,6 +66,105 @@ exports.ISOLATION_REPEATABLE_READ = const_1.default.ISOLATION_REPEATABLE_READ;
|
|
|
64
66
|
*/
|
|
65
67
|
exports.ISOLATION_SERIALIZABLE = const_1.default.ISOLATION_SERIALIZABLE;
|
|
66
68
|
exports.ISOLATION_READ_COMMITTED_READ_ONLY = const_1.default.ISOLATION_READ_COMMITTED_READ_ONLY;
|
|
69
|
+
// Database Parameter Buffer (DPB) constants
|
|
70
|
+
exports.isc_dpb_version1 = const_1.default.isc_dpb_version1;
|
|
71
|
+
exports.isc_dpb_version2 = const_1.default.isc_dpb_version2;
|
|
72
|
+
exports.isc_dpb_cdd_pathname = const_1.default.isc_dpb_cdd_pathname;
|
|
73
|
+
exports.isc_dpb_allocation = const_1.default.isc_dpb_allocation;
|
|
74
|
+
exports.isc_dpb_journal = const_1.default.isc_dpb_journal;
|
|
75
|
+
exports.isc_dpb_page_size = const_1.default.isc_dpb_page_size;
|
|
76
|
+
exports.isc_dpb_num_buffers = const_1.default.isc_dpb_num_buffers;
|
|
77
|
+
exports.isc_dpb_buffer_length = const_1.default.isc_dpb_buffer_length;
|
|
78
|
+
exports.isc_dpb_debug = const_1.default.isc_dpb_debug;
|
|
79
|
+
exports.isc_dpb_garbage_collect = const_1.default.isc_dpb_garbage_collect;
|
|
80
|
+
exports.isc_dpb_verify = const_1.default.isc_dpb_verify;
|
|
81
|
+
exports.isc_dpb_sweep = const_1.default.isc_dpb_sweep;
|
|
82
|
+
exports.isc_dpb_enable_journal = const_1.default.isc_dpb_enable_journal;
|
|
83
|
+
exports.isc_dpb_disable_journal = const_1.default.isc_dpb_disable_journal;
|
|
84
|
+
exports.isc_dpb_dbkey_scope = const_1.default.isc_dpb_dbkey_scope;
|
|
85
|
+
exports.isc_dpb_number_of_users = const_1.default.isc_dpb_number_of_users;
|
|
86
|
+
exports.isc_dpb_trace = const_1.default.isc_dpb_trace;
|
|
87
|
+
exports.isc_dpb_no_garbage_collect = const_1.default.isc_dpb_no_garbage_collect;
|
|
88
|
+
exports.isc_dpb_damaged = const_1.default.isc_dpb_damaged;
|
|
89
|
+
exports.isc_dpb_license = const_1.default.isc_dpb_license;
|
|
90
|
+
exports.isc_dpb_sys_user_name = const_1.default.isc_dpb_sys_user_name;
|
|
91
|
+
exports.isc_dpb_encrypt_key = const_1.default.isc_dpb_encrypt_key;
|
|
92
|
+
exports.isc_dpb_activate_shadow = const_1.default.isc_dpb_activate_shadow;
|
|
93
|
+
exports.isc_dpb_sweep_interval = const_1.default.isc_dpb_sweep_interval;
|
|
94
|
+
exports.isc_dpb_delete_shadow = const_1.default.isc_dpb_delete_shadow;
|
|
95
|
+
exports.isc_dpb_force_write = const_1.default.isc_dpb_force_write;
|
|
96
|
+
exports.isc_dpb_begin_log = const_1.default.isc_dpb_begin_log;
|
|
97
|
+
exports.isc_dpb_quit_log = const_1.default.isc_dpb_quit_log;
|
|
98
|
+
exports.isc_dpb_no_reserve = const_1.default.isc_dpb_no_reserve;
|
|
99
|
+
exports.isc_dpb_user_name = const_1.default.isc_dpb_user_name;
|
|
100
|
+
exports.isc_dpb_password = const_1.default.isc_dpb_password;
|
|
101
|
+
exports.isc_dpb_password_enc = const_1.default.isc_dpb_password_enc;
|
|
102
|
+
exports.isc_dpb_sys_user_name_enc = const_1.default.isc_dpb_sys_user_name_enc;
|
|
103
|
+
exports.isc_dpb_interp = const_1.default.isc_dpb_interp;
|
|
104
|
+
exports.isc_dpb_online_dump = const_1.default.isc_dpb_online_dump;
|
|
105
|
+
exports.isc_dpb_old_file_size = const_1.default.isc_dpb_old_file_size;
|
|
106
|
+
exports.isc_dpb_old_num_files = const_1.default.isc_dpb_old_num_files;
|
|
107
|
+
exports.isc_dpb_old_file = const_1.default.isc_dpb_old_file;
|
|
108
|
+
exports.isc_dpb_old_start_page = const_1.default.isc_dpb_old_start_page;
|
|
109
|
+
exports.isc_dpb_old_start_seqno = const_1.default.isc_dpb_old_start_seqno;
|
|
110
|
+
exports.isc_dpb_old_start_file = const_1.default.isc_dpb_old_start_file;
|
|
111
|
+
exports.isc_dpb_old_dump_id = const_1.default.isc_dpb_old_dump_id;
|
|
112
|
+
exports.isc_dpb_lc_messages = const_1.default.isc_dpb_lc_messages;
|
|
113
|
+
exports.isc_dpb_lc_ctype = const_1.default.isc_dpb_lc_ctype;
|
|
114
|
+
exports.isc_dpb_cache_manager = const_1.default.isc_dpb_cache_manager;
|
|
115
|
+
exports.isc_dpb_shutdown = const_1.default.isc_dpb_shutdown;
|
|
116
|
+
exports.isc_dpb_online = const_1.default.isc_dpb_online;
|
|
117
|
+
exports.isc_dpb_shutdown_delay = const_1.default.isc_dpb_shutdown_delay;
|
|
118
|
+
exports.isc_dpb_reserved = const_1.default.isc_dpb_reserved;
|
|
119
|
+
exports.isc_dpb_overwrite = const_1.default.isc_dpb_overwrite;
|
|
120
|
+
exports.isc_dpb_sec_attach = const_1.default.isc_dpb_sec_attach;
|
|
121
|
+
exports.isc_dpb_connect_timeout = const_1.default.isc_dpb_connect_timeout;
|
|
122
|
+
exports.isc_dpb_dummy_packet_interval = const_1.default.isc_dpb_dummy_packet_interval;
|
|
123
|
+
exports.isc_dpb_gbak_attach = const_1.default.isc_dpb_gbak_attach;
|
|
124
|
+
exports.isc_dpb_sql_role_name = const_1.default.isc_dpb_sql_role_name;
|
|
125
|
+
exports.isc_dpb_set_page_buffers = const_1.default.isc_dpb_set_page_buffers;
|
|
126
|
+
exports.isc_dpb_working_directory = const_1.default.isc_dpb_working_directory;
|
|
127
|
+
exports.isc_dpb_sql_dialect = const_1.default.isc_dpb_sql_dialect;
|
|
128
|
+
exports.isc_dpb_set_db_readonly = const_1.default.isc_dpb_set_db_readonly;
|
|
129
|
+
exports.isc_dpb_set_db_sql_dialect = const_1.default.isc_dpb_set_db_sql_dialect;
|
|
130
|
+
exports.isc_dpb_gfix_attach = const_1.default.isc_dpb_gfix_attach;
|
|
131
|
+
exports.isc_dpb_gstat_attach = const_1.default.isc_dpb_gstat_attach;
|
|
132
|
+
exports.isc_dpb_set_db_charset = const_1.default.isc_dpb_set_db_charset;
|
|
133
|
+
exports.isc_dpb_gsec_attach = const_1.default.isc_dpb_gsec_attach;
|
|
134
|
+
exports.isc_dpb_address_path = const_1.default.isc_dpb_address_path;
|
|
135
|
+
exports.isc_dpb_process_id = const_1.default.isc_dpb_process_id;
|
|
136
|
+
exports.isc_dpb_no_db_triggers = const_1.default.isc_dpb_no_db_triggers;
|
|
137
|
+
exports.isc_dpb_trusted_auth = const_1.default.isc_dpb_trusted_auth;
|
|
138
|
+
exports.isc_dpb_process_name = const_1.default.isc_dpb_process_name;
|
|
139
|
+
exports.isc_dpb_trusted_role = const_1.default.isc_dpb_trusted_role;
|
|
140
|
+
exports.isc_dpb_org_filename = const_1.default.isc_dpb_org_filename;
|
|
141
|
+
exports.isc_dpb_utf8_filename = const_1.default.isc_dpb_utf8_filename;
|
|
142
|
+
exports.isc_dpb_ext_call_depth = const_1.default.isc_dpb_ext_call_depth;
|
|
143
|
+
exports.isc_dpb_auth_block = const_1.default.isc_dpb_auth_block;
|
|
144
|
+
exports.isc_dpb_client_version = const_1.default.isc_dpb_client_version;
|
|
145
|
+
exports.isc_dpb_remote_protocol = const_1.default.isc_dpb_remote_protocol;
|
|
146
|
+
exports.isc_dpb_host_name = const_1.default.isc_dpb_host_name;
|
|
147
|
+
exports.isc_dpb_os_user = const_1.default.isc_dpb_os_user;
|
|
148
|
+
exports.isc_dpb_specific_auth_data = const_1.default.isc_dpb_specific_auth_data;
|
|
149
|
+
exports.isc_dpb_auth_plugin_list = const_1.default.isc_dpb_auth_plugin_list;
|
|
150
|
+
exports.isc_dpb_auth_plugin_name = const_1.default.isc_dpb_auth_plugin_name;
|
|
151
|
+
exports.isc_dpb_config = const_1.default.isc_dpb_config;
|
|
152
|
+
exports.isc_dpb_nolinger = const_1.default.isc_dpb_nolinger;
|
|
153
|
+
exports.isc_dpb_reset_icu = const_1.default.isc_dpb_reset_icu;
|
|
154
|
+
exports.isc_dpb_map_attach = const_1.default.isc_dpb_map_attach;
|
|
155
|
+
exports.isc_dpb_session_time_zone = const_1.default.isc_dpb_session_time_zone;
|
|
156
|
+
exports.isc_dpb_set_db_replica = const_1.default.isc_dpb_set_db_replica;
|
|
157
|
+
exports.isc_dpb_set_bind = const_1.default.isc_dpb_set_bind;
|
|
158
|
+
exports.isc_dpb_decfloat_round = const_1.default.isc_dpb_decfloat_round;
|
|
159
|
+
exports.isc_dpb_decfloat_traps = const_1.default.isc_dpb_decfloat_traps;
|
|
160
|
+
exports.isc_dpb_clear_map = const_1.default.isc_dpb_clear_map;
|
|
161
|
+
exports.isc_dpb_upgrade_db = const_1.default.isc_dpb_upgrade_db;
|
|
162
|
+
exports.isc_dpb_parallel_workers = const_1.default.isc_dpb_parallel_workers;
|
|
163
|
+
exports.isc_dpb_worker_attach = const_1.default.isc_dpb_worker_attach;
|
|
164
|
+
exports.isc_dpb_owner = const_1.default.isc_dpb_owner;
|
|
165
|
+
exports.isc_dpb_max_blob_cache_size = const_1.default.isc_dpb_max_blob_cache_size;
|
|
166
|
+
exports.isc_dpb_max_inline_blob_size = const_1.default.isc_dpb_max_inline_blob_size;
|
|
167
|
+
exports.isc_dpb_search_path = const_1.default.isc_dpb_search_path;
|
|
67
168
|
exports.escape = utils_1.escape;
|
|
68
169
|
/**
|
|
69
170
|
* Firebird SQL type codes, as seen in `column.type` inside a `typeCast`
|
package/lib/wire/xsqlvar.js
CHANGED
|
@@ -637,10 +637,11 @@ class SQLVarTimeTz extends SQLVarBase {
|
|
|
637
637
|
var time = data.readUInt();
|
|
638
638
|
data.readInt(); // skip timezone info
|
|
639
639
|
if (!lowerV13 || !data.readInt()) {
|
|
640
|
-
//
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
640
|
+
// The wire value is already a UTC instant. Construct from epoch milliseconds:
|
|
641
|
+
// Date's constructor is UTC-based, whereas setMilliseconds() is a *local-time*
|
|
642
|
+
// setter, so rolling forward from new Date(0) across a DST boundary shifts the
|
|
643
|
+
// result by the DST delta (see the regression tests in test/timezone.js).
|
|
644
|
+
return new Date(Math.floor(time / 10));
|
|
644
645
|
}
|
|
645
646
|
return null;
|
|
646
647
|
}
|
|
@@ -656,10 +657,11 @@ class SQLVarTimeTzEx extends SQLVarTimeTz {
|
|
|
656
657
|
data.readInt(); // skip timezone info
|
|
657
658
|
data.readInt(); // skip ext_offset
|
|
658
659
|
if (!lowerV13 || !data.readInt()) {
|
|
659
|
-
//
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
660
|
+
// The wire value is already a UTC instant. Construct from epoch milliseconds:
|
|
661
|
+
// Date's constructor is UTC-based, whereas setMilliseconds() is a *local-time*
|
|
662
|
+
// setter, so rolling forward from new Date(0) across a DST boundary shifts the
|
|
663
|
+
// result by the DST delta (see the regression tests in test/timezone.js).
|
|
664
|
+
return new Date(Math.floor(time / 10));
|
|
663
665
|
}
|
|
664
666
|
return null;
|
|
665
667
|
}
|
|
@@ -675,10 +677,11 @@ class SQLVarTimeStampTz extends SQLVarBase {
|
|
|
675
677
|
var time = data.readUInt();
|
|
676
678
|
data.readInt(); // skip timezone info
|
|
677
679
|
if (!lowerV13 || !data.readInt()) {
|
|
678
|
-
//
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
680
|
+
// The wire value is already a UTC instant. Construct from epoch milliseconds:
|
|
681
|
+
// Date's constructor is UTC-based, whereas setMilliseconds() is a *local-time*
|
|
682
|
+
// setter, so rolling forward from new Date(0) across a DST boundary shifts the
|
|
683
|
+
// result by the DST delta (see the regression tests in test/timezone.js).
|
|
684
|
+
return new Date((date - DateOffset) * TimeCoeff + Math.floor(time / 10));
|
|
682
685
|
}
|
|
683
686
|
return null;
|
|
684
687
|
}
|
|
@@ -695,10 +698,11 @@ class SQLVarTimeStampTzEx extends SQLVarTimeStampTz {
|
|
|
695
698
|
data.readInt(); // skip timezone info
|
|
696
699
|
data.readInt(); // skip ext_offset
|
|
697
700
|
if (!lowerV13 || !data.readInt()) {
|
|
698
|
-
//
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
701
|
+
// The wire value is already a UTC instant. Construct from epoch milliseconds:
|
|
702
|
+
// Date's constructor is UTC-based, whereas setMilliseconds() is a *local-time*
|
|
703
|
+
// setter, so rolling forward from new Date(0) across a DST boundary shifts the
|
|
704
|
+
// result by the DST delta (see the regression tests in test/timezone.js).
|
|
705
|
+
return new Date((date - DateOffset) * TimeCoeff + Math.floor(time / 10));
|
|
702
706
|
}
|
|
703
707
|
return null;
|
|
704
708
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-firebird",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.2",
|
|
4
4
|
"description": "Pure JavaScript and Asynchronous Firebird client for Node.js.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"firebird",
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/node": "^26.1.1",
|
|
59
|
-
"coveralls-next": "^6.0.1",
|
|
60
59
|
"oxlint": "^0.15.11",
|
|
61
60
|
"typescript": "^7.0.2",
|
|
62
61
|
"vitest": "^4.0.18"
|
package/src/index.ts
CHANGED
|
@@ -48,6 +48,106 @@ export const ISOLATION_REPEATABLE_READ: number[] = Const.ISOLATION_REPEATABLE_RE
|
|
|
48
48
|
export const ISOLATION_SERIALIZABLE: number[] = Const.ISOLATION_SERIALIZABLE;
|
|
49
49
|
export const ISOLATION_READ_COMMITTED_READ_ONLY: number[] = Const.ISOLATION_READ_COMMITTED_READ_ONLY;
|
|
50
50
|
|
|
51
|
+
// Database Parameter Buffer (DPB) constants
|
|
52
|
+
export const isc_dpb_version1: number = Const.isc_dpb_version1;
|
|
53
|
+
export const isc_dpb_version2: number = Const.isc_dpb_version2;
|
|
54
|
+
export const isc_dpb_cdd_pathname: number = Const.isc_dpb_cdd_pathname;
|
|
55
|
+
export const isc_dpb_allocation: number = Const.isc_dpb_allocation;
|
|
56
|
+
export const isc_dpb_journal: number = Const.isc_dpb_journal;
|
|
57
|
+
export const isc_dpb_page_size: number = Const.isc_dpb_page_size;
|
|
58
|
+
export const isc_dpb_num_buffers: number = Const.isc_dpb_num_buffers;
|
|
59
|
+
export const isc_dpb_buffer_length: number = Const.isc_dpb_buffer_length;
|
|
60
|
+
export const isc_dpb_debug: number = Const.isc_dpb_debug;
|
|
61
|
+
export const isc_dpb_garbage_collect: number = Const.isc_dpb_garbage_collect;
|
|
62
|
+
export const isc_dpb_verify: number = Const.isc_dpb_verify;
|
|
63
|
+
export const isc_dpb_sweep: number = Const.isc_dpb_sweep;
|
|
64
|
+
export const isc_dpb_enable_journal: number = Const.isc_dpb_enable_journal;
|
|
65
|
+
export const isc_dpb_disable_journal: number = Const.isc_dpb_disable_journal;
|
|
66
|
+
export const isc_dpb_dbkey_scope: number = Const.isc_dpb_dbkey_scope;
|
|
67
|
+
export const isc_dpb_number_of_users: number = Const.isc_dpb_number_of_users;
|
|
68
|
+
export const isc_dpb_trace: number = Const.isc_dpb_trace;
|
|
69
|
+
export const isc_dpb_no_garbage_collect: number = Const.isc_dpb_no_garbage_collect;
|
|
70
|
+
export const isc_dpb_damaged: number = Const.isc_dpb_damaged;
|
|
71
|
+
export const isc_dpb_license: number = Const.isc_dpb_license;
|
|
72
|
+
export const isc_dpb_sys_user_name: number = Const.isc_dpb_sys_user_name;
|
|
73
|
+
export const isc_dpb_encrypt_key: number = Const.isc_dpb_encrypt_key;
|
|
74
|
+
export const isc_dpb_activate_shadow: number = Const.isc_dpb_activate_shadow;
|
|
75
|
+
export const isc_dpb_sweep_interval: number = Const.isc_dpb_sweep_interval;
|
|
76
|
+
export const isc_dpb_delete_shadow: number = Const.isc_dpb_delete_shadow;
|
|
77
|
+
export const isc_dpb_force_write: number = Const.isc_dpb_force_write;
|
|
78
|
+
export const isc_dpb_begin_log: number = Const.isc_dpb_begin_log;
|
|
79
|
+
export const isc_dpb_quit_log: number = Const.isc_dpb_quit_log;
|
|
80
|
+
export const isc_dpb_no_reserve: number = Const.isc_dpb_no_reserve;
|
|
81
|
+
export const isc_dpb_user_name: number = Const.isc_dpb_user_name;
|
|
82
|
+
export const isc_dpb_password: number = Const.isc_dpb_password;
|
|
83
|
+
export const isc_dpb_password_enc: number = Const.isc_dpb_password_enc;
|
|
84
|
+
export const isc_dpb_sys_user_name_enc: number = Const.isc_dpb_sys_user_name_enc;
|
|
85
|
+
export const isc_dpb_interp: number = Const.isc_dpb_interp;
|
|
86
|
+
export const isc_dpb_online_dump: number = Const.isc_dpb_online_dump;
|
|
87
|
+
export const isc_dpb_old_file_size: number = Const.isc_dpb_old_file_size;
|
|
88
|
+
export const isc_dpb_old_num_files: number = Const.isc_dpb_old_num_files;
|
|
89
|
+
export const isc_dpb_old_file: number = Const.isc_dpb_old_file;
|
|
90
|
+
export const isc_dpb_old_start_page: number = Const.isc_dpb_old_start_page;
|
|
91
|
+
export const isc_dpb_old_start_seqno: number = Const.isc_dpb_old_start_seqno;
|
|
92
|
+
export const isc_dpb_old_start_file: number = Const.isc_dpb_old_start_file;
|
|
93
|
+
export const isc_dpb_old_dump_id: number = Const.isc_dpb_old_dump_id;
|
|
94
|
+
export const isc_dpb_lc_messages: number = Const.isc_dpb_lc_messages;
|
|
95
|
+
export const isc_dpb_lc_ctype: number = Const.isc_dpb_lc_ctype;
|
|
96
|
+
export const isc_dpb_cache_manager: number = Const.isc_dpb_cache_manager;
|
|
97
|
+
export const isc_dpb_shutdown: number = Const.isc_dpb_shutdown;
|
|
98
|
+
export const isc_dpb_online: number = Const.isc_dpb_online;
|
|
99
|
+
export const isc_dpb_shutdown_delay: number = Const.isc_dpb_shutdown_delay;
|
|
100
|
+
export const isc_dpb_reserved: number = Const.isc_dpb_reserved;
|
|
101
|
+
export const isc_dpb_overwrite: number = Const.isc_dpb_overwrite;
|
|
102
|
+
export const isc_dpb_sec_attach: number = Const.isc_dpb_sec_attach;
|
|
103
|
+
export const isc_dpb_connect_timeout: number = Const.isc_dpb_connect_timeout;
|
|
104
|
+
export const isc_dpb_dummy_packet_interval: number = Const.isc_dpb_dummy_packet_interval;
|
|
105
|
+
export const isc_dpb_gbak_attach: number = Const.isc_dpb_gbak_attach;
|
|
106
|
+
export const isc_dpb_sql_role_name: number = Const.isc_dpb_sql_role_name;
|
|
107
|
+
export const isc_dpb_set_page_buffers: number = Const.isc_dpb_set_page_buffers;
|
|
108
|
+
export const isc_dpb_working_directory: number = Const.isc_dpb_working_directory;
|
|
109
|
+
export const isc_dpb_sql_dialect: number = Const.isc_dpb_sql_dialect;
|
|
110
|
+
export const isc_dpb_set_db_readonly: number = Const.isc_dpb_set_db_readonly;
|
|
111
|
+
export const isc_dpb_set_db_sql_dialect: number = Const.isc_dpb_set_db_sql_dialect;
|
|
112
|
+
export const isc_dpb_gfix_attach: number = Const.isc_dpb_gfix_attach;
|
|
113
|
+
export const isc_dpb_gstat_attach: number = Const.isc_dpb_gstat_attach;
|
|
114
|
+
export const isc_dpb_set_db_charset: number = Const.isc_dpb_set_db_charset;
|
|
115
|
+
export const isc_dpb_gsec_attach: number = Const.isc_dpb_gsec_attach;
|
|
116
|
+
export const isc_dpb_address_path: number = Const.isc_dpb_address_path;
|
|
117
|
+
export const isc_dpb_process_id: number = Const.isc_dpb_process_id;
|
|
118
|
+
export const isc_dpb_no_db_triggers: number = Const.isc_dpb_no_db_triggers;
|
|
119
|
+
export const isc_dpb_trusted_auth: number = Const.isc_dpb_trusted_auth;
|
|
120
|
+
export const isc_dpb_process_name: number = Const.isc_dpb_process_name;
|
|
121
|
+
export const isc_dpb_trusted_role: number = Const.isc_dpb_trusted_role;
|
|
122
|
+
export const isc_dpb_org_filename: number = Const.isc_dpb_org_filename;
|
|
123
|
+
export const isc_dpb_utf8_filename: number = Const.isc_dpb_utf8_filename;
|
|
124
|
+
export const isc_dpb_ext_call_depth: number = Const.isc_dpb_ext_call_depth;
|
|
125
|
+
export const isc_dpb_auth_block: number = Const.isc_dpb_auth_block;
|
|
126
|
+
export const isc_dpb_client_version: number = Const.isc_dpb_client_version;
|
|
127
|
+
export const isc_dpb_remote_protocol: number = Const.isc_dpb_remote_protocol;
|
|
128
|
+
export const isc_dpb_host_name: number = Const.isc_dpb_host_name;
|
|
129
|
+
export const isc_dpb_os_user: number = Const.isc_dpb_os_user;
|
|
130
|
+
export const isc_dpb_specific_auth_data: number = Const.isc_dpb_specific_auth_data;
|
|
131
|
+
export const isc_dpb_auth_plugin_list: number = Const.isc_dpb_auth_plugin_list;
|
|
132
|
+
export const isc_dpb_auth_plugin_name: number = Const.isc_dpb_auth_plugin_name;
|
|
133
|
+
export const isc_dpb_config: number = Const.isc_dpb_config;
|
|
134
|
+
export const isc_dpb_nolinger: number = Const.isc_dpb_nolinger;
|
|
135
|
+
export const isc_dpb_reset_icu: number = Const.isc_dpb_reset_icu;
|
|
136
|
+
export const isc_dpb_map_attach: number = Const.isc_dpb_map_attach;
|
|
137
|
+
export const isc_dpb_session_time_zone: number = Const.isc_dpb_session_time_zone;
|
|
138
|
+
export const isc_dpb_set_db_replica: number = Const.isc_dpb_set_db_replica;
|
|
139
|
+
export const isc_dpb_set_bind: number = Const.isc_dpb_set_bind;
|
|
140
|
+
export const isc_dpb_decfloat_round: number = Const.isc_dpb_decfloat_round;
|
|
141
|
+
export const isc_dpb_decfloat_traps: number = Const.isc_dpb_decfloat_traps;
|
|
142
|
+
export const isc_dpb_clear_map: number = Const.isc_dpb_clear_map;
|
|
143
|
+
export const isc_dpb_upgrade_db: number = Const.isc_dpb_upgrade_db;
|
|
144
|
+
export const isc_dpb_parallel_workers: number = Const.isc_dpb_parallel_workers;
|
|
145
|
+
export const isc_dpb_worker_attach: number = Const.isc_dpb_worker_attach;
|
|
146
|
+
export const isc_dpb_owner: number = Const.isc_dpb_owner;
|
|
147
|
+
export const isc_dpb_max_blob_cache_size: number = Const.isc_dpb_max_blob_cache_size;
|
|
148
|
+
export const isc_dpb_max_inline_blob_size: number = Const.isc_dpb_max_inline_blob_size;
|
|
149
|
+
export const isc_dpb_search_path: number = Const.isc_dpb_search_path;
|
|
150
|
+
|
|
51
151
|
export const escape = escapeValue;
|
|
52
152
|
|
|
53
153
|
/**
|
package/src/wire/xsqlvar.ts
CHANGED
|
@@ -750,10 +750,11 @@ export class SQLVarTimeTz extends SQLVarBase {
|
|
|
750
750
|
data.readInt(); // skip timezone info
|
|
751
751
|
|
|
752
752
|
if (!lowerV13 || !data.readInt()) {
|
|
753
|
-
//
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
753
|
+
// The wire value is already a UTC instant. Construct from epoch milliseconds:
|
|
754
|
+
// Date's constructor is UTC-based, whereas setMilliseconds() is a *local-time*
|
|
755
|
+
// setter, so rolling forward from new Date(0) across a DST boundary shifts the
|
|
756
|
+
// result by the DST delta (see the regression tests in test/timezone.js).
|
|
757
|
+
return new Date(Math.floor(time / 10));
|
|
757
758
|
}
|
|
758
759
|
return null;
|
|
759
760
|
}
|
|
@@ -772,10 +773,11 @@ export class SQLVarTimeTzEx extends SQLVarTimeTz {
|
|
|
772
773
|
data.readInt(); // skip ext_offset
|
|
773
774
|
|
|
774
775
|
if (!lowerV13 || !data.readInt()) {
|
|
775
|
-
//
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
776
|
+
// The wire value is already a UTC instant. Construct from epoch milliseconds:
|
|
777
|
+
// Date's constructor is UTC-based, whereas setMilliseconds() is a *local-time*
|
|
778
|
+
// setter, so rolling forward from new Date(0) across a DST boundary shifts the
|
|
779
|
+
// result by the DST delta (see the regression tests in test/timezone.js).
|
|
780
|
+
return new Date(Math.floor(time / 10));
|
|
779
781
|
}
|
|
780
782
|
return null;
|
|
781
783
|
}
|
|
@@ -794,10 +796,11 @@ export class SQLVarTimeStampTz extends SQLVarBase {
|
|
|
794
796
|
data.readInt(); // skip timezone info
|
|
795
797
|
|
|
796
798
|
if (!lowerV13 || !data.readInt()) {
|
|
797
|
-
//
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
799
|
+
// The wire value is already a UTC instant. Construct from epoch milliseconds:
|
|
800
|
+
// Date's constructor is UTC-based, whereas setMilliseconds() is a *local-time*
|
|
801
|
+
// setter, so rolling forward from new Date(0) across a DST boundary shifts the
|
|
802
|
+
// result by the DST delta (see the regression tests in test/timezone.js).
|
|
803
|
+
return new Date((date - DateOffset) * TimeCoeff + Math.floor(time / 10));
|
|
801
804
|
}
|
|
802
805
|
|
|
803
806
|
return null;
|
|
@@ -818,10 +821,11 @@ export class SQLVarTimeStampTzEx extends SQLVarTimeStampTz {
|
|
|
818
821
|
data.readInt(); // skip ext_offset
|
|
819
822
|
|
|
820
823
|
if (!lowerV13 || !data.readInt()) {
|
|
821
|
-
//
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
824
|
+
// The wire value is already a UTC instant. Construct from epoch milliseconds:
|
|
825
|
+
// Date's constructor is UTC-based, whereas setMilliseconds() is a *local-time*
|
|
826
|
+
// setter, so rolling forward from new Date(0) across a DST boundary shifts the
|
|
827
|
+
// result by the DST delta (see the regression tests in test/timezone.js).
|
|
828
|
+
return new Date((date - DateOffset) * TimeCoeff + Math.floor(time / 10));
|
|
825
829
|
}
|
|
826
830
|
|
|
827
831
|
return null;
|