jsql-neo 5.5.0 → 6.0.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.
Files changed (81) hide show
  1. package/LICENSE +202 -202
  2. package/README.md +8155 -8097
  3. package/bin/jsql +320 -320
  4. package/bin/jsql-server +90 -90
  5. package/bin/jsql-server-control.js +177 -177
  6. package/index.d.ts +412 -385
  7. package/index.js +128 -124
  8. package/lib/ast.js +214 -214
  9. package/lib/btree.js +478 -413
  10. package/lib/cache.js +328 -328
  11. package/lib/client.js +125 -125
  12. package/lib/database.js +1741 -1744
  13. package/lib/date-types.js +182 -182
  14. package/lib/errors.js +89 -89
  15. package/lib/jsql_format.js +497 -497
  16. package/lib/migrate.js +254 -254
  17. package/lib/mod.js +292 -292
  18. package/lib/mongo_server.js +607 -607
  19. package/lib/multiserver.js +140 -140
  20. package/lib/mysql_compat.js +413 -413
  21. package/lib/mysql_server.js +1237 -1237
  22. package/lib/native_client.js +722 -732
  23. package/lib/nedb_compat.js +506 -506
  24. package/lib/pg_server.js +864 -864
  25. package/lib/plugin.js +259 -35
  26. package/lib/plugins/audit.js +37 -0
  27. package/lib/plugins/index.js +72 -0
  28. package/lib/plugins/logger.js +35 -0
  29. package/lib/plugins/metrics.js +38 -0
  30. package/lib/plugins/timestamps.js +57 -0
  31. package/lib/plugins/validation.js +128 -0
  32. package/lib/prepared.js +37 -0
  33. package/lib/query.js +834 -815
  34. package/lib/redis_server.js +571 -571
  35. package/lib/sql.js +4053 -3460
  36. package/lib/sqlite_compat.js +323 -323
  37. package/lib/sqlite_worker.js +264 -264
  38. package/lib/table.js +1351 -1304
  39. package/lib/tui.js +502 -502
  40. package/lib/wasm.js +1 -1
  41. package/lib/wasm_client.js +715 -718
  42. package/lib/web_ui.js +257 -257
  43. package/native/jsql-neo-native.node +0 -0
  44. package/nativesrc/jsql-neo-core/Cargo.lock +462 -455
  45. package/nativesrc/jsql-neo-core/Cargo.toml +26 -24
  46. package/nativesrc/jsql-neo-core/src/engine/hybrid.rs +492 -455
  47. package/nativesrc/jsql-neo-core/src/engine/memory.rs +191 -168
  48. package/nativesrc/jsql-neo-core/src/engine/mod.rs +74 -62
  49. package/nativesrc/jsql-neo-core/src/engine/table.rs +996 -700
  50. package/nativesrc/jsql-neo-core/src/lib.rs +2 -2
  51. package/nativesrc/jsql-neo-core/src/storage/mod.rs +2 -2
  52. package/nativesrc/jsql-neo-core/src/storage/persistent.rs +1 -1
  53. package/nativesrc/jsql-neo-core/src/storage/wal.rs +298 -85
  54. package/nativesrc/jsql-neo-core/src/types.rs +93 -93
  55. package/nativesrc/jsql-neo-native/Cargo.lock +613 -606
  56. package/nativesrc/jsql-neo-native/Cargo.toml +24 -16
  57. package/nativesrc/jsql-neo-native/build.rs +3 -3
  58. package/nativesrc/jsql-neo-native/package.json +7 -7
  59. package/nativesrc/jsql-neo-native/src/lib.rs +281 -269
  60. package/nativesrc/jsql-neo-wasm/Cargo.lock +472 -465
  61. package/nativesrc/jsql-neo-wasm/Cargo.toml +22 -15
  62. package/nativesrc/jsql-neo-wasm/src/lib.rs +463 -447
  63. package/package.json +87 -87
  64. package/postinstall.js +158 -158
  65. package/test/btree.test.js +144 -128
  66. package/test/coverage.js +187 -187
  67. package/test/join.test.js +110 -110
  68. package/test/native.test.js +158 -158
  69. package/test/query-opt.test.js +109 -0
  70. package/test/regress-5.1.0.js +271 -271
  71. package/test/smoke.js +58 -58
  72. package/test/sql-parser.test.js +450 -273
  73. package/test/wasm.test.js +110 -110
  74. package/wasm/browser.d.ts +89 -89
  75. package/wasm/browser.mjs +591 -569
  76. package/wasm/browser_bg.mjs +618 -597
  77. package/wasm/jsql_neo_wasm.d.ts +44 -38
  78. package/wasm/jsql_neo_wasm.js +641 -520
  79. package/wasm/jsql_neo_wasm_bg.wasm +0 -0
  80. package/wasm/jsql_neo_wasm_bg.wasm.d.ts +26 -26
  81. package/wasm/package.json +11 -11
@@ -1,38 +1,44 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
-
4
- export function jsql_begin_tx(): string;
5
-
6
- export function jsql_commit_tx(tx_id: string): string;
7
-
8
- export function jsql_count(table: string): string;
9
-
10
- export function jsql_create_table(name: string, schema_json: string): string;
11
-
12
- export function jsql_drop_table(name: string): string;
13
-
14
- export function jsql_find(table: string, filter_json: string, limit: number, offset: number): string;
15
-
16
- export function jsql_find_by_id(table: string, id: bigint): string;
17
-
18
- export function jsql_find_by_ids(table: string, ids_json: string): string;
19
-
20
- export function jsql_insert(table: string, data_json: string): string;
21
-
22
- export function jsql_insert_buf(table: string, data: Uint8Array): string;
23
-
24
- export function jsql_insert_buf_count(table: string, data: Uint8Array): string;
25
-
26
- export function jsql_insert_json(table: string, json: string): string;
27
-
28
- export function jsql_remove_by_id(table: string, id: bigint): string;
29
-
30
- export function jsql_remove_by_ids(table: string, ids_json: string): string;
31
-
32
- export function jsql_reset(): void;
33
-
34
- export function jsql_rollback_tx(tx_id: string): string;
35
-
36
- export function jsql_update_by_id(table: string, id: bigint, data_json: string): string;
37
-
38
- export function jsql_update_by_ids(table: string, batch_json: string): string;
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /**
5
+ * 运行期加列:扩展表结构并为已有行回填默认值。
6
+ * fs_json 为单个 FieldSchema 的 JSON,例如 {"type":"integer","nullable":true,"default":0}
7
+ */
8
+ export function jsql_add_column(table: string, name: string, fs_json: string): string;
9
+
10
+ export function jsql_begin_tx(): string;
11
+
12
+ export function jsql_commit_tx(tx_id: string): string;
13
+
14
+ export function jsql_count(table: string): string;
15
+
16
+ export function jsql_create_table(name: string, schema_json: string): string;
17
+
18
+ export function jsql_drop_table(name: string): string;
19
+
20
+ export function jsql_find(table: string, filter_json: string, limit: number, offset: number): string;
21
+
22
+ export function jsql_find_by_id(table: string, id: bigint): string;
23
+
24
+ export function jsql_find_by_ids(table: string, ids_json: string): string;
25
+
26
+ export function jsql_insert(table: string, data_json: string): string;
27
+
28
+ export function jsql_insert_buf(table: string, data: Uint8Array): string;
29
+
30
+ export function jsql_insert_buf_count(table: string, data: Uint8Array): string;
31
+
32
+ export function jsql_insert_json(table: string, json: string): string;
33
+
34
+ export function jsql_remove_by_id(table: string, id: bigint): string;
35
+
36
+ export function jsql_remove_by_ids(table: string, ids_json: string): string;
37
+
38
+ export function jsql_reset(): void;
39
+
40
+ export function jsql_rollback_tx(tx_id: string): string;
41
+
42
+ export function jsql_update_by_id(table: string, id: bigint, data_json: string): string;
43
+
44
+ export function jsql_update_by_ids(table: string, batch_json: string): string;