@zerodep-dev/easy-query-ts-hana 0.0.0-stage → 0.1.0
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 +10 -3
- package/dist/.tsbuildinfo +1 -0
- package/dist/functions.d.ts +21 -0
- package/dist/functions.d.ts.map +1 -0
- package/dist/functions.js +41 -0
- package/dist/functions.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +229 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -3
- package/src/functions.ts +41 -0
- package/src/hdb.d.ts +31 -0
- package/src/index.ts +254 -0
package/README.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# @zerodep-dev/easy-query-ts-hana
|
|
2
|
+
|
|
3
|
+
SAP HANA 适配器(`hdb`,纯 JS 驱动,peer 依赖),HANA 2.0;含全文检索。
|
|
4
|
+
|
|
5
|
+
easy-query 的 TypeScript 版([kenconnet666/easy-query](https://github.com/kenconnet666/easy-query) 的 `ts/`):实体 + 导航、lambda 里写条件、隐式 join 与子查询、对象树结果,结果类型全由 TS 推导,不需要代码生成。
|
|
6
|
+
|
|
7
|
+
需要同时安装核心包 `@zerodep-dev/easy-query-ts`。
|
|
8
|
+
|
|
9
|
+
- 总览与各特性文档:https://github.com/kenconnet666/easy-query/tree/main/docs/fork
|
|
10
|
+
- 许可证:Apache-2.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"7.0.2","root":[[85,87]],"packageJsons":["../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/package.json","../../../node_modules/.pnpm/hdb@2.30.1/node_modules/hdb/package.json","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/package.json","../../core/package.json","../package.json"],"missingPackageJsons":["../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/assert/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/assert/strict/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/async_hooks/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/buffer/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/child_process/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/cluster/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/console/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/constants/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/crypto/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/dgram/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/diagnostics_channel/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/dns/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/dns/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/domain/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/events/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/fs/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/fs/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/http/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/http2/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/https/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/inspector/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/inspector/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/module/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/net/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/assert/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/compatibility/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/dns/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/fs/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/readline/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/stream/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/timers/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/web-globals/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/os/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/path/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/path/posix/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/path/win32/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/perf_hooks/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/process/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/punycode/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/querystring/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/readline/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/readline/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/repl/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/stream/consumers/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/stream/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/stream/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/stream/web/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/string_decoder/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/timers/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/timers/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/tls/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/trace_events/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/tty/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/url/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/util/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/util/types/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/v8/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/vm/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/wasi/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/worker_threads/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/zlib/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/assert/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/assert/strict/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/async_hooks/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/buffer/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/child_process/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/cluster/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/console/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/constants/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/crypto/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/dgram/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/diagnostics_channel/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/dns/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/dns/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/domain/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/events/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/fs/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/fs/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/http/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/http2/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/https/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/inspector/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/inspector/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/module/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/net/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/os/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/path/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/path/posix/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/path/win32/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/perf_hooks/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/process/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/punycode/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/querystring/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/readline/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/readline/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/repl/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/stream/consumers/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/stream/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/stream/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/stream/web/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/string_decoder/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/timers/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/timers/promises/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/tls/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/trace_events/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/tty/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/url/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/util/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/util/types/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/v8/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/vm/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/wasi/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/worker_threads/package.json","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/zlib/package.json","../../../node_modules/.pnpm/node_modules/@types/assert/package.json","../../../node_modules/.pnpm/node_modules/@types/assert/strict/package.json","../../../node_modules/.pnpm/node_modules/@types/async_hooks/package.json","../../../node_modules/.pnpm/node_modules/@types/buffer/package.json","../../../node_modules/.pnpm/node_modules/@types/child_process/package.json","../../../node_modules/.pnpm/node_modules/@types/cluster/package.json","../../../node_modules/.pnpm/node_modules/@types/console/package.json","../../../node_modules/.pnpm/node_modules/@types/constants/package.json","../../../node_modules/.pnpm/node_modules/@types/crypto/package.json","../../../node_modules/.pnpm/node_modules/@types/dgram/package.json","../../../node_modules/.pnpm/node_modules/@types/diagnostics_channel/package.json","../../../node_modules/.pnpm/node_modules/@types/dns/package.json","../../../node_modules/.pnpm/node_modules/@types/dns/promises/package.json","../../../node_modules/.pnpm/node_modules/@types/domain/package.json","../../../node_modules/.pnpm/node_modules/@types/events/package.json","../../../node_modules/.pnpm/node_modules/@types/fs/package.json","../../../node_modules/.pnpm/node_modules/@types/fs/promises/package.json","../../../node_modules/.pnpm/node_modules/@types/http/package.json","../../../node_modules/.pnpm/node_modules/@types/http2/package.json","../../../node_modules/.pnpm/node_modules/@types/https/package.json","../../../node_modules/.pnpm/node_modules/@types/inspector/package.json","../../../node_modules/.pnpm/node_modules/@types/inspector/promises/package.json","../../../node_modules/.pnpm/node_modules/@types/module/package.json","../../../node_modules/.pnpm/node_modules/@types/net/package.json","../../../node_modules/.pnpm/node_modules/@types/os/package.json","../../../node_modules/.pnpm/node_modules/@types/path/package.json","../../../node_modules/.pnpm/node_modules/@types/path/posix/package.json","../../../node_modules/.pnpm/node_modules/@types/path/win32/package.json","../../../node_modules/.pnpm/node_modules/@types/perf_hooks/package.json","../../../node_modules/.pnpm/node_modules/@types/process/package.json","../../../node_modules/.pnpm/node_modules/@types/punycode/package.json","../../../node_modules/.pnpm/node_modules/@types/querystring/package.json","../../../node_modules/.pnpm/node_modules/@types/readline/package.json","../../../node_modules/.pnpm/node_modules/@types/readline/promises/package.json","../../../node_modules/.pnpm/node_modules/@types/repl/package.json","../../../node_modules/.pnpm/node_modules/@types/stream/consumers/package.json","../../../node_modules/.pnpm/node_modules/@types/stream/package.json","../../../node_modules/.pnpm/node_modules/@types/stream/promises/package.json","../../../node_modules/.pnpm/node_modules/@types/stream/web/package.json","../../../node_modules/.pnpm/node_modules/@types/string_decoder/package.json","../../../node_modules/.pnpm/node_modules/@types/timers/package.json","../../../node_modules/.pnpm/node_modules/@types/timers/promises/package.json","../../../node_modules/.pnpm/node_modules/@types/tls/package.json","../../../node_modules/.pnpm/node_modules/@types/trace_events/package.json","../../../node_modules/.pnpm/node_modules/@types/tty/package.json","../../../node_modules/.pnpm/node_modules/@types/url/package.json","../../../node_modules/.pnpm/node_modules/@types/util/package.json","../../../node_modules/.pnpm/node_modules/@types/util/types/package.json","../../../node_modules/.pnpm/node_modules/@types/v8/package.json","../../../node_modules/.pnpm/node_modules/@types/vm/package.json","../../../node_modules/.pnpm/node_modules/@types/wasi/package.json","../../../node_modules/.pnpm/node_modules/@types/worker_threads/package.json","../../../node_modules/.pnpm/node_modules/@types/zlib/package.json","../../../node_modules/.pnpm/node_modules/assert/package.json","../../../node_modules/.pnpm/node_modules/assert/strict/package.json","../../../node_modules/.pnpm/node_modules/async_hooks/package.json","../../../node_modules/.pnpm/node_modules/buffer/package.json","../../../node_modules/.pnpm/node_modules/child_process/package.json","../../../node_modules/.pnpm/node_modules/cluster/package.json","../../../node_modules/.pnpm/node_modules/console/package.json","../../../node_modules/.pnpm/node_modules/constants/package.json","../../../node_modules/.pnpm/node_modules/crypto/package.json","../../../node_modules/.pnpm/node_modules/dgram/package.json","../../../node_modules/.pnpm/node_modules/diagnostics_channel/package.json","../../../node_modules/.pnpm/node_modules/dns/package.json","../../../node_modules/.pnpm/node_modules/dns/promises/package.json","../../../node_modules/.pnpm/node_modules/domain/package.json","../../../node_modules/.pnpm/node_modules/events/package.json","../../../node_modules/.pnpm/node_modules/fs/package.json","../../../node_modules/.pnpm/node_modules/fs/promises/package.json","../../../node_modules/.pnpm/node_modules/http/package.json","../../../node_modules/.pnpm/node_modules/http2/package.json","../../../node_modules/.pnpm/node_modules/https/package.json","../../../node_modules/.pnpm/node_modules/inspector/package.json","../../../node_modules/.pnpm/node_modules/inspector/promises/package.json","../../../node_modules/.pnpm/node_modules/module/package.json","../../../node_modules/.pnpm/node_modules/net/package.json","../../../node_modules/.pnpm/node_modules/os/package.json","../../../node_modules/.pnpm/node_modules/path/package.json","../../../node_modules/.pnpm/node_modules/path/posix/package.json","../../../node_modules/.pnpm/node_modules/path/win32/package.json","../../../node_modules/.pnpm/node_modules/perf_hooks/package.json","../../../node_modules/.pnpm/node_modules/process/package.json","../../../node_modules/.pnpm/node_modules/punycode/package.json","../../../node_modules/.pnpm/node_modules/querystring/package.json","../../../node_modules/.pnpm/node_modules/readline/package.json","../../../node_modules/.pnpm/node_modules/readline/promises/package.json","../../../node_modules/.pnpm/node_modules/repl/package.json","../../../node_modules/.pnpm/node_modules/stream/consumers/package.json","../../../node_modules/.pnpm/node_modules/stream/package.json","../../../node_modules/.pnpm/node_modules/stream/promises/package.json","../../../node_modules/.pnpm/node_modules/stream/web/package.json","../../../node_modules/.pnpm/node_modules/string_decoder/package.json","../../../node_modules/.pnpm/node_modules/timers/package.json","../../../node_modules/.pnpm/node_modules/timers/promises/package.json","../../../node_modules/.pnpm/node_modules/tls/package.json","../../../node_modules/.pnpm/node_modules/trace_events/package.json","../../../node_modules/.pnpm/node_modules/tty/package.json","../../../node_modules/.pnpm/node_modules/url/package.json","../../../node_modules/.pnpm/node_modules/util/package.json","../../../node_modules/.pnpm/node_modules/util/types/package.json","../../../node_modules/.pnpm/node_modules/v8/package.json","../../../node_modules/.pnpm/node_modules/vm/package.json","../../../node_modules/.pnpm/node_modules/wasi/package.json","../../../node_modules/.pnpm/node_modules/worker_threads/package.json","../../../node_modules/.pnpm/node_modules/zlib/package.json","../../../node_modules/@types/assert/package.json","../../../node_modules/@types/assert/strict/package.json","../../../node_modules/@types/async_hooks/package.json","../../../node_modules/@types/buffer/package.json","../../../node_modules/@types/child_process/package.json","../../../node_modules/@types/cluster/package.json","../../../node_modules/@types/console/package.json","../../../node_modules/@types/constants/package.json","../../../node_modules/@types/crypto/package.json","../../../node_modules/@types/dgram/package.json","../../../node_modules/@types/diagnostics_channel/package.json","../../../node_modules/@types/dns/package.json","../../../node_modules/@types/dns/promises/package.json","../../../node_modules/@types/domain/package.json","../../../node_modules/@types/events/package.json","../../../node_modules/@types/fs/package.json","../../../node_modules/@types/fs/promises/package.json","../../../node_modules/@types/hdb/package.json","../../../node_modules/@types/http/package.json","../../../node_modules/@types/http2/package.json","../../../node_modules/@types/https/package.json","../../../node_modules/@types/inspector/package.json","../../../node_modules/@types/inspector/promises/package.json","../../../node_modules/@types/module/package.json","../../../node_modules/@types/net/package.json","../../../node_modules/@types/os/package.json","../../../node_modules/@types/path/package.json","../../../node_modules/@types/path/posix/package.json","../../../node_modules/@types/path/win32/package.json","../../../node_modules/@types/perf_hooks/package.json","../../../node_modules/@types/process/package.json","../../../node_modules/@types/punycode/package.json","../../../node_modules/@types/querystring/package.json","../../../node_modules/@types/readline/package.json","../../../node_modules/@types/readline/promises/package.json","../../../node_modules/@types/repl/package.json","../../../node_modules/@types/stream/consumers/package.json","../../../node_modules/@types/stream/package.json","../../../node_modules/@types/stream/promises/package.json","../../../node_modules/@types/stream/web/package.json","../../../node_modules/@types/string_decoder/package.json","../../../node_modules/@types/timers/package.json","../../../node_modules/@types/timers/promises/package.json","../../../node_modules/@types/tls/package.json","../../../node_modules/@types/trace_events/package.json","../../../node_modules/@types/tty/package.json","../../../node_modules/@types/url/package.json","../../../node_modules/@types/util/package.json","../../../node_modules/@types/util/types/package.json","../../../node_modules/@types/v8/package.json","../../../node_modules/@types/vm/package.json","../../../node_modules/@types/wasi/package.json","../../../node_modules/@types/worker_threads/package.json","../../../node_modules/@types/zlib/package.json","../../../node_modules/assert/package.json","../../../node_modules/assert/strict/package.json","../../../node_modules/async_hooks/package.json","../../../node_modules/buffer/package.json","../../../node_modules/child_process/package.json","../../../node_modules/cluster/package.json","../../../node_modules/console/package.json","../../../node_modules/constants/package.json","../../../node_modules/crypto/package.json","../../../node_modules/dgram/package.json","../../../node_modules/diagnostics_channel/package.json","../../../node_modules/dns/package.json","../../../node_modules/dns/promises/package.json","../../../node_modules/domain/package.json","../../../node_modules/events/package.json","../../../node_modules/fs/package.json","../../../node_modules/fs/promises/package.json","../../../node_modules/hdb/package.json","../../../node_modules/http/package.json","../../../node_modules/http2/package.json","../../../node_modules/https/package.json","../../../node_modules/inspector/package.json","../../../node_modules/inspector/promises/package.json","../../../node_modules/module/package.json","../../../node_modules/net/package.json","../../../node_modules/os/package.json","../../../node_modules/path/package.json","../../../node_modules/path/posix/package.json","../../../node_modules/path/win32/package.json","../../../node_modules/perf_hooks/package.json","../../../node_modules/process/package.json","../../../node_modules/punycode/package.json","../../../node_modules/querystring/package.json","../../../node_modules/readline/package.json","../../../node_modules/readline/promises/package.json","../../../node_modules/repl/package.json","../../../node_modules/stream/consumers/package.json","../../../node_modules/stream/package.json","../../../node_modules/stream/promises/package.json","../../../node_modules/stream/web/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/timers/package.json","../../../node_modules/timers/promises/package.json","../../../node_modules/tls/package.json","../../../node_modules/trace_events/package.json","../../../node_modules/tty/package.json","../../../node_modules/url/package.json","../../../node_modules/util/package.json","../../../node_modules/util/types/package.json","../../../node_modules/v8/package.json","../../../node_modules/vm/package.json","../../../node_modules/wasi/package.json","../../../node_modules/worker_threads/package.json","../../../node_modules/zlib/package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.dom.d.ts","lib.dom.iterable.d.ts","lib.dom.asynciterable.d.ts","lib.webworker.importscripts.d.ts","lib.scripthost.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2025.float16.d.ts","lib.esnext.disposable.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","lib.es2023.full.d.ts","../../core/dist/ast.d.ts","../../core/dist/schema.d.ts","../../core/dist/relations.d.ts","../../core/dist/expr.d.ts","../../core/dist/ref.d.ts","../../core/dist/dialect.d.ts","../../core/dist/interceptor.d.ts","../../core/dist/session.d.ts","../../core/dist/mutation.d.ts","../../core/dist/native.d.ts","../../core/dist/db.d.ts","../../core/dist/query.d.ts","../../core/dist/window.d.ts","../../core/dist/view.d.ts","../../core/dist/index.d.ts","../src/functions.ts","../src/hdb.d.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/web-globals/crypto.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/utility.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/client-stats.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/round-robin-pool.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/h2c-client.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/snapshot-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/socks5-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@7.24.6/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@24.19.2/node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},"abad6dd56cc8caf095c165df8124d237","abad6dd56cc8caf095c165df8124d237",{"version":"2a9941db0809c9ad0e8837ed629b1dcc","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d051b93324f36bcc68d152a5ca0988cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},"e1c7e28ac89b8a663c388c275b41bf44",{"version":"d3cbc8e3020106c9ae2f38cf124d47bf","impliedNodeFormat":99},{"version":"c725e07e7857d7dfd20edccd508e0019","impliedNodeFormat":99},{"version":"799fddea4602c05b612f76f841c345e2","impliedNodeFormat":99},{"version":"1d81825a3ae4441b0e6c98f449df0e00","impliedNodeFormat":99},{"version":"972f8db34efd79dbeb85568838480903","impliedNodeFormat":99},{"version":"af9e33d9b20b62d621652bb1bf9ba21d","impliedNodeFormat":99},{"version":"bc1c6fcadf8646992f778d3d76273556","impliedNodeFormat":99},{"version":"fb79f32941acb9d42b90e6f86a2efb13","impliedNodeFormat":99},{"version":"b7cae69cf6ea361511014aa01a05fd48","impliedNodeFormat":99},{"version":"8469fa98747223bc6534b38d02f6c930","impliedNodeFormat":99},{"version":"ca8d67508dcc47b2150399596701abee","impliedNodeFormat":99},{"version":"328877ddcd20d394a6370c802cfe4793","impliedNodeFormat":99},{"version":"066d069bbf567ce69832bacf5ca46641","impliedNodeFormat":99},{"version":"45ac30541a1cd20a7966e3354ed16f97","impliedNodeFormat":99},{"version":"5459b104252a89cb7eefaa9de503d6a7","impliedNodeFormat":99},{"version":"21e9838754c9fbc77e744f1de0c449ff","signature":"8b826a4b56a2613619c54f261d314072","impliedNodeFormat":99},{"version":"4ca6481774becc7aafee98da68c8b80d","impliedNodeFormat":99},{"version":"085292c13b044f3c70cfaaf9c742a40d","signature":"0565271a129639ec801ec197560dba77","impliedNodeFormat":99},{"version":"2514e9a2749c0fc18d2f478e9e1e641e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6ae4c332ecb24e76c1e47c0e21d4663d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9a10873e4cfa9ad599551cdc02419e5e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf33440030f0a0fae7d1efd6c293a8d2","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9af0a7e3ef1c42cd066b9f8d365cc1ba","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7b772cebc7136c34fc77954aef70519d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9eca652586205dc5b07f9ba57b1c8500","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ec5f75939754ce94652189ec7d0d3058","affectsGlobalScope":true,"impliedNodeFormat":1},"49133c0dfbc32ab95668c3443dea49e5","85c2cf74d24d4069fac4686501a2d7e3","9f970a4ba4bb3ed6326d46b3ddab3f63","f444b82bb192c8ecc7c9a06cba5c1fba","75de66fc4824402123c0d694ccc0a085","ff1283d1b4e6fa719203127857079e2e","fcd1a513c1e5802916fa602e8b8e64bc","520a89183de13d5f66a98ffe05963428","c1ace754853b3b972549a44a2316ca86","ef0307d3b758a0e188f1cf25e8f043d9","705645fe223430c696f47b708d592ca8","28d57c837c94adb42add03d499793cab","8c01a9bbae8449be21b3e018d59a74ac","44d3b7d58481743f4726cf411e667164","679024f8e9f58a112f4badf119c4d612","74d351e4ed233e82c6d74c444c1a6b86","94d8e37d28e92494f484dd9afe8f043c","79db245997e9261ae21e5f3d93e3493b","c3659054228b00c4e2a22d9ebea8b4f0","d7e5f7a0f1f883f28458f684106e7643","c2364011a80b6a9e3cc0e77895bad577","38da5c670190f4a35cbc204ca6c616bf","d95cc0eb29beed58f5ce72db21398f53","ecd53256b1ec7379c73316eaf392a69c","db5a9211b779628398011a5b8f5b8b5d","69c7bb9c3befe9ae37eed0e6a6310fee","1cba93fafccb7b2655f0e75229185e83","69ff24b2981ccbe16bc270d491fd7308","094ecadae30f65a82b77343dde77a666","f75df12d75dd783b03a0329b95abdb25","b438b08b2f0ed94a95a75c8990d9021b","f2becd2589591db92ab14e803eb8bdd5","230b29c24dac9c9800ba909debbaf7c4","df47a5b94616443950e3b594d577dd0f","0468c0ccd0ec7770b76481b165564d62","188234d616a4f50ed9b14c8f84a39f33","4c116bcf0a47ea8fbf4072f380925fa7","213fda99209bff9d0330b6d9f5c9c7f3","add85ec26ba695fc99c698dbec065f8c","5bfde23f96fc502b5413d772c35e1abf","b744265d8ad12b7d4d5c5dc35d18d44e","eff32168b8348b822afeed9cbf61afa7","b3cc2d80116b8a8328ea4d205220a17c",{"version":"dd1cf1cc3aa21cd78b4869a44d98c6d9","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"292c9398a407b33b1d9c9812b673387a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"45df94b3c51b898624bacc2bcd6d9eb2","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7d352f71d1b1bcc12c79dd0e4597537c","affectsGlobalScope":true,"impliedNodeFormat":1},"db11b80743ed5356b81d763a708788e6","39078ea063fcaf72bd3cca7e0d13d017","93dc976fc536951d6e75e90d473572a7",{"version":"03cf0a7b20ee0600da6399bbc30e4235","affectsGlobalScope":true,"impliedNodeFormat":1},"e412aef79ff298b0ade8abe7ac9dcadc","54c5c3dcfdb5f7cf5fbbccfff6ead3fa",{"version":"dc14f078230582a2f8fb2138bfcf4f85","affectsGlobalScope":true,"impliedNodeFormat":1},"b2b472cd0bf0f8d5f022e00ca1c401f4","c7247b0fcf28504e60c5fe77c44451bd","7d3f1abfc001dde996a18bda5ee12934","cc7a57e86f908c313649aea8d90377e1","30d4919f2abc1ea3ce394c64657a076f","6d3d975387ab7676c530b16cc68492b6","6751c8c175fac6bbe7b935582cdfdca7",{"version":"5d57c3010123020fd661bd66a43edddf","affectsGlobalScope":true,"impliedNodeFormat":1},"5b449416b035b624493038053a54c925","98a014ab2526abf44cf008049c433e0c","28089568bb1dc8d2ccdc224ee7e82c4c","dbcca39236d94f35b283ea819ebd6053","dbe700f7f1fa52fd220c7ee2c6617ebc","448b8cb8a4d46c6bd83bc03695c2ad92","06e23abf5b49a76a94e2ed9af001fdba",{"version":"1925bd52d544d2578d3bd42df92793cc","affectsGlobalScope":true,"impliedNodeFormat":1},"a5c47f01706656e366a5e88e1e755d02","a20bbb7d11d1e44d2375a0bf69553d15","4e458316a6083cbd2bba2fd29f674dd5",{"version":"a7efd381f4f782ec3dca46fc3e6865ee","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cab1129e8769c5a485f1bb3401c64ff","affectsGlobalScope":true,"impliedNodeFormat":1},"6b26581aa2587701d570206a0db8c9ee","88a29e2aac8082c0910733950159e1ca","10282f14d9c2a5cbf3bcf2b1c8cebeaf","0f80958d77cd6301b43c1d7904e3e4bc","3bdc645524ab0d2f6795d3a008833bd7","deb50b47eb75a5566532a763fa1324fa","f70dd66001d2985b6db8a68202f1ecb2","5c74012d7de089fb39b8f0ba33a3d53f","c8206d568b54e5ea06131963eecd576a","fc085b507c71f30185cc3e5860abb56f",{"version":"10003f0be2c5ca5d723646217dc7d032","affectsGlobalScope":true,"impliedNodeFormat":1},"dd404118e8bd70aff746f7d31e46270b","6c677e93aa9cfe1b51b85a932ef057f5",{"version":"6b8649a280031d9e86955db721cfad87","affectsGlobalScope":true,"impliedNodeFormat":1},"4bc8f13c472858fb74f77388c0c5d885","146b3ea1fdb5d3bb3836c3a9492a06f4","c72d2516d1e8910caca33c4dff75fcd4","e7650d4278f69463d6a8321c0e393d42",{"version":"75a6ba006597b68cffe4a020ae11a543","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9dcdeb61f51476309b4c4c98da465508","affectsGlobalScope":true,"impliedNodeFormat":1},"b328c646e5308da850932b32b4383059","c072301065f53729701183ab36b4e2db","9268959cff1006c82e6abbd73824db97",{"version":"8f1c048bd5761910f5ea340fe4d792cd","affectsGlobalScope":true,"impliedNodeFormat":1},"cd77311dfd66fca90fa927b84d9ec9d2","eb567c7b5824aab578f75bbccf9f4b05"],"fileIdsList":[[86,90,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,138,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,88,89,90,91,92,93,94,95,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,194,195],[86,90,138,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,138,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194],[86,90,102,105,108,109,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,105,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,105,109,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,99,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,103,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,101,102,105,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196],[86,90,99,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196],[86,90,101,105,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,96,97,98,100,104,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,105,114,122,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,97,103,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,105,132,133,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,97,100,105,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196],[86,90,96,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,99,100,101,103,104,105,106,107,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,133,134,135,136,137,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,105,125,128,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,105,114,115,116,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,103,105,115,117,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,104,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,97,99,105,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,105,109,115,117,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,109,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,103,105,108,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,97,101,105,114,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,105,125,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,117,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,97,101,105,109,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[86,90,99,105,132,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196],[71,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[71,72,75,76,77,78,79,81,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[70,71,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[70,71,72,73,74,75,76,77,78,79,80,81,82,83,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[70,71,73,74,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[70,71,72,73,74,75,76,77,81,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[75,77,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[70,71,72,73,74,75,77,80,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[70,71,72,73,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[70,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[72,75,76,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[71,72,74,80,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[70,73,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[84,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195],[84,85,86,90,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195]],"options":{"allowImportingTsExtensions":true,"composite":true,"declaration":true,"declarationMap":true,"erasableSyntaxOnly":true,"exactOptionalPropertyTypes":true,"module":199,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rewriteRelativeImportExtensions":true,"rootDir":"../src","skipLibCheck":true,"strict":true,"sourceMap":true,"target":10,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[143,1],[144,2],[145,3],[90,4],[146,5],[147,6],[148,7],[88,8],[149,9],[150,10],[151,11],[152,12],[153,13],[154,14],[155,15],[156,16],[157,17],[158,18],[159,19],[91,8],[89,8],[160,20],[161,21],[162,22],[196,23],[163,24],[164,25],[165,26],[166,27],[167,28],[168,29],[169,30],[170,31],[171,32],[172,33],[173,34],[174,35],[175,36],[176,37],[177,38],[178,39],[180,40],[179,41],[181,42],[182,43],[183,44],[184,45],[185,46],[186,47],[187,48],[188,49],[189,50],[190,51],[191,52],[192,53],[193,54],[92,8],[93,8],[94,8],[95,8],[139,55],[140,8],[141,8],[142,8],[194,56],[195,57],[67,8],[68,8],[13,8],[11,8],[12,8],[17,8],[16,8],[2,8],[18,8],[19,8],[20,8],[21,8],[22,8],[23,8],[24,8],[25,8],[3,8],[26,8],[27,8],[4,8],[28,8],[32,8],[29,8],[30,8],[31,8],[33,8],[34,8],[35,8],[5,8],[36,8],[37,8],[38,8],[39,8],[6,8],[43,8],[40,8],[41,8],[42,8],[44,8],[7,8],[45,8],[50,8],[51,8],[46,8],[47,8],[48,8],[49,8],[8,8],[55,8],[52,8],[53,8],[54,8],[56,8],[9,8],[57,8],[58,8],[59,8],[61,8],[60,8],[62,8],[63,8],[10,8],[69,8],[64,8],[65,8],[1,8],[66,8],[15,8],[14,8],[114,58],[127,59],[111,60],[128,8],[137,61],[102,62],[103,63],[101,8],[136,64],[131,65],[135,66],[105,67],[124,68],[104,69],[134,70],[99,71],[100,65],[106,59],[107,8],[113,66],[110,59],[97,72],[138,73],[129,74],[117,75],[116,59],[118,76],[121,77],[115,78],[119,79],[132,64],[108,80],[109,81],[122,82],[98,8],[126,83],[125,59],[112,81],[120,84],[123,85],[130,8],[96,8],[133,86],[70,87],[80,88],[75,89],[73,89],[84,90],[76,91],[78,92],[79,93],[81,94],[74,95],[72,87],[71,96],[77,97],[83,98],[82,99],[85,100],[86,101],[87,102]],"latestChangedDtsFile":"./index.d.ts"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HANA 专属函数,与 Java 版同名同形:
|
|
3
|
+
* ```ts
|
|
4
|
+
* db.queryable(Doc).where(d => Hana.text(d.title, d.body).fuzzy('easy qurey', 0.8)).orderBy(d => Hana.text(d.title).score().desc())
|
|
5
|
+
* ```
|
|
6
|
+
* 列上要有 FULLTEXT INDEX,否则 CONTAINS 按整列值匹配。生成带 {@code hana.} 前缀的函数节点,别的方言 toSQL 时报不支持。
|
|
7
|
+
*/
|
|
8
|
+
import { type Expr, type FunctionRenderer, type Pred } from '@zerodep-dev/easy-query-ts';
|
|
9
|
+
export declare const Hana: {
|
|
10
|
+
text: (...columns: Expr<string | null>[]) => {
|
|
11
|
+
/** EXACT:按词,支持 "短语"、OR、-排除、* */
|
|
12
|
+
contains: (query: string) => Pred;
|
|
13
|
+
/** 容错匹配,threshold 0–1(写进 SQL) */
|
|
14
|
+
fuzzy: (query: string, threshold: number) => Pred;
|
|
15
|
+
/** 本查询里 CONTAINS 的相关度 */
|
|
16
|
+
score: () => Expr<number>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/** 加进 HANA 方言的函数表 */
|
|
20
|
+
export declare const hanaFunctions: Record<string, FunctionRenderer>;
|
|
21
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../src/functions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAqB,KAAK,IAAI,EAAE,KAAK,gBAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,4BAA4B,CAAA;AAE3G,eAAO,MAAM,IAAI;IACf,IAAI,eAAe,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE;QAGpC,gCAAgC;QAChC,QAAQ,UAAU,MAAM,KAAG,IAAI;QAC/B,iCAAiC;QACjC,KAAK,UAAU,MAAM,aAAa,MAAM,KAAG,IAAI;QAI/C,yBAAyB;QACzB,KAAK;;CAGV,CAAA;AAID,qBAAqB;AACrB,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAW1D,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HANA 专属函数,与 Java 版同名同形:
|
|
3
|
+
* ```ts
|
|
4
|
+
* db.queryable(Doc).where(d => Hana.text(d.title, d.body).fuzzy('easy qurey', 0.8)).orderBy(d => Hana.text(d.title).score().desc())
|
|
5
|
+
* ```
|
|
6
|
+
* 列上要有 FULLTEXT INDEX,否则 CONTAINS 按整列值匹配。生成带 {@code hana.} 前缀的函数节点,别的方言 toSQL 时报不支持。
|
|
7
|
+
*/
|
|
8
|
+
import { codecs, dialectFn } from '@zerodep-dev/easy-query-ts';
|
|
9
|
+
export const Hana = {
|
|
10
|
+
text: (...columns) => {
|
|
11
|
+
if (columns.length === 0)
|
|
12
|
+
throw new Error('Hana.text needs at least one column');
|
|
13
|
+
return {
|
|
14
|
+
/** EXACT:按词,支持 "短语"、OR、-排除、* */
|
|
15
|
+
contains: (query) => dialectFn('hana.contains', [...columns, query], codecs.boolean),
|
|
16
|
+
/** 容错匹配,threshold 0–1(写进 SQL) */
|
|
17
|
+
fuzzy: (query, threshold) => {
|
|
18
|
+
if (!(threshold >= 0 && threshold <= 1))
|
|
19
|
+
throw new RangeError(`fuzzy threshold must be between 0 and 1, got ${threshold}`);
|
|
20
|
+
return dialectFn('hana.contains_fuzzy', [...columns, query, { k: 'lit', sql: String(threshold) }], codecs.boolean);
|
|
21
|
+
},
|
|
22
|
+
/** 本查询里 CONTAINS 的相关度 */
|
|
23
|
+
score: () => dialectFn('hana.score', [], codecs.double),
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const columnList = (cols) => (cols.length === 1 ? cols[0] : `(${cols.join(', ')})`);
|
|
28
|
+
/** 加进 HANA 方言的函数表 */
|
|
29
|
+
export const hanaFunctions = {
|
|
30
|
+
// 通用函数里与标准写法不同的部分(HANA 的 LOCATE 参数顺序是 字符串、子串)
|
|
31
|
+
index_of: (a) => `(LOCATE(${a[0]}, ${a[1]}) - 1)`,
|
|
32
|
+
add_days: (a) => `ADD_DAYS(${a[0]}, ${a[1]})`,
|
|
33
|
+
add_months: (a) => `ADD_MONTHS(${a[0]}, ${a[1]})`,
|
|
34
|
+
diff_days: (a) => `DAYS_BETWEEN(${a[1]}, ${a[0]})`,
|
|
35
|
+
cast_string: (a) => `CAST(${a[0]} AS NVARCHAR(5000))`,
|
|
36
|
+
cast_double: (a) => `CAST(${a[0]} AS DOUBLE)`,
|
|
37
|
+
'hana.contains': (a) => `CONTAINS(${columnList(a.slice(0, -1))}, ${a[a.length - 1]})`,
|
|
38
|
+
'hana.contains_fuzzy': (a) => `CONTAINS(${columnList(a.slice(0, -2))}, ${a[a.length - 2]}, FUZZY(${a[a.length - 1]}))`,
|
|
39
|
+
'hana.score': () => 'SCORE()',
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../src/functions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,EAAE,SAAS,EAA+C,MAAM,4BAA4B,CAAA;AAE3G,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE,CAAC,GAAG,OAA8B,EAAE,EAAE;QAC1C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAA;QAChF,OAAO;YACL,gCAAgC;YAChC,QAAQ,EAAE,CAAC,KAAa,EAAQ,EAAE,CAAC,SAAS,CAAU,eAAe,EAAE,CAAC,GAAG,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC;YAC3G,iCAAiC;YACjC,KAAK,EAAE,CAAC,KAAa,EAAE,SAAiB,EAAQ,EAAE;gBAChD,IAAI,CAAC,CAAC,SAAS,IAAI,CAAC,IAAI,SAAS,IAAI,CAAC,CAAC;oBAAE,MAAM,IAAI,UAAU,CAAC,gDAAgD,SAAS,EAAE,CAAC,CAAA;gBAC1H,OAAO,SAAS,CAAU,qBAAqB,EAAE,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;YAC7H,CAAC;YACD,yBAAyB;YAC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IACrF,qBAAqB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI;IACtH,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;CAC9B,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Dialect, SqlWriter, type ColumnOptions, type Adapter, type FunctionRenderer, type InsertNode } from '@zerodep-dev/easy-query-ts';
|
|
2
|
+
export { Hana } from './functions.ts';
|
|
3
|
+
export declare class HanaDialect extends Dialect {
|
|
4
|
+
readonly name = "hana";
|
|
5
|
+
/** HANA 没有 WITH RECURSIVE(层级查询用 HIERARCHY 函数) */
|
|
6
|
+
readonly supportsRecursiveCte = false;
|
|
7
|
+
columnType(kind: string, o: ColumnOptions): string;
|
|
8
|
+
/** HANA 建列存表用 CREATE COLUMN TABLE,也没有 IF NOT EXISTS(表已存在会报错) */
|
|
9
|
+
createTableStart(): string;
|
|
10
|
+
/** HANA 跳过被锁行的写法是 IGNORE LOCKED */
|
|
11
|
+
forUpdate(wait?: 'nowait' | 'skip'): string;
|
|
12
|
+
/** HANA 没有 RELEASE SAVEPOINT:回滚到保存点即可,其余在事务结束时一起清掉 */
|
|
13
|
+
releaseSavepoint(): string | undefined;
|
|
14
|
+
protected functions(): Record<string, FunctionRenderer>;
|
|
15
|
+
/**
|
|
16
|
+
* upsert 写成 MERGE:USING 里每行一个 SELECT … FROM DUMMY(多行 UNION ALL),按 target 列匹配;ignore 时没有 WHEN MATCHED。
|
|
17
|
+
*/
|
|
18
|
+
insert(q: InsertNode, w?: SqlWriter): string;
|
|
19
|
+
/**
|
|
20
|
+
* hdb 按服务器推断的参数类型校验 JS 类型;{@code SELECT ? FROM DUMMY}(多行插入、MERGE 的来源)里的参数被推成 NVARCHAR,只收字符串。
|
|
21
|
+
* 数值类型的参数也接受字符串,所以数一律转成字符串传。
|
|
22
|
+
*/
|
|
23
|
+
encodeParam(value: unknown): unknown;
|
|
24
|
+
limitOffset(limit: number | undefined, offset: number | undefined): string;
|
|
25
|
+
}
|
|
26
|
+
/** hdb 连接参数(hdb 自己没有类型,这里声明用到的字段;其余原样传给 hdb) */
|
|
27
|
+
export interface HdbClientOptions {
|
|
28
|
+
host: string;
|
|
29
|
+
port: number;
|
|
30
|
+
user: string;
|
|
31
|
+
password: string;
|
|
32
|
+
[option: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
export interface HanaOptions extends HdbClientOptions {
|
|
35
|
+
/** 连接后 SET SCHEMA */
|
|
36
|
+
schema?: string;
|
|
37
|
+
/** 连接池上限,默认 5 */
|
|
38
|
+
max?: number;
|
|
39
|
+
}
|
|
40
|
+
/** 关闭空闲连接(测试与进程退出时) */
|
|
41
|
+
export declare function closeHana(adapter: Adapter): void;
|
|
42
|
+
export declare function hana(options: HanaOptions): Adapter;
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,OAAO,EAAmC,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAyC,MAAM,4BAA4B,CAAA;AAEjN,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAKrC,qBAAa,WAAY,SAAQ,OAAO;IACtC,QAAQ,CAAC,IAAI,UAAS;IACtB,iDAAiD;IACjD,SAAkB,oBAAoB,SAAQ;IAErC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,GAAG,MAAM,CAS1D;IAED,gEAAgE;IACvD,gBAAgB,IAAI,MAAM,CAElC;IAED,mCAAmC;IAC1B,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAEnD;IAED,sDAAsD;IAC7C,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAE9C;IAED,UAAmB,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAQ/D;IAED;;OAEG;IACM,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,GAAE,SAA2B,GAAG,MAAM,CAarE;IAED;;;OAGG;IACM,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAG5C;IAEQ,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGlF;CACF;AA4DD,gDAAgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;CAC1B;AAED,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACnD,qBAAqB;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,iBAAiB;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAoFD,uBAAuB;AACvB,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEhD;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAElD"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SAP HANA 2.0,驱动用 SAP 维护的纯 JS 驱动 hdb(不需要原生编译)。
|
|
3
|
+
* ```ts
|
|
4
|
+
* const db = createDb({ schema, adapter: hana({ host, port: 39041, user, password, schema: 'APP', max: 5 }) })
|
|
5
|
+
* ```
|
|
6
|
+
* 适配器自带一个小连接池(hdb 一个 client 就是一条连接)。自增主键在同一条连接上用 CURRENT_IDENTITY_VALUE() 取回。
|
|
7
|
+
*/
|
|
8
|
+
import hdb, {} from 'hdb';
|
|
9
|
+
import { hanaFunctions } from './functions.js';
|
|
10
|
+
import { Dialect, SqlWriter } from '@zerodep-dev/easy-query-ts';
|
|
11
|
+
export { Hana } from './functions.js';
|
|
12
|
+
/** HANA 的 LIMIT 不能省、OFFSET 前必须有 LIMIT */
|
|
13
|
+
const NO_LIMIT = 2147483647;
|
|
14
|
+
export class HanaDialect extends Dialect {
|
|
15
|
+
name = 'hana';
|
|
16
|
+
/** HANA 没有 WITH RECURSIVE(层级查询用 HIERARCHY 函数) */
|
|
17
|
+
supportsRecursiveCte = false;
|
|
18
|
+
columnType(kind, o) {
|
|
19
|
+
if (o.dbType)
|
|
20
|
+
return o.dbType;
|
|
21
|
+
switch (kind) {
|
|
22
|
+
case 'string': return `NVARCHAR(${o.length ?? 255})`;
|
|
23
|
+
case 'double': return 'DOUBLE';
|
|
24
|
+
case 'datetime': return 'TIMESTAMP';
|
|
25
|
+
case 'json': return 'NCLOB';
|
|
26
|
+
default: return super.columnType(kind, o);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** HANA 建列存表用 CREATE COLUMN TABLE,也没有 IF NOT EXISTS(表已存在会报错) */
|
|
30
|
+
createTableStart() {
|
|
31
|
+
return 'CREATE COLUMN TABLE';
|
|
32
|
+
}
|
|
33
|
+
/** HANA 跳过被锁行的写法是 IGNORE LOCKED */
|
|
34
|
+
forUpdate(wait) {
|
|
35
|
+
return ' FOR UPDATE' + (wait === 'nowait' ? ' NOWAIT' : wait === 'skip' ? ' IGNORE LOCKED' : '');
|
|
36
|
+
}
|
|
37
|
+
/** HANA 没有 RELEASE SAVEPOINT:回滚到保存点即可,其余在事务结束时一起清掉 */
|
|
38
|
+
releaseSavepoint() {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
functions() {
|
|
42
|
+
return {
|
|
43
|
+
...super.functions(),
|
|
44
|
+
length: (a) => `LENGTH(${a[0]})`,
|
|
45
|
+
// HANA 的 CONCAT 只收两个参数
|
|
46
|
+
concat: (a) => `(${a.join(' || ')})`,
|
|
47
|
+
...hanaFunctions,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* upsert 写成 MERGE:USING 里每行一个 SELECT … FROM DUMMY(多行 UNION ALL),按 target 列匹配;ignore 时没有 WHEN MATCHED。
|
|
52
|
+
*/
|
|
53
|
+
insert(q, w = new SqlWriter()) {
|
|
54
|
+
if (!q.conflict && q.rows.length === 1)
|
|
55
|
+
return super.insert(q, w);
|
|
56
|
+
const cols = q.columns.map((c) => this.quote(c));
|
|
57
|
+
// 渲染时参数按出现顺序收集,所以 source 只渲染一次
|
|
58
|
+
const source = q.rows.map((r) => `SELECT ${r.map((n, i) => `${this.node(n, w)} AS ${cols[i]}`).join(', ')} FROM DUMMY`).join(' UNION ALL ');
|
|
59
|
+
// HANA 的 VALUES 只能一行:多行写成 INSERT … SELECT … FROM DUMMY UNION ALL …
|
|
60
|
+
if (!q.conflict)
|
|
61
|
+
return `INSERT INTO ${this.table(q.table)} (${cols.join(', ')}) ${source}`;
|
|
62
|
+
const on = q.conflict.target.map((t) => `eq_t.${this.quote(t)} = eq_s.${this.quote(t)}`).join(' AND ');
|
|
63
|
+
let sql = `MERGE INTO ${this.table(q.table)} eq_t USING (${source}) eq_s ON (${on})`;
|
|
64
|
+
if (q.conflict.update.length > 0) {
|
|
65
|
+
sql += ` WHEN MATCHED THEN UPDATE SET ${q.conflict.update.map((u) => `eq_t.${this.quote(u)} = eq_s.${this.quote(u)}`).join(', ')}`;
|
|
66
|
+
}
|
|
67
|
+
return `${sql} WHEN NOT MATCHED THEN INSERT (${cols.join(', ')}) VALUES (${cols.map((c) => `eq_s.${c}`).join(', ')})`;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* hdb 按服务器推断的参数类型校验 JS 类型;{@code SELECT ? FROM DUMMY}(多行插入、MERGE 的来源)里的参数被推成 NVARCHAR,只收字符串。
|
|
71
|
+
* 数值类型的参数也接受字符串,所以数一律转成字符串传。
|
|
72
|
+
*/
|
|
73
|
+
encodeParam(value) {
|
|
74
|
+
const v = super.encodeParam(value);
|
|
75
|
+
return typeof v === 'number' || typeof v === 'bigint' ? String(v) : v;
|
|
76
|
+
}
|
|
77
|
+
limitOffset(limit, offset) {
|
|
78
|
+
if (limit === undefined && offset !== undefined && offset > 0)
|
|
79
|
+
return ` LIMIT ${NO_LIMIT} OFFSET ${offset}`;
|
|
80
|
+
return super.limitOffset(limit, offset);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function call(fn) {
|
|
84
|
+
return new Promise((resolve, reject) => fn((error, result) => (error ? reject(error) : resolve(result))));
|
|
85
|
+
}
|
|
86
|
+
async function run(client, sql, params) {
|
|
87
|
+
if (params.length === 0)
|
|
88
|
+
return call((cb) => client.exec(sql, cb));
|
|
89
|
+
const statement = await call((cb) => client.prepare(sql, cb));
|
|
90
|
+
try {
|
|
91
|
+
return await call((cb) => statement.exec([...params], cb));
|
|
92
|
+
}
|
|
93
|
+
finally {
|
|
94
|
+
statement.drop();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
class HanaSession {
|
|
98
|
+
connection;
|
|
99
|
+
constructor(connection) {
|
|
100
|
+
this.connection = connection;
|
|
101
|
+
}
|
|
102
|
+
async query(sql, params) {
|
|
103
|
+
const { client, release } = await this.connection();
|
|
104
|
+
try {
|
|
105
|
+
return (await run(client, sql, params));
|
|
106
|
+
}
|
|
107
|
+
finally {
|
|
108
|
+
release();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async execute(sql, params) {
|
|
112
|
+
const { client, release } = await this.connection();
|
|
113
|
+
try {
|
|
114
|
+
const affected = Number(await run(client, sql, params));
|
|
115
|
+
if (!/^\s*INSERT\b/i.test(sql))
|
|
116
|
+
return { affected, insertId: undefined };
|
|
117
|
+
// 同一条连接上取刚生成的 IDENTITY;表没有 IDENTITY 列时为 NULL
|
|
118
|
+
const rows = (await run(client, 'SELECT CURRENT_IDENTITY_VALUE() AS "id" FROM DUMMY', []));
|
|
119
|
+
const id = rows[0]?.id;
|
|
120
|
+
return { affected, insertId: id === null || id === undefined ? undefined : toKey(id) };
|
|
121
|
+
}
|
|
122
|
+
finally {
|
|
123
|
+
release();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function toKey(value) {
|
|
128
|
+
if (typeof value === 'number' || typeof value === 'bigint')
|
|
129
|
+
return value;
|
|
130
|
+
const n = Number(value);
|
|
131
|
+
return Number.isSafeInteger(n) ? n : BigInt(String(value));
|
|
132
|
+
}
|
|
133
|
+
const ISOLATION = {
|
|
134
|
+
'read uncommitted': 'READ COMMITTED',
|
|
135
|
+
'read committed': 'READ COMMITTED',
|
|
136
|
+
'repeatable read': 'REPEATABLE READ',
|
|
137
|
+
serializable: 'SERIALIZABLE',
|
|
138
|
+
};
|
|
139
|
+
/** 最小连接池:空闲的复用,满了排队 */
|
|
140
|
+
class Pool {
|
|
141
|
+
options;
|
|
142
|
+
idle = [];
|
|
143
|
+
waiting = [];
|
|
144
|
+
size = 0;
|
|
145
|
+
constructor(options) {
|
|
146
|
+
this.options = options;
|
|
147
|
+
}
|
|
148
|
+
async acquire() {
|
|
149
|
+
const idle = this.idle.pop();
|
|
150
|
+
if (idle)
|
|
151
|
+
return idle;
|
|
152
|
+
if (this.size < (this.options.max ?? 5)) {
|
|
153
|
+
this.size++;
|
|
154
|
+
try {
|
|
155
|
+
return await this.open();
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
this.size--;
|
|
159
|
+
throw error;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return new Promise((resolve) => this.waiting.push(resolve));
|
|
163
|
+
}
|
|
164
|
+
release(client) {
|
|
165
|
+
const next = this.waiting.shift();
|
|
166
|
+
if (next)
|
|
167
|
+
next(client);
|
|
168
|
+
else
|
|
169
|
+
this.idle.push(client);
|
|
170
|
+
}
|
|
171
|
+
end() {
|
|
172
|
+
for (const client of this.idle.splice(0))
|
|
173
|
+
client.end();
|
|
174
|
+
}
|
|
175
|
+
async open() {
|
|
176
|
+
const { schema, max: _max, ...connect } = this.options;
|
|
177
|
+
const client = hdb.createClient(connect);
|
|
178
|
+
client.on('error', () => undefined);
|
|
179
|
+
await call((cb) => client.connect((error) => cb(error, undefined)));
|
|
180
|
+
if (schema)
|
|
181
|
+
await run(client, `SET SCHEMA "${schema.replace(/"/g, '""')}"`, []);
|
|
182
|
+
return client;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
class HanaDriver extends HanaSession {
|
|
186
|
+
pool;
|
|
187
|
+
constructor(pool) {
|
|
188
|
+
super(async () => {
|
|
189
|
+
const client = await pool.acquire();
|
|
190
|
+
return { client, release: () => pool.release(client) };
|
|
191
|
+
});
|
|
192
|
+
this.pool = pool;
|
|
193
|
+
}
|
|
194
|
+
async transaction(work, options) {
|
|
195
|
+
const client = await this.pool.acquire();
|
|
196
|
+
client.setAutoCommit(false);
|
|
197
|
+
try {
|
|
198
|
+
if (options?.isolation)
|
|
199
|
+
await run(client, `SET TRANSACTION ISOLATION LEVEL ${ISOLATION[options.isolation]}`, []);
|
|
200
|
+
if (options?.readOnly)
|
|
201
|
+
await run(client, 'SET TRANSACTION READ ONLY', []);
|
|
202
|
+
try {
|
|
203
|
+
const result = await work(new HanaSession(async () => ({ client, release: () => undefined })));
|
|
204
|
+
await call((cb) => client.commit((error) => cb(error, undefined)));
|
|
205
|
+
return result;
|
|
206
|
+
}
|
|
207
|
+
catch (error) {
|
|
208
|
+
await call((cb) => client.rollback((error) => cb(error, undefined)));
|
|
209
|
+
throw error;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
finally {
|
|
213
|
+
client.setAutoCommit(true);
|
|
214
|
+
this.pool.release(client);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
end() {
|
|
218
|
+
this.pool.end();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/** 关闭空闲连接(测试与进程退出时) */
|
|
222
|
+
export function closeHana(adapter) {
|
|
223
|
+
if (adapter.driver instanceof HanaDriver)
|
|
224
|
+
adapter.driver.end();
|
|
225
|
+
}
|
|
226
|
+
export function hana(options) {
|
|
227
|
+
return { dialect: new HanaDialect(), driver: new HanaDriver(new Pool(options)) };
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,GAAG,EAAE,EAAe,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAoJ,MAAM,4BAA4B,CAAA;AAEjN,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAErC,yCAAyC;AACzC,MAAM,QAAQ,GAAG,UAAU,CAAA;AAE3B,MAAM,OAAO,WAAY,SAAQ,OAAO;IAC7B,IAAI,GAAG,MAAM,CAAA;IACtB,iDAAiD;IAC/B,oBAAoB,GAAG,KAAK,CAAA;IAErC,UAAU,CAAC,IAAY,EAAE,CAAgB;QAChD,IAAI,CAAC,CAAC,MAAM;YAAE,OAAO,CAAC,CAAC,MAAM,CAAA;QAC7B,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,QAAQ,EAAE,OAAO,YAAY,CAAC,CAAC,MAAM,IAAI,GAAG,GAAG,CAAA;YACpD,KAAK,QAAQ,EAAE,OAAO,QAAQ,CAAA;YAC9B,KAAK,UAAU,EAAE,OAAO,WAAW,CAAA;YACnC,KAAK,MAAM,EAAE,OAAO,OAAO,CAAA;YAC3B,SAAS,OAAO,K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AC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;gBAC1E,MAAM,KAAK,CAAA;YACb,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;YAC1B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAC3B,CAAC;IACH,CAAC;IAED,GAAG;QACD,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAA;IACjB,CAAC;CACF;AAED,uBAAuB;AACvB,MAAM,UAAU,SAAS,CAAC,OAAgB;IACxC,IAAI,OAAO,CAAC,MAAM,YAAY,UAAU;QAAE,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,CAAA;AAChE,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,OAAoB;IACvC,OAAO,EAAE,OAAO,EAAE,IAAI,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,UAAU,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAA;AAClF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerodep-dev/easy-query-ts-hana",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "SAP HANA adapter (hdb) for @zerodep-dev/easy-query-ts",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "lionheart (https://github.com/kenconnet666)",
|
|
7
|
+
"homepage": "https://github.com/kenconnet666/easy-query/tree/main/ts#readme",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/kenconnet666/easy-query/issues"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/kenconnet666/easy-query.git",
|
|
14
|
+
"directory": "ts/packages/hana"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"sap-hana",
|
|
18
|
+
"hana",
|
|
19
|
+
"orm",
|
|
20
|
+
"easy-query"
|
|
21
|
+
],
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"src"
|
|
31
|
+
],
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"hdb": "^2.30.0",
|
|
37
|
+
"@zerodep-dev/easy-query-ts": "^0.1.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"hdb": "2.30.1",
|
|
41
|
+
"@zerodep-dev/easy-query-ts": "0.1.0",
|
|
42
|
+
"@zerodep-dev/easy-query-ts-test": "0.1.0"
|
|
43
|
+
},
|
|
44
|
+
"type": "module",
|
|
45
|
+
"sideEffects": false,
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc -b tsconfig.build.json"
|
|
48
|
+
},
|
|
49
|
+
"main": "./dist/index.js",
|
|
50
|
+
"types": "./dist/index.d.ts"
|
|
6
51
|
}
|
package/src/functions.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HANA 专属函数,与 Java 版同名同形:
|
|
3
|
+
* ```ts
|
|
4
|
+
* db.queryable(Doc).where(d => Hana.text(d.title, d.body).fuzzy('easy qurey', 0.8)).orderBy(d => Hana.text(d.title).score().desc())
|
|
5
|
+
* ```
|
|
6
|
+
* 列上要有 FULLTEXT INDEX,否则 CONTAINS 按整列值匹配。生成带 {@code hana.} 前缀的函数节点,别的方言 toSQL 时报不支持。
|
|
7
|
+
*/
|
|
8
|
+
import { codecs, dialectFn, type Expr, type FunctionRenderer, type Pred } from '@zerodep-dev/easy-query-ts'
|
|
9
|
+
|
|
10
|
+
export const Hana = {
|
|
11
|
+
text: (...columns: Expr<string | null>[]) => {
|
|
12
|
+
if (columns.length === 0) throw new Error('Hana.text needs at least one column')
|
|
13
|
+
return {
|
|
14
|
+
/** EXACT:按词,支持 "短语"、OR、-排除、* */
|
|
15
|
+
contains: (query: string): Pred => dialectFn<boolean>('hana.contains', [...columns, query], codecs.boolean),
|
|
16
|
+
/** 容错匹配,threshold 0–1(写进 SQL) */
|
|
17
|
+
fuzzy: (query: string, threshold: number): Pred => {
|
|
18
|
+
if (!(threshold >= 0 && threshold <= 1)) throw new RangeError(`fuzzy threshold must be between 0 and 1, got ${threshold}`)
|
|
19
|
+
return dialectFn<boolean>('hana.contains_fuzzy', [...columns, query, { k: 'lit', sql: String(threshold) }], codecs.boolean)
|
|
20
|
+
},
|
|
21
|
+
/** 本查询里 CONTAINS 的相关度 */
|
|
22
|
+
score: () => dialectFn<number>('hana.score', [], codecs.double),
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const columnList = (cols: string[]) => (cols.length === 1 ? cols[0]! : `(${cols.join(', ')})`)
|
|
28
|
+
|
|
29
|
+
/** 加进 HANA 方言的函数表 */
|
|
30
|
+
export const hanaFunctions: Record<string, FunctionRenderer> = {
|
|
31
|
+
// 通用函数里与标准写法不同的部分(HANA 的 LOCATE 参数顺序是 字符串、子串)
|
|
32
|
+
index_of: (a) => `(LOCATE(${a[0]}, ${a[1]}) - 1)`,
|
|
33
|
+
add_days: (a) => `ADD_DAYS(${a[0]}, ${a[1]})`,
|
|
34
|
+
add_months: (a) => `ADD_MONTHS(${a[0]}, ${a[1]})`,
|
|
35
|
+
diff_days: (a) => `DAYS_BETWEEN(${a[1]}, ${a[0]})`,
|
|
36
|
+
cast_string: (a) => `CAST(${a[0]} AS NVARCHAR(5000))`,
|
|
37
|
+
cast_double: (a) => `CAST(${a[0]} AS DOUBLE)`,
|
|
38
|
+
'hana.contains': (a) => `CONTAINS(${columnList(a.slice(0, -1))}, ${a[a.length - 1]})`,
|
|
39
|
+
'hana.contains_fuzzy': (a) => `CONTAINS(${columnList(a.slice(0, -2))}, ${a[a.length - 2]}, FUZZY(${a[a.length - 1]}))`,
|
|
40
|
+
'hana.score': () => 'SCORE()',
|
|
41
|
+
}
|
package/src/hdb.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** hdb(SAP 的纯 JS HANA 驱动)没有自带类型:这里只声明适配器用到的部分 */
|
|
2
|
+
declare module 'hdb' {
|
|
3
|
+
type Callback<T> = (error: Error | null, result: T) => void
|
|
4
|
+
|
|
5
|
+
export interface Statement {
|
|
6
|
+
exec(values: unknown[], cb: Callback<unknown>): void
|
|
7
|
+
drop(cb?: (error: Error | null) => void): void
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface Client {
|
|
11
|
+
connect(cb: (error: Error | null) => void): void
|
|
12
|
+
exec(sql: string, cb: Callback<unknown>): void
|
|
13
|
+
prepare(sql: string, cb: Callback<Statement>): void
|
|
14
|
+
setAutoCommit(autoCommit: boolean): void
|
|
15
|
+
commit(cb: (error: Error | null) => void): void
|
|
16
|
+
rollback(cb: (error: Error | null) => void): void
|
|
17
|
+
on(event: 'error', listener: (error: Error) => void): void
|
|
18
|
+
end(): void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ClientOptions {
|
|
22
|
+
host: string
|
|
23
|
+
port: number
|
|
24
|
+
user: string
|
|
25
|
+
password: string
|
|
26
|
+
[option: string]: unknown
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const hdb: { createClient(options: ClientOptions): Client }
|
|
30
|
+
export default hdb
|
|
31
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SAP HANA 2.0,驱动用 SAP 维护的纯 JS 驱动 hdb(不需要原生编译)。
|
|
3
|
+
* ```ts
|
|
4
|
+
* const db = createDb({ schema, adapter: hana({ host, port: 39041, user, password, schema: 'APP', max: 5 }) })
|
|
5
|
+
* ```
|
|
6
|
+
* 适配器自带一个小连接池(hdb 一个 client 就是一条连接)。自增主键在同一条连接上用 CURRENT_IDENTITY_VALUE() 取回。
|
|
7
|
+
*/
|
|
8
|
+
import hdb, { type Client } from 'hdb'
|
|
9
|
+
import { hanaFunctions } from './functions.ts'
|
|
10
|
+
import { Dialect, SqlWriter, type ColumnOptions, type Adapter, type Driver, type ExecuteResult, type FunctionRenderer, type InsertNode, type Session, type TransactionOptions } from '@zerodep-dev/easy-query-ts'
|
|
11
|
+
|
|
12
|
+
export { Hana } from './functions.ts'
|
|
13
|
+
|
|
14
|
+
/** HANA 的 LIMIT 不能省、OFFSET 前必须有 LIMIT */
|
|
15
|
+
const NO_LIMIT = 2147483647
|
|
16
|
+
|
|
17
|
+
export class HanaDialect extends Dialect {
|
|
18
|
+
readonly name = 'hana'
|
|
19
|
+
/** HANA 没有 WITH RECURSIVE(层级查询用 HIERARCHY 函数) */
|
|
20
|
+
override readonly supportsRecursiveCte = false
|
|
21
|
+
|
|
22
|
+
override columnType(kind: string, o: ColumnOptions): string {
|
|
23
|
+
if (o.dbType) return o.dbType
|
|
24
|
+
switch (kind) {
|
|
25
|
+
case 'string': return `NVARCHAR(${o.length ?? 255})`
|
|
26
|
+
case 'double': return 'DOUBLE'
|
|
27
|
+
case 'datetime': return 'TIMESTAMP'
|
|
28
|
+
case 'json': return 'NCLOB'
|
|
29
|
+
default: return super.columnType(kind, o)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** HANA 建列存表用 CREATE COLUMN TABLE,也没有 IF NOT EXISTS(表已存在会报错) */
|
|
34
|
+
override createTableStart(): string {
|
|
35
|
+
return 'CREATE COLUMN TABLE'
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** HANA 跳过被锁行的写法是 IGNORE LOCKED */
|
|
39
|
+
override forUpdate(wait?: 'nowait' | 'skip'): string {
|
|
40
|
+
return ' FOR UPDATE' + (wait === 'nowait' ? ' NOWAIT' : wait === 'skip' ? ' IGNORE LOCKED' : '')
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** HANA 没有 RELEASE SAVEPOINT:回滚到保存点即可,其余在事务结束时一起清掉 */
|
|
44
|
+
override releaseSavepoint(): string | undefined {
|
|
45
|
+
return undefined
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
protected override functions(): Record<string, FunctionRenderer> {
|
|
49
|
+
return {
|
|
50
|
+
...super.functions(),
|
|
51
|
+
length: (a) => `LENGTH(${a[0]})`,
|
|
52
|
+
// HANA 的 CONCAT 只收两个参数
|
|
53
|
+
concat: (a) => `(${a.join(' || ')})`,
|
|
54
|
+
...hanaFunctions,
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* upsert 写成 MERGE:USING 里每行一个 SELECT … FROM DUMMY(多行 UNION ALL),按 target 列匹配;ignore 时没有 WHEN MATCHED。
|
|
60
|
+
*/
|
|
61
|
+
override insert(q: InsertNode, w: SqlWriter = new SqlWriter()): string {
|
|
62
|
+
if (!q.conflict && q.rows.length === 1) return super.insert(q, w)
|
|
63
|
+
const cols = q.columns.map((c) => this.quote(c))
|
|
64
|
+
// 渲染时参数按出现顺序收集,所以 source 只渲染一次
|
|
65
|
+
const source = q.rows.map((r) => `SELECT ${r.map((n, i) => `${this.node(n, w)} AS ${cols[i]}`).join(', ')} FROM DUMMY`).join(' UNION ALL ')
|
|
66
|
+
// HANA 的 VALUES 只能一行:多行写成 INSERT … SELECT … FROM DUMMY UNION ALL …
|
|
67
|
+
if (!q.conflict) return `INSERT INTO ${this.table(q.table)} (${cols.join(', ')}) ${source}`
|
|
68
|
+
const on = q.conflict.target.map((t) => `eq_t.${this.quote(t)} = eq_s.${this.quote(t)}`).join(' AND ')
|
|
69
|
+
let sql = `MERGE INTO ${this.table(q.table)} eq_t USING (${source}) eq_s ON (${on})`
|
|
70
|
+
if (q.conflict.update.length > 0) {
|
|
71
|
+
sql += ` WHEN MATCHED THEN UPDATE SET ${q.conflict.update.map((u) => `eq_t.${this.quote(u)} = eq_s.${this.quote(u)}`).join(', ')}`
|
|
72
|
+
}
|
|
73
|
+
return `${sql} WHEN NOT MATCHED THEN INSERT (${cols.join(', ')}) VALUES (${cols.map((c) => `eq_s.${c}`).join(', ')})`
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* hdb 按服务器推断的参数类型校验 JS 类型;{@code SELECT ? FROM DUMMY}(多行插入、MERGE 的来源)里的参数被推成 NVARCHAR,只收字符串。
|
|
78
|
+
* 数值类型的参数也接受字符串,所以数一律转成字符串传。
|
|
79
|
+
*/
|
|
80
|
+
override encodeParam(value: unknown): unknown {
|
|
81
|
+
const v = super.encodeParam(value)
|
|
82
|
+
return typeof v === 'number' || typeof v === 'bigint' ? String(v) : v
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
override limitOffset(limit: number | undefined, offset: number | undefined): string {
|
|
86
|
+
if (limit === undefined && offset !== undefined && offset > 0) return ` LIMIT ${NO_LIMIT} OFFSET ${offset}`
|
|
87
|
+
return super.limitOffset(limit, offset)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function call<T>(fn: (cb: (error: Error | null, result: T) => void) => void): Promise<T> {
|
|
92
|
+
return new Promise((resolve, reject) => fn((error, result) => (error ? reject(error) : resolve(result))))
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async function run(client: Client, sql: string, params: readonly unknown[]): Promise<unknown> {
|
|
96
|
+
if (params.length === 0) return call<unknown>((cb) => client.exec(sql, cb))
|
|
97
|
+
const statement = await call<import('hdb').Statement>((cb) => client.prepare(sql, cb))
|
|
98
|
+
try {
|
|
99
|
+
return await call<unknown>((cb) => statement.exec([...params], cb))
|
|
100
|
+
} finally {
|
|
101
|
+
statement.drop()
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
class HanaSession implements Session {
|
|
106
|
+
protected readonly connection: () => Promise<{ client: Client; release: () => void }>
|
|
107
|
+
|
|
108
|
+
constructor(connection: () => Promise<{ client: Client; release: () => void }>) {
|
|
109
|
+
this.connection = connection
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
async query(sql: string, params: readonly unknown[]): Promise<Record<string, unknown>[]> {
|
|
113
|
+
const { client, release } = await this.connection()
|
|
114
|
+
try {
|
|
115
|
+
return (await run(client, sql, params)) as Record<string, unknown>[]
|
|
116
|
+
} finally {
|
|
117
|
+
release()
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
async execute(sql: string, params: readonly unknown[]): Promise<ExecuteResult> {
|
|
122
|
+
const { client, release } = await this.connection()
|
|
123
|
+
try {
|
|
124
|
+
const affected = Number(await run(client, sql, params))
|
|
125
|
+
if (!/^\s*INSERT\b/i.test(sql)) return { affected, insertId: undefined }
|
|
126
|
+
// 同一条连接上取刚生成的 IDENTITY;表没有 IDENTITY 列时为 NULL
|
|
127
|
+
const rows = (await run(client, 'SELECT CURRENT_IDENTITY_VALUE() AS "id" FROM DUMMY', [])) as { id: unknown }[]
|
|
128
|
+
const id = rows[0]?.id
|
|
129
|
+
return { affected, insertId: id === null || id === undefined ? undefined : toKey(id) }
|
|
130
|
+
} finally {
|
|
131
|
+
release()
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function toKey(value: unknown): number | bigint {
|
|
137
|
+
if (typeof value === 'number' || typeof value === 'bigint') return value
|
|
138
|
+
const n = Number(value)
|
|
139
|
+
return Number.isSafeInteger(n) ? n : BigInt(String(value))
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const ISOLATION = {
|
|
143
|
+
'read uncommitted': 'READ COMMITTED',
|
|
144
|
+
'read committed': 'READ COMMITTED',
|
|
145
|
+
'repeatable read': 'REPEATABLE READ',
|
|
146
|
+
serializable: 'SERIALIZABLE',
|
|
147
|
+
} as const
|
|
148
|
+
|
|
149
|
+
/** hdb 连接参数(hdb 自己没有类型,这里声明用到的字段;其余原样传给 hdb) */
|
|
150
|
+
export interface HdbClientOptions {
|
|
151
|
+
host: string
|
|
152
|
+
port: number
|
|
153
|
+
user: string
|
|
154
|
+
password: string
|
|
155
|
+
[option: string]: unknown
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface HanaOptions extends HdbClientOptions {
|
|
159
|
+
/** 连接后 SET SCHEMA */
|
|
160
|
+
schema?: string
|
|
161
|
+
/** 连接池上限,默认 5 */
|
|
162
|
+
max?: number
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** 最小连接池:空闲的复用,满了排队 */
|
|
166
|
+
class Pool {
|
|
167
|
+
private readonly options: HanaOptions
|
|
168
|
+
private readonly idle: Client[] = []
|
|
169
|
+
private readonly waiting: ((client: Client) => void)[] = []
|
|
170
|
+
private size = 0
|
|
171
|
+
|
|
172
|
+
constructor(options: HanaOptions) {
|
|
173
|
+
this.options = options
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
async acquire(): Promise<Client> {
|
|
177
|
+
const idle = this.idle.pop()
|
|
178
|
+
if (idle) return idle
|
|
179
|
+
if (this.size < (this.options.max ?? 5)) {
|
|
180
|
+
this.size++
|
|
181
|
+
try {
|
|
182
|
+
return await this.open()
|
|
183
|
+
} catch (error) {
|
|
184
|
+
this.size--
|
|
185
|
+
throw error
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return new Promise((resolve) => this.waiting.push(resolve))
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
release(client: Client): void {
|
|
192
|
+
const next = this.waiting.shift()
|
|
193
|
+
if (next) next(client)
|
|
194
|
+
else this.idle.push(client)
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
end(): void {
|
|
198
|
+
for (const client of this.idle.splice(0)) client.end()
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
private async open(): Promise<Client> {
|
|
202
|
+
const { schema, max: _max, ...connect } = this.options
|
|
203
|
+
const client = hdb.createClient(connect)
|
|
204
|
+
client.on('error', () => undefined)
|
|
205
|
+
await call<void>((cb) => client.connect((error) => cb(error, undefined)))
|
|
206
|
+
if (schema) await run(client, `SET SCHEMA "${schema.replace(/"/g, '""')}"`, [])
|
|
207
|
+
return client
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
class HanaDriver extends HanaSession implements Driver {
|
|
212
|
+
private readonly pool: Pool
|
|
213
|
+
|
|
214
|
+
constructor(pool: Pool) {
|
|
215
|
+
super(async () => {
|
|
216
|
+
const client = await pool.acquire()
|
|
217
|
+
return { client, release: () => pool.release(client) }
|
|
218
|
+
})
|
|
219
|
+
this.pool = pool
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
async transaction<T>(work: (session: Session) => Promise<T>, options?: TransactionOptions): Promise<T> {
|
|
223
|
+
const client = await this.pool.acquire()
|
|
224
|
+
client.setAutoCommit(false)
|
|
225
|
+
try {
|
|
226
|
+
if (options?.isolation) await run(client, `SET TRANSACTION ISOLATION LEVEL ${ISOLATION[options.isolation]}`, [])
|
|
227
|
+
if (options?.readOnly) await run(client, 'SET TRANSACTION READ ONLY', [])
|
|
228
|
+
try {
|
|
229
|
+
const result = await work(new HanaSession(async () => ({ client, release: () => undefined })))
|
|
230
|
+
await call<void>((cb) => client.commit((error) => cb(error, undefined)))
|
|
231
|
+
return result
|
|
232
|
+
} catch (error) {
|
|
233
|
+
await call<void>((cb) => client.rollback((error) => cb(error, undefined)))
|
|
234
|
+
throw error
|
|
235
|
+
}
|
|
236
|
+
} finally {
|
|
237
|
+
client.setAutoCommit(true)
|
|
238
|
+
this.pool.release(client)
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
end(): void {
|
|
243
|
+
this.pool.end()
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/** 关闭空闲连接(测试与进程退出时) */
|
|
248
|
+
export function closeHana(adapter: Adapter): void {
|
|
249
|
+
if (adapter.driver instanceof HanaDriver) adapter.driver.end()
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export function hana(options: HanaOptions): Adapter {
|
|
253
|
+
return { dialect: new HanaDialect(), driver: new HanaDriver(new Pool(options)) }
|
|
254
|
+
}
|