node-firebird 2.3.4 → 2.4.1
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/README.md +574 -20
- package/lib/callback.d.ts +20 -0
- package/lib/callback.js +6 -16
- package/lib/firebird.msg.json +1370 -1370
- package/lib/gdscodes.d.ts +1519 -1520
- package/lib/gdscodes.js +5 -5
- package/lib/ieee754-decimal.d.ts +38 -0
- package/lib/ieee754-decimal.js +71 -118
- package/lib/index.d.ts +37 -338
- package/lib/index.js +97 -86
- package/lib/messages.d.ts +6 -0
- package/lib/messages.js +135 -162
- package/lib/pool.d.ts +23 -0
- package/lib/pool.js +34 -47
- package/lib/srp.d.ts +51 -0
- package/lib/srp.js +62 -72
- package/lib/types.d.ts +375 -0
- package/lib/types.js +22 -0
- package/lib/unix-crypt.d.ts +1 -0
- package/lib/unix-crypt.js +126 -152
- package/lib/utils.d.ts +16 -0
- package/lib/utils.js +24 -48
- package/lib/wire/connection.d.ts +100 -0
- package/lib/wire/connection.js +1029 -1009
- package/lib/wire/const.d.ts +567 -0
- package/lib/wire/const.js +620 -599
- package/lib/wire/database.d.ts +57 -0
- package/lib/wire/database.js +111 -108
- package/lib/wire/eventConnection.d.ts +16 -0
- package/lib/wire/eventConnection.js +29 -31
- package/lib/wire/fbEventManager.d.ts +45 -0
- package/lib/wire/fbEventManager.js +38 -57
- package/lib/wire/serialize.d.ts +97 -0
- package/lib/wire/serialize.js +42 -141
- package/lib/wire/service.d.ts +66 -0
- package/lib/wire/service.js +374 -401
- package/lib/wire/socket.d.ts +59 -0
- package/lib/wire/socket.js +79 -40
- package/lib/wire/statement.d.ts +25 -0
- package/lib/wire/statement.js +13 -9
- package/lib/wire/transaction.d.ts +21 -0
- package/lib/wire/transaction.js +33 -61
- package/lib/wire/xsqlvar.d.ts +175 -0
- package/lib/wire/xsqlvar.js +169 -269
- package/package.json +12 -4
- package/src/callback.ts +55 -0
- package/{poc/node_modules/node-firebird/lib/gdscodes.js → src/gdscodes.ts} +3 -3
- package/{poc/node_modules/node-firebird/lib/ieee754-decimal.js → src/ieee754-decimal.ts} +7 -14
- package/src/index.ts +157 -0
- package/{poc/node_modules/node-firebird/lib/messages.js → src/messages.ts} +163 -162
- package/src/pool.ts +209 -0
- package/{poc/node_modules/node-firebird/lib/srp.js → src/srp.ts} +74 -33
- package/src/types.ts +419 -0
- package/{poc/node_modules/node-firebird/lib/unix-crypt.js → src/unix-crypt.ts} +6 -12
- package/{poc/node_modules/node-firebird/lib/utils.js → src/utils.ts} +11 -20
- package/{poc/node_modules/node-firebird/lib/wire/connection.js → src/wire/connection.ts} +611 -129
- package/{poc/node_modules/node-firebird/lib/wire/const.js → src/wire/const.ts} +96 -9
- package/{poc/node_modules/node-firebird/lib/wire/database.js → src/wire/database.ts} +110 -44
- package/{poc/node_modules/node-firebird/lib/wire/eventConnection.js → src/wire/eventConnection.ts} +29 -14
- package/{poc/node_modules/node-firebird/lib/wire/fbEventManager.js → src/wire/fbEventManager.ts} +39 -30
- package/{poc/node_modules/node-firebird/lib/wire/serialize.js → src/wire/serialize.ts} +78 -59
- package/{poc/node_modules/node-firebird/lib/wire/service.js → src/wire/service.ts} +90 -88
- package/src/wire/socket.ts +262 -0
- package/src/wire/statement.ts +71 -0
- package/{poc/node_modules/node-firebird/lib/wire/transaction.js → src/wire/transaction.ts} +25 -19
- package/{poc/node_modules/node-firebird/lib/wire/xsqlvar.js → src/wire/xsqlvar.ts} +244 -143
- package/.eslintrc.json +0 -12
- package/.github/workflows/codeql.yml +0 -76
- package/.github/workflows/node.js.yml +0 -95
- package/BIGINT_MIGRATION.md +0 -374
- package/CI_DEBUGGING_GUIDE.md +0 -148
- package/ENCRYPTION_CALLBACK.md +0 -152
- package/FIREBIRD_LOG_FEATURE.md +0 -145
- package/MINIMAL_CHANGES_SUMMARY.md +0 -136
- package/PR_SUMMARY.md +0 -96
- package/ROADMAP.md +0 -223
- package/SRP_PROTOCOL.md +0 -482
- package/poc/README.md +0 -160
- package/poc/helpers.js +0 -59
- package/poc/node_modules/.package-lock.json +0 -14
- package/poc/node_modules/node-firebird/.eslintrc.json +0 -12
- package/poc/node_modules/node-firebird/.github/workflows/codeql.yml +0 -76
- package/poc/node_modules/node-firebird/.github/workflows/node.js.yml +0 -95
- package/poc/node_modules/node-firebird/BIGINT_MIGRATION.md +0 -374
- package/poc/node_modules/node-firebird/CI_DEBUGGING_GUIDE.md +0 -148
- package/poc/node_modules/node-firebird/ENCRYPTION_CALLBACK.md +0 -152
- package/poc/node_modules/node-firebird/FIREBIRD_LOG_FEATURE.md +0 -145
- package/poc/node_modules/node-firebird/LICENSE +0 -373
- package/poc/node_modules/node-firebird/MINIMAL_CHANGES_SUMMARY.md +0 -136
- package/poc/node_modules/node-firebird/PR_SUMMARY.md +0 -96
- package/poc/node_modules/node-firebird/README.md +0 -794
- package/poc/node_modules/node-firebird/ROADMAP.md +0 -223
- package/poc/node_modules/node-firebird/SRP_PROTOCOL.md +0 -482
- package/poc/node_modules/node-firebird/lib/callback.js +0 -38
- package/poc/node_modules/node-firebird/lib/gdscodes.d.ts +0 -1524
- package/poc/node_modules/node-firebird/lib/index.d.ts +0 -316
- package/poc/node_modules/node-firebird/lib/index.js +0 -128
- package/poc/node_modules/node-firebird/lib/pool.js +0 -108
- package/poc/node_modules/node-firebird/lib/wire/socket.js +0 -175
- package/poc/node_modules/node-firebird/lib/wire/statement.js +0 -48
- package/poc/node_modules/node-firebird/package.json +0 -38
- package/poc/node_modules/node-firebird/vitest.config.js +0 -24
- package/poc/package-lock.json +0 -21
- package/poc/package.json +0 -12
- package/poc/reproduce-fixed.js +0 -150
- package/poc/reproduce.js +0 -133
- package/vitest.config.js +0 -27
- /package/{poc/node_modules/node-firebird/lib → src}/firebird.msg +0 -0
- /package/{poc/node_modules/node-firebird/lib → src}/firebird.msg.json +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { XdrWriter, BlrWriter } from './serialize';
|
|
2
|
+
import * as srp from '../srp';
|
|
3
|
+
declare function parseValueIfJson(value: any, options: any): any;
|
|
4
|
+
/***************************************
|
|
5
|
+
*
|
|
6
|
+
* Connection
|
|
7
|
+
*
|
|
8
|
+
***************************************/
|
|
9
|
+
declare class Connection {
|
|
10
|
+
static decodeResponse: typeof decodeResponse;
|
|
11
|
+
static fetch_blob_async_transaction: typeof fetch_blob_async_transaction;
|
|
12
|
+
static fetch_blob_async: typeof fetch_blob_async;
|
|
13
|
+
static parseValueIfJson: typeof parseValueIfJson;
|
|
14
|
+
static describe: typeof describe;
|
|
15
|
+
db: any;
|
|
16
|
+
svc: any;
|
|
17
|
+
options: any;
|
|
18
|
+
accept: any;
|
|
19
|
+
error: any;
|
|
20
|
+
dbhandle: number | undefined;
|
|
21
|
+
svchandle: number | undefined;
|
|
22
|
+
clientKeys: srp.KeyPair | undefined;
|
|
23
|
+
serverKeys: {
|
|
24
|
+
salt: string;
|
|
25
|
+
public: bigint;
|
|
26
|
+
pluginName: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
_msg: XdrWriter;
|
|
29
|
+
_blr: BlrWriter;
|
|
30
|
+
_queue: any[];
|
|
31
|
+
_pending: string[];
|
|
32
|
+
_socket: any;
|
|
33
|
+
_xdr: any;
|
|
34
|
+
_isOpened: boolean;
|
|
35
|
+
_isClosed: boolean;
|
|
36
|
+
_isDetach: boolean;
|
|
37
|
+
_isUsed: boolean;
|
|
38
|
+
_pooled: boolean;
|
|
39
|
+
_lowercase_keys: boolean | undefined;
|
|
40
|
+
_detachTimeout: any;
|
|
41
|
+
_detachCallback: any;
|
|
42
|
+
_detachAuto: any;
|
|
43
|
+
_retry_connection_id: any;
|
|
44
|
+
_retry_connection_interval: number;
|
|
45
|
+
_max_cached_query: number;
|
|
46
|
+
_cache_query: Record<string, any> | null;
|
|
47
|
+
_messageFile: string;
|
|
48
|
+
_authStartTime: number | undefined;
|
|
49
|
+
_pendingAccept: any;
|
|
50
|
+
_inlineBlobs: Map<string, Buffer> | undefined;
|
|
51
|
+
constructor(host: string, port: number, callback: any, options: any, db?: any, svc?: any);
|
|
52
|
+
_setcachedquery(query: any, statement: any): void;
|
|
53
|
+
getCachedQuery(query: any): any;
|
|
54
|
+
_rejectPending(err: any): void;
|
|
55
|
+
_bind_events(host: any, port: any, callback: any): void;
|
|
56
|
+
disconnect(): void;
|
|
57
|
+
sendOpContAuth(authData: any, authDataEnc: any, pluginName: any): void;
|
|
58
|
+
sendOpCrypt(encryptPlugin: any): void;
|
|
59
|
+
sendOpCryptKeyCallback(pluginData: any): void;
|
|
60
|
+
_queueEvent(callback: any, defer?: boolean): void;
|
|
61
|
+
connect(options: any, callback: any): void;
|
|
62
|
+
attach(options: any, callback?: any, db?: any): void;
|
|
63
|
+
detach(callback: any): this;
|
|
64
|
+
createDatabase(options: any, callback: any): void;
|
|
65
|
+
dropDatabase(callback: any): void;
|
|
66
|
+
throwClosed(callback: any): this;
|
|
67
|
+
startTransaction(options: any, callback: any): this;
|
|
68
|
+
commit(transaction: any, callback: any): this;
|
|
69
|
+
rollback(transaction: any, callback: any): this;
|
|
70
|
+
commitRetaining(transaction: any, callback: any): this;
|
|
71
|
+
rollbackRetaining(transaction: any, callback: any): this;
|
|
72
|
+
allocateStatement(callback: any): this;
|
|
73
|
+
dropStatement(statement: any, callback: any): this;
|
|
74
|
+
closeStatement(statement: any, callback: any): this;
|
|
75
|
+
allocateAndPrepareStatement(transaction: any, query: any, plan: any, callback: any): void;
|
|
76
|
+
prepare(transaction: any, query: any, plan: any, callback: any): void;
|
|
77
|
+
prepareStatement(transaction: any, statement: any, query: any, plan: any, callback: any): this;
|
|
78
|
+
executeStatement(transaction: any, statement: any, params: any, callback: any, custom: any): this;
|
|
79
|
+
sendExecute(op: number, statement: any, transaction: any, callback: any, parameters?: any[]): void;
|
|
80
|
+
fetch(statement: any, transaction: any, count: any, callback: any): void;
|
|
81
|
+
fetchScroll(statement: any, transaction: any, direction: any, offset: any, count: any, callback: any): void;
|
|
82
|
+
fetchAll(statement: any, transaction: any, callback: any): void;
|
|
83
|
+
openBlob(blob: any, transaction: any, callback: any): void;
|
|
84
|
+
closeBlob(blob: any, callback: any, defer?: boolean): void;
|
|
85
|
+
getSegment(blob: any, callback: any): void;
|
|
86
|
+
createBlob2(transaction: any, callback: any): void;
|
|
87
|
+
batchSegments(blob: any, buffer: any, callback: any): void;
|
|
88
|
+
svcattach(options: any, callback?: any, svc?: any): void;
|
|
89
|
+
svcstart(spbaction: any, callback: any): void;
|
|
90
|
+
svcquery(spbquery: any, resultbuffersize: any, timeout: any, callback: any): void;
|
|
91
|
+
svcdetach(callback: any): void;
|
|
92
|
+
auxConnection(eventid: any, callback: any): this;
|
|
93
|
+
queEvents(events: any, eventid: any, callback: any): this;
|
|
94
|
+
closeEvents(eventid: any, callback: any): this;
|
|
95
|
+
}
|
|
96
|
+
declare function decodeResponse(data: any, callback: any, cnx: any, lowercase_keys: any, cb: (err?: any, obj?: any) => void): any;
|
|
97
|
+
declare function describe(buff: Buffer, statement: any): void;
|
|
98
|
+
declare function fetch_blob_async_transaction(statement: any, id: any, column: any, row: any): (transactionArg: any) => any;
|
|
99
|
+
declare function fetch_blob_async(statement: any, id: any, name: any, row: any): (transaction: any, callback: any) => void;
|
|
100
|
+
export = Connection;
|