@proteinjs/db-driver-knex 1.14.1 → 1.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +5 -3
  3. package/dist/generated/index.js +1 -1
  4. package/dist/generated/index.js.map +1 -1
  5. package/dist/generated/test/index.js +1 -1
  6. package/dist/generated/test/index.js.map +1 -1
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +1 -0
  10. package/dist/index.js.map +1 -1
  11. package/dist/src/KnexConfig.d.ts +8 -0
  12. package/dist/src/KnexConfig.d.ts.map +1 -1
  13. package/dist/src/KnexDriver.d.ts +8 -7
  14. package/dist/src/KnexDriver.d.ts.map +1 -1
  15. package/dist/src/KnexDriver.js +52 -36
  16. package/dist/src/KnexDriver.js.map +1 -1
  17. package/dist/src/KnexFailureLine.d.ts +58 -0
  18. package/dist/src/KnexFailureLine.d.ts.map +1 -0
  19. package/dist/src/KnexFailureLine.js +124 -0
  20. package/dist/src/KnexFailureLine.js.map +1 -0
  21. package/dist/test/LogValuesSwitch.test.js +13 -7
  22. package/dist/test/LogValuesSwitch.test.js.map +1 -1
  23. package/dist/test/OperationDeadline.test.d.ts +2 -0
  24. package/dist/test/OperationDeadline.test.d.ts.map +1 -0
  25. package/dist/test/OperationDeadline.test.js +166 -0
  26. package/dist/test/OperationDeadline.test.js.map +1 -0
  27. package/dist/test/StatementLogNeverThrows.test.js +23 -29
  28. package/dist/test/StatementLogNeverThrows.test.js.map +1 -1
  29. package/dist/test/StatementParamLogging.test.js +16 -41
  30. package/dist/test/StatementParamLogging.test.js.map +1 -1
  31. package/dist/test/VendorTextNeverOnALine.test.d.ts +2 -0
  32. package/dist/test/VendorTextNeverOnALine.test.d.ts.map +1 -0
  33. package/dist/test/VendorTextNeverOnALine.test.js +330 -0
  34. package/dist/test/VendorTextNeverOnALine.test.js.map +1 -0
  35. package/generated/index.ts +1 -1
  36. package/generated/test/index.ts +1 -1
  37. package/index.ts +1 -0
  38. package/package.json +5 -5
  39. package/src/KnexConfig.ts +8 -0
  40. package/src/KnexDriver.ts +36 -37
  41. package/src/KnexFailureLine.ts +127 -0
  42. package/test/LogValuesSwitch.test.ts +3 -1
  43. package/test/OperationDeadline.test.ts +118 -0
  44. package/test/StatementLogNeverThrows.test.ts +24 -20
  45. package/test/StatementParamLogging.test.ts +12 -17
  46. package/test/VendorTextNeverOnALine.test.ts +257 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,30 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.15.1](https://github.com/proteinjs/db/compare/@proteinjs/db-driver-knex@1.15.0...@proteinjs/db-driver-knex@1.15.1) (2026-09-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **db-driver-knex:** a statement past its operation deadline reads on a line as timed out — the query layer's timeout error carries the statement's bindings and is marked like any failure, and its sentence is named by the error's name (it carries no vendor code); red first: the line read 'the database refused the statement' ([ae44a8d](https://github.com/proteinjs/db/commit/ae44a8d8058715afd1b07d8ed9dbca576724a035))
12
+ * **db-driver-knex:** the failure line's cause carries the driver's sentence as message — one field name across drivers ([91a0e33](https://github.com/proteinjs/db/commit/91a0e33e5e8c38644a046536588874f72c7e0ac0))
13
+ * **db-driver-knex:** the vendor's text rides no log line — a failure reads as its codes and the driver's sentence; what is thrown is unchanged ([1e08534](https://github.com/proteinjs/db/commit/1e085344d7d6c7c67751969828150edb7e458146))
14
+
15
+
16
+
17
+
18
+
19
+ # [1.15.0](https://github.com/proteinjs/db/compare/@proteinjs/db-driver-knex@1.14.1...@proteinjs/db-driver-knex@1.15.0) (2026-09-24)
20
+
21
+
22
+ ### Features
23
+
24
+ * **db-driver-knex:** every query and DML statement runs under a per-operation deadline — KnexConfig.operationDeadlineMs, 60 s by default; a statement past it is cancelled on the server and fails naming the deadline ([661ee69](https://github.com/proteinjs/db/commit/661ee692fab0a5250d4124eaa9c25842ee3e892f))
25
+
26
+
27
+
28
+
29
+
6
30
  ## [1.14.1](https://github.com/proteinjs/db/compare/@proteinjs/db-driver-knex@1.14.0...@proteinjs/db-driver-knex@1.14.1) (2026-09-24)
7
31
 
8
32
  **Note:** Version bump only for package @proteinjs/db-driver-knex
package/README.md CHANGED
@@ -6,10 +6,12 @@
6
6
 
7
7
  # What the driver's log lines carry
8
8
 
9
- The driver never prints the value of a parameter bound to a statement. Its failure line (`Failed when executing sql`, at error) carries the SQL text (placeholders only), as `params` a description of each parameter (its position — or, for a bindings dictionary bound to `:name` placeholders, its name — the kind of its value and, for strings, arrays and bytes, its length), and as `cause` a summary of the failure: the error's name, the vendor's codes (`ER_DUP_ENTRY`, errno, SQLSTATE) and the server's own message. The vendor error itself is no longer on the line: the query layer rewrites a failed query's `message` to the SQL with every binding interpolated, and the client library's error carries the same text as `sql`.
9
+ The driver never prints the value of a parameter bound to a statement. Its failure line (`Failed when executing sql`, at error) carries the SQL text (placeholders only), as `params` a description of each parameter (its position — or, for a bindings dictionary bound to `:name` placeholders, its name — the kind of its value and, for strings, arrays and bytes, its length), and as `cause` a summary of the failure: the error's name, the vendor's codes (`ER_DUP_ENTRY`, errno, SQLSTATE) and, as `message`, a sentence of the driver's own (`a row with that key already exists`) — never the server's message, which quotes the value it refused (`Duplicate entry '…' for key …`). The vendor error itself is no longer on the line: the query layer rewrites a failed query's `message` to the SQL with every binding interpolated, and the client library's error carries the same text as `sql`.
10
10
 
11
- To debug against a local dev database with the real values, set `DB_LOG_PARAM_VALUES=1` in a process that also has `DEVELOPMENT` set: the line then adds `paramValues` (the parameters as bound) and carries the vendor error itself as `error`. With either variable unset the line never carries them. The switch changes the log line only.
11
+ To debug against a local dev database with the real values, set `DB_LOG_PARAM_VALUES=1` in a process that also has `DEVELOPMENT` set: the line then adds `paramValues` (the parameters as bound), adds the server's message to `cause` as `sqlMessage`, and carries the vendor error itself as `error`. With either variable unset the line never carries them. The switch changes log lines only.
12
12
 
13
13
  Writing the line never changes what the driver throws. The description is built for whatever bindings the statement carries (a value that cannot be read is described as `unreadable`), and the line is written through one guarded door: if building or writing it fails — a log writer that throws, a value the writer cannot serialize — the driver writes the fixed line `Failed to write a statement log line` instead, which carries nothing of the statement, and throws the vendor's error exactly as it was going to.
14
14
 
15
- What this does NOT cover: the driver throws the vendor's error untouched, exactly as before — so a caller that prints what it catches still prints the interpolated SQL — and the server's own message can echo a bound value (`Duplicate entry '…' for key …`), which the `cause` summary passes on as `sqlMessage`. Closing those is parked on the branch `fix/driver-logs-never-carry-param-values`, pending a decision.
15
+ What the driver THROWS is the vendor's error itself, untouched — and a caller's log line about it is covered too. Every failure that leaves the driver (a statement's, a refused commit's) is marked with the logger (`LogLineErrors.mark` in `@proteinjs/logger`; `KnexFailureLine` owns the wording), which never touches the error: any `Logger` line that carries it — as the line's `error`, inside its `obj`, as another error's `cause` — prints a stand-in made of the vendor's codes, the driver's sentence (`Failed when executing sql (ER_DUP_ENTRY, errno 1062): a row with that key already exists`) and the original's stack frames, in place of the interpolated SQL and the server's message. A statement past its operation deadline fails with the query layer's own timeout error, which carries the statement's bindings too: it is marked the same way and reads `Failed when executing sql: the statement or its wait for a connection timed out`. Behind the values switch a marked error prints as it is. What is covered is an error OBJECT that reaches a `Logger`: text copied out of one first (`error.message` in a template, `String(error)`) prints as it is — log the error itself. A schema operation of this driver rejects with a STRING that embeds the vendor's reason; a string cannot be marked, so that text is not covered.
16
+
17
+ What this does NOT cover: text a caller copies out of the error before logging it (`` `failed: ${error.message}` ``, `String(error)`) is a string by the time the logger sees it — pass the error itself. And the schema operations reject with a string that embeds the vendor's reason; a caller that logs that string prints it.
@@ -20,7 +20,7 @@ require("@proteinjs/db-query");
20
20
  require("@proteinjs/db-transaction-context");
21
21
  require("@proteinjs/logger");
22
22
  /** Generate Source Graph */
23
- var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-driver-knex/KnexDriver\",\"value\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexDriver\",\"filePath\":\"src/KnexDriver.ts\",\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexDriver\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"KNEX\",\"type\":{\"packageName\":\"\",\"name\":\"knex\",\"filePath\":null,\"qualifiedName\":\"/knex\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"config\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexConfig\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"knexConfig\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"getTable\",\"type\":{\"packageName\":\"\",\"name\":\"((name: string) => Table<any>) | undefined\",\"filePath\":null,\"qualifiedName\":\"/((name: string) => Table<any>) | undefined\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getKnex\",\"returnType\":{\"packageName\":\"\",\"name\":\"knex\",\"filePath\":null,\"qualifiedName\":\"/knex\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getDbName\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"createDbIfNotExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"createDb\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"options\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"{ ddl?: string[] }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/{ ddl?: string[] }\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"dropDb\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"dbExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"databaseName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"start\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"stop\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setMaxAllowedPacketSize\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getTableManager\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableManager\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableManager\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"handleCaseSensitivity\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tableName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"columnName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"caseSensitive\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runQuery\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<SerializedRecord[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<SerializedRecord[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverQueryStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverQueryStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"knex\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"knex/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverDmlStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverDmlStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"knex\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"knex/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runTransaction\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fn\",\"type\":{\"packageName\":\"\",\"name\":\"(transaction: Transaction) => Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/(transaction: Transaction) => Promise<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"logFailure\",\"returnType\":{\"packageName\":\"\",\"name\":\"void\",\"filePath\":null,\"qualifiedName\":\"/void\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"sql\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"error\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"writeStatementLine\",\"returnType\":{\"packageName\":\"\",\"name\":\"void\",\"filePath\":null,\"qualifiedName\":\"/void\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"write\",\"type\":{\"packageName\":\"\",\"name\":\"() => void\",\"filePath\":null,\"qualifiedName\":\"/() => void\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"causeSummary\",\"returnType\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"FailureCauseSummary\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/FailureCauseSummary\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"error\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"describeParams\",\"returnType\":{\"packageName\":\"\",\"name\":\"ParamsDescription | undefined\",\"filePath\":null,\"qualifiedName\":\"/ParamsDescription | undefined\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"describeParam\",\"returnType\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"ParamDescription\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/ParamDescription\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"read\",\"type\":{\"packageName\":\"\",\"name\":\"() => unknown\",\"filePath\":null,\"qualifiedName\":\"/() => unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"paramKind\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"value\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"isDictionary\",\"returnType\":{\"packageName\":\"\",\"name\":\"params is { [name: string]: unknown }\",\"filePath\":null,\"qualifiedName\":\"/params is { [name: string]: unknown }\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"vendorFact\",\"returnType\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"error\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"fact\",\"type\":{\"packageName\":\"\",\"name\":\"keyof FailureCauseSummary\",\"filePath\":null,\"qualifiedName\":\"/keyof FailureCauseSummary\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/DbDriver\"},{\"v\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"value\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexSchemaOperations\",\"filePath\":\"src/KnexSchemaOperations.ts\",\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"knexDriver\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexDriver\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"createTables\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tables\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>[]\",\"filePath\":null,\"qualifiedName\":\"/Table<any>[]\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"alterTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createColumn\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"column\",\"type\":{\"packageName\":\"\",\"name\":\"Column<any, any>\",\"filePath\":null,\"qualifiedName\":\"/Column<any, any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableBuilder\",\"type\":{\"packageName\":\"\",\"name\":\"knex.TableBuilder\",\"filePath\":null,\"qualifiedName\":\"/knex.TableBuilder\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"SchemaOperations\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SchemaOperations\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/SchemaOperations\"}],\"edges\":[{\"v\":\"@proteinjs/db-driver-knex/KnexDriver\",\"w\":\"@proteinjs/db/DbDriver\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"w\":\"@proteinjs/db/SchemaOperations\",\"value\":\"implements interface\"}]}";
23
+ var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-driver-knex/KnexDriver\",\"value\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexDriver\",\"filePath\":\"src/KnexDriver.ts\",\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexDriver\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"KNEX\",\"type\":{\"packageName\":\"\",\"name\":\"knex\",\"filePath\":null,\"qualifiedName\":\"/knex\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"DEFAULT_OPERATION_DEADLINE_MS\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"config\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexConfig\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"knexConfig\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"getTable\",\"type\":{\"packageName\":\"\",\"name\":\"((name: string) => Table<any>) | undefined\",\"filePath\":null,\"qualifiedName\":\"/((name: string) => Table<any>) | undefined\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getKnex\",\"returnType\":{\"packageName\":\"\",\"name\":\"knex\",\"filePath\":null,\"qualifiedName\":\"/knex\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getDbName\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"createDbIfNotExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"createDb\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"options\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"{ ddl?: string[] }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/{ ddl?: string[] }\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"dropDb\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"dbExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"databaseName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"start\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"stop\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setMaxAllowedPacketSize\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getTableManager\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableManager\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableManager\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"handleCaseSensitivity\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tableName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"columnName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"caseSensitive\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runQuery\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<SerializedRecord[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<SerializedRecord[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverQueryStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverQueryStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"knex\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"knex/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverDmlStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverDmlStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"knex\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"knex/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runTransaction\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fn\",\"type\":{\"packageName\":\"\",\"name\":\"(transaction: Transaction) => Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/(transaction: Transaction) => Promise<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getOperationDeadlineMs\",\"returnType\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"logFailure\",\"returnType\":{\"packageName\":\"\",\"name\":\"void\",\"filePath\":null,\"qualifiedName\":\"/void\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"sql\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"error\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"writeStatementLine\",\"returnType\":{\"packageName\":\"\",\"name\":\"void\",\"filePath\":null,\"qualifiedName\":\"/void\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"write\",\"type\":{\"packageName\":\"\",\"name\":\"() => void\",\"filePath\":null,\"qualifiedName\":\"/() => void\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"describeParams\",\"returnType\":{\"packageName\":\"\",\"name\":\"ParamsDescription | undefined\",\"filePath\":null,\"qualifiedName\":\"/ParamsDescription | undefined\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"describeParam\",\"returnType\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"ParamDescription\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/ParamDescription\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"read\",\"type\":{\"packageName\":\"\",\"name\":\"() => unknown\",\"filePath\":null,\"qualifiedName\":\"/() => unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"paramKind\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"value\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"isDictionary\",\"returnType\":{\"packageName\":\"\",\"name\":\"params is { [name: string]: unknown }\",\"filePath\":null,\"qualifiedName\":\"/params is { [name: string]: unknown }\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/DbDriver\"},{\"v\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"value\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexSchemaOperations\",\"filePath\":\"src/KnexSchemaOperations.ts\",\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"knexDriver\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexDriver\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"createTables\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tables\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>[]\",\"filePath\":null,\"qualifiedName\":\"/Table<any>[]\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"alterTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createColumn\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"column\",\"type\":{\"packageName\":\"\",\"name\":\"Column<any, any>\",\"filePath\":null,\"qualifiedName\":\"/Column<any, any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableBuilder\",\"type\":{\"packageName\":\"\",\"name\":\"knex.TableBuilder\",\"filePath\":null,\"qualifiedName\":\"/knex.TableBuilder\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"SchemaOperations\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SchemaOperations\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/SchemaOperations\"}],\"edges\":[{\"v\":\"@proteinjs/db-driver-knex/KnexDriver\",\"w\":\"@proteinjs/db/DbDriver\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"w\":\"@proteinjs/db/SchemaOperations\",\"value\":\"implements interface\"}]}";
24
24
  /** Generate Source Links */
25
25
  var KnexDriver_1 = require("../src/KnexDriver");
26
26
  var KnexSchemaOperations_1 = require("../src/KnexSchemaOperations");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,+BAA6B;AAC7B,6CAA2C;AAC3C,6BAA2B;AAG3B,4BAA4B;AAE5B,IAAM,WAAW,GAAG,uxgBAAuxgB,CAAC;AAG5ygB,4BAA4B;AAE5B,gDAA+C;AAC/C,oEAAmE;AAEnE,IAAM,WAAW,GAAG;IACnB,sCAAsC,EAAE,uBAAU;IAClD,gDAAgD,EAAE,2CAAoB;CACtE,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,+BAA6B;AAC7B,6CAA2C;AAC3C,6BAA2B;AAG3B,4BAA4B;AAE5B,IAAM,WAAW,GAAG,shfAAshf,CAAC;AAG3if,4BAA4B;AAE5B,gDAA+C;AAC/C,oEAAmE;AAEnE,IAAM,WAAW,GAAG;IACnB,sCAAsC,EAAE,uBAAU;IAClD,gDAAgD,EAAE,2CAAoB;CACtE,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
@@ -20,7 +20,7 @@ require("@proteinjs/db-query");
20
20
  require("@proteinjs/db-transaction-context");
21
21
  require("@proteinjs/logger");
22
22
  /** Generate Source Graph */
23
- var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-driver-knex/TestDbDriverFactory\",\"value\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"TestDbDriverFactory\",\"filePath\":\"test/config/TestDbDriverFactory.ts\",\"qualifiedName\":\"@proteinjs/db-driver-knex/TestDbDriverFactory\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"getDbDriver\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"DefaultDbDriverFactory\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DefaultDbDriverFactory\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/DefaultDbDriverFactory\"},{\"v\":\"@proteinjs/db-driver-knex/KnexDriver\",\"value\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexDriver\",\"filePath\":\"src/KnexDriver.ts\",\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexDriver\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"KNEX\",\"type\":{\"packageName\":\"\",\"name\":\"knex\",\"filePath\":null,\"qualifiedName\":\"/knex\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"config\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexConfig\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"knexConfig\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"getTable\",\"type\":{\"packageName\":\"\",\"name\":\"((name: string) => Table<any>) | undefined\",\"filePath\":null,\"qualifiedName\":\"/((name: string) => Table<any>) | undefined\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getKnex\",\"returnType\":{\"packageName\":\"\",\"name\":\"knex\",\"filePath\":null,\"qualifiedName\":\"/knex\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getDbName\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"createDbIfNotExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"createDb\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"options\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"{ ddl?: string[] }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/{ ddl?: string[] }\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"dropDb\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"dbExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"databaseName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"start\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"stop\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setMaxAllowedPacketSize\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getTableManager\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableManager\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableManager\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"handleCaseSensitivity\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tableName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"columnName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"caseSensitive\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runQuery\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<SerializedRecord[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<SerializedRecord[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverQueryStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverQueryStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"knex\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"knex/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverDmlStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverDmlStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"knex\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"knex/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runTransaction\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fn\",\"type\":{\"packageName\":\"\",\"name\":\"(transaction: Transaction) => Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/(transaction: Transaction) => Promise<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"logFailure\",\"returnType\":{\"packageName\":\"\",\"name\":\"void\",\"filePath\":null,\"qualifiedName\":\"/void\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"sql\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"error\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"writeStatementLine\",\"returnType\":{\"packageName\":\"\",\"name\":\"void\",\"filePath\":null,\"qualifiedName\":\"/void\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"write\",\"type\":{\"packageName\":\"\",\"name\":\"() => void\",\"filePath\":null,\"qualifiedName\":\"/() => void\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"causeSummary\",\"returnType\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"FailureCauseSummary\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/FailureCauseSummary\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"error\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"describeParams\",\"returnType\":{\"packageName\":\"\",\"name\":\"ParamsDescription | undefined\",\"filePath\":null,\"qualifiedName\":\"/ParamsDescription | undefined\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"describeParam\",\"returnType\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"ParamDescription\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/ParamDescription\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"read\",\"type\":{\"packageName\":\"\",\"name\":\"() => unknown\",\"filePath\":null,\"qualifiedName\":\"/() => unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"paramKind\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"value\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"isDictionary\",\"returnType\":{\"packageName\":\"\",\"name\":\"params is { [name: string]: unknown }\",\"filePath\":null,\"qualifiedName\":\"/params is { [name: string]: unknown }\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"vendorFact\",\"returnType\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"error\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"fact\",\"type\":{\"packageName\":\"\",\"name\":\"keyof FailureCauseSummary\",\"filePath\":null,\"qualifiedName\":\"/keyof FailureCauseSummary\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/DbDriver\"},{\"v\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"value\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexSchemaOperations\",\"filePath\":\"src/KnexSchemaOperations.ts\",\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"knexDriver\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexDriver\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"createTables\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tables\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>[]\",\"filePath\":null,\"qualifiedName\":\"/Table<any>[]\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"alterTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createColumn\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"column\",\"type\":{\"packageName\":\"\",\"name\":\"Column<any, any>\",\"filePath\":null,\"qualifiedName\":\"/Column<any, any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableBuilder\",\"type\":{\"packageName\":\"\",\"name\":\"knex.TableBuilder\",\"filePath\":null,\"qualifiedName\":\"/knex.TableBuilder\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"SchemaOperations\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SchemaOperations\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/SchemaOperations\"}],\"edges\":[{\"v\":\"@proteinjs/db-driver-knex/TestDbDriverFactory\",\"w\":\"@proteinjs/db/DefaultDbDriverFactory\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-driver-knex/KnexDriver\",\"w\":\"@proteinjs/db/DbDriver\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"w\":\"@proteinjs/db/SchemaOperations\",\"value\":\"implements interface\"}]}";
23
+ var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-driver-knex/TestDbDriverFactory\",\"value\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"TestDbDriverFactory\",\"filePath\":\"test/config/TestDbDriverFactory.ts\",\"qualifiedName\":\"@proteinjs/db-driver-knex/TestDbDriverFactory\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"getDbDriver\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"DefaultDbDriverFactory\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DefaultDbDriverFactory\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/DefaultDbDriverFactory\"},{\"v\":\"@proteinjs/db-driver-knex/KnexDriver\",\"value\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexDriver\",\"filePath\":\"src/KnexDriver.ts\",\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexDriver\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"KNEX\",\"type\":{\"packageName\":\"\",\"name\":\"knex\",\"filePath\":null,\"qualifiedName\":\"/knex\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"DEFAULT_OPERATION_DEADLINE_MS\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":true,\"visibility\":\"private\"},{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"config\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexConfig\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"knexConfig\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"getTable\",\"type\":{\"packageName\":\"\",\"name\":\"((name: string) => Table<any>) | undefined\",\"filePath\":null,\"qualifiedName\":\"/((name: string) => Table<any>) | undefined\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getKnex\",\"returnType\":{\"packageName\":\"\",\"name\":\"knex\",\"filePath\":null,\"qualifiedName\":\"/knex\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"getDbName\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"createDbIfNotExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"createDb\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"options\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"{ ddl?: string[] }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/{ ddl?: string[] }\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"dropDb\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"dbExists\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<boolean>\",\"filePath\":null,\"qualifiedName\":\"/Promise<boolean>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"databaseName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"start\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"stop\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setMaxAllowedPacketSize\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"getTableManager\",\"returnType\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableManager\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableManager\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"handleCaseSensitivity\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tableName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"columnName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"caseSensitive\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runQuery\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<SerializedRecord[]>\",\"filePath\":null,\"qualifiedName\":\"/Promise<SerializedRecord[]>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverQueryStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverQueryStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"knex\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"knex/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runDml\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<number>\",\"filePath\":null,\"qualifiedName\":\"/Promise<number>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"generateStatement\",\"type\":{\"packageName\":\"\",\"name\":\"(config: DbDriverDmlStatementConfig) => Statement\",\"filePath\":null,\"qualifiedName\":\"/(config: DbDriverDmlStatementConfig) => Statement\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"transaction\",\"type\":{\"packageName\":\"knex\",\"name\":\"Transaction\",\"filePath\":null,\"qualifiedName\":\"knex/Transaction\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"runTransaction\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/Promise<T>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fn\",\"type\":{\"packageName\":\"\",\"name\":\"(transaction: Transaction) => Promise<T>\",\"filePath\":null,\"qualifiedName\":\"/(transaction: Transaction) => Promise<T>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getOperationDeadlineMs\",\"returnType\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"logFailure\",\"returnType\":{\"packageName\":\"\",\"name\":\"void\",\"filePath\":null,\"qualifiedName\":\"/void\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"sql\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"error\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"writeStatementLine\",\"returnType\":{\"packageName\":\"\",\"name\":\"void\",\"filePath\":null,\"qualifiedName\":\"/void\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"write\",\"type\":{\"packageName\":\"\",\"name\":\"() => void\",\"filePath\":null,\"qualifiedName\":\"/() => void\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"describeParams\",\"returnType\":{\"packageName\":\"\",\"name\":\"ParamsDescription | undefined\",\"filePath\":null,\"qualifiedName\":\"/ParamsDescription | undefined\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"describeParam\",\"returnType\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"ParamDescription\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/ParamDescription\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"read\",\"type\":{\"packageName\":\"\",\"name\":\"() => unknown\",\"filePath\":null,\"qualifiedName\":\"/() => unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"paramKind\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"value\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"isDictionary\",\"returnType\":{\"packageName\":\"\",\"name\":\"params is { [name: string]: unknown }\",\"filePath\":null,\"qualifiedName\":\"/params is { [name: string]: unknown }\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"params\",\"type\":{\"packageName\":\"\",\"name\":\"unknown\",\"filePath\":null,\"qualifiedName\":\"/unknown\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"DbDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/DbDriver\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/DbDriver\"},{\"v\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"value\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexSchemaOperations\",\"filePath\":\"src/KnexSchemaOperations.ts\",\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"knexDriver\",\"type\":{\"packageName\":\"@proteinjs/db-driver-knex\",\"name\":\"KnexDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-driver-knex/KnexDriver\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"createTables\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"tables\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>[]\",\"filePath\":null,\"qualifiedName\":\"/Table<any>[]\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"alterTable\",\"returnType\":null,\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"createColumn\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[{\"name\":\"column\",\"type\":{\"packageName\":\"\",\"name\":\"Column<any, any>\",\"filePath\":null,\"qualifiedName\":\"/Column<any, any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableBuilder\",\"type\":{\"packageName\":\"\",\"name\":\"knex.TableBuilder\",\"filePath\":null,\"qualifiedName\":\"/knex.TableBuilder\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"tableChanges\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"TableChanges\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableChanges\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"SchemaOperations\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/SchemaOperations\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/SchemaOperations\"}],\"edges\":[{\"v\":\"@proteinjs/db-driver-knex/TestDbDriverFactory\",\"w\":\"@proteinjs/db/DefaultDbDriverFactory\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-driver-knex/KnexDriver\",\"w\":\"@proteinjs/db/DbDriver\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-driver-knex/KnexSchemaOperations\",\"w\":\"@proteinjs/db/SchemaOperations\",\"value\":\"implements interface\"}]}";
24
24
  /** Generate Source Links */
25
25
  var TestDbDriverFactory_1 = require("../../test/config/TestDbDriverFactory");
26
26
  var KnexDriver_1 = require("../../src/KnexDriver");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../generated/test/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,+BAA6B;AAC7B,6CAA2C;AAC3C,6BAA2B;AAG3B,4BAA4B;AAE5B,IAAM,WAAW,GAAG,g9iBAAg9iB,CAAC;AAGr+iB,4BAA4B;AAE5B,6EAA4E;AAC5E,mDAAkD;AAClD,uEAAsE;AAEtE,IAAM,WAAW,GAAG;IACnB,+CAA+C,EAAE,yCAAmB;IACpE,sCAAsC,EAAE,uBAAU;IAClD,gDAAgD,EAAE,2CAAoB;CACtE,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../generated/test/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,+BAA6B;AAC7B,6CAA2C;AAC3C,6BAA2B;AAG3B,4BAA4B;AAE5B,IAAM,WAAW,GAAG,+shBAA+shB,CAAC;AAGpuhB,4BAA4B;AAE5B,6EAA4E;AAC5E,mDAAkD;AAClD,uEAAsE;AAEtE,IAAM,WAAW,GAAG;IACnB,+CAA+C,EAAE,yCAAmB;IACpE,sCAAsC,EAAE,uBAAU;IAClD,gDAAgD,EAAE,2CAAoB;CACtE,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,mDAAiC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './src/KnexDriver';
2
2
  export * from './src/KnexConfig';
3
3
  export * from './src/KnexLogValues';
4
+ export * from './src/KnexFailureLine';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./src/KnexDriver"), exports);
18
18
  __exportStar(require("./src/KnexConfig"), exports);
19
19
  __exportStar(require("./src/KnexLogValues"), exports);
20
+ __exportStar(require("./src/KnexFailureLine"), exports);
20
21
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC;AACpC,wDAAsC"}
@@ -3,5 +3,13 @@ export type KnexConfig = {
3
3
  user: string;
4
4
  password: string;
5
5
  dbName: string;
6
+ /**
7
+ * Deadline applied to every query and DML statement the driver runs, inside a transaction or
8
+ * not (default 60_000ms). A statement that has not settled by the deadline is cancelled on the
9
+ * server (`KILL QUERY`) and FAILS with an error naming the deadline, instead of holding its
10
+ * connection for as long as the server lets it run. Schema operations (DDL) are exempt. The
11
+ * driver reports this value as its per-operation deadline (`DbDriver.getOperationDeadlineMs`).
12
+ */
13
+ operationDeadlineMs?: number;
6
14
  };
7
15
  //# sourceMappingURL=KnexConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"KnexConfig.d.ts","sourceRoot":"","sources":["../../src/KnexConfig.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
1
+ {"version":3,"file":"KnexConfig.d.ts","sourceRoot":"","sources":["../../src/KnexConfig.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC"}
@@ -7,6 +7,8 @@ import { Statement } from '@proteinjs/db-query';
7
7
  */
8
8
  export declare class KnexDriver implements DbDriver {
9
9
  private static KNEX;
10
+ /** The per-operation deadline when `KnexConfig.operationDeadlineMs` is unset (see getOperationDeadlineMs). */
11
+ private static readonly DEFAULT_OPERATION_DEADLINE_MS;
10
12
  private logger;
11
13
  private config;
12
14
  private knexConfig;
@@ -44,6 +46,12 @@ export declare class KnexDriver implements DbDriver {
44
46
  * @returns the return value of the `fn`
45
47
  */
46
48
  runTransaction<T>(fn: (transaction: Transaction) => Promise<T>): Promise<T>;
49
+ /**
50
+ * The deadline every statement runs under — `KnexConfig.operationDeadlineMs`, 60 s when unset —
51
+ * and the one place the driver reads it: the deadline this reports is the deadline runQuery
52
+ * enforces (the query layer's timeout, cancelling the statement on the server when it fires).
53
+ */
54
+ getOperationDeadlineMs(): number;
47
55
  /**
48
56
  * The one line a failed statement writes. What is THROWN is the vendor's error itself, untouched
49
57
  * (runQuery rethrows it); this is only what the driver PRINTS of it.
@@ -75,11 +83,6 @@ export declare class KnexDriver implements DbDriver {
75
83
  * nothing is left to write with.
76
84
  */
77
85
  private writeStatementLine;
78
- /**
79
- * The name, codes and server message of any thrown value — never the query layer's rewritten
80
- * `message` or `sql`. Total: a fact that cannot be read (vendorFact) is left out.
81
- */
82
- private causeSummary;
83
86
  /**
84
87
  * A statement's bound parameters as a LOG LINE carries them — the one owner of that form: by
85
88
  * position, the KIND of each value and, for strings, arrays and bytes, its LENGTH. Never a
@@ -108,7 +111,5 @@ export declare class KnexDriver implements DbDriver {
108
111
  private paramKind;
109
112
  /** Whether bindings are a DICTIONARY — a plain object, which the query layer binds by entry name. */
110
113
  private isDictionary;
111
- /** One fact of a thrown value, or nothing when it cannot be read (nothing thrown, a scalar, a throwing accessor). */
112
- private vendorFact;
113
114
  }
114
115
  //# sourceMappingURL=KnexDriver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"KnexDriver.d.ts","sourceRoot":"","sources":["../../src/KnexDriver.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EACL,QAAQ,EACR,4BAA4B,EAC5B,0BAA0B,EAC1B,gBAAgB,EAChB,KAAK,EACL,YAAY,EAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAgBhD;;GAEG;AACH,qBAAa,UAAW,YAAW,QAAQ;IACzC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAO;IAC1B,OAAO,CAAC,MAAM,CAA+C;IAC7D,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,UAAU,CAAM;IACjB,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;gBAEhD,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC;IAavE,OAAO,IAAI,IAAI;IAQf,SAAS;IAIH,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ1C;;;;OAIG;IACG,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAUzE,+BAA+B;IACzB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInC,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWhD,KAAK;IAKL,IAAI;YAII,uBAAuB;IAOrC,eAAe,IAAI,YAAY;IAM/B;;;;OAIG;IACH,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAG,MAAM;IAsBtF,QAAQ,CACZ,iBAAiB,EAAE,CAAC,MAAM,EAAE,4BAA4B,KAAK,SAAS,EACtE,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,gBAAgB,EAAE,CAAC;IA0BxB,MAAM,CACV,iBAAiB,EAAE,CAAC,MAAM,EAAE,0BAA0B,KAAK,SAAS,EACpE,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,MAAM,CAAC;IAKlB;;;;OAIG;IACG,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAOjF;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,UAAU;IAelB;;;;;;;;;OASG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;;OAGG;IACH,OAAO,CAAC,YAAY;IAepB;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,cAAc;IAyBtB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAmBrB,2DAA2D;IAC3D,OAAO,CAAC,SAAS;IAgBjB,qGAAqG;IACrG,OAAO,CAAC,YAAY;IAQpB,qHAAqH;IACrH,OAAO,CAAC,UAAU;CAOnB"}
1
+ {"version":3,"file":"KnexDriver.d.ts","sourceRoot":"","sources":["../../src/KnexDriver.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EACL,QAAQ,EACR,4BAA4B,EAC5B,0BAA0B,EAC1B,gBAAgB,EAChB,KAAK,EACL,YAAY,EAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAahD;;GAEG;AACH,qBAAa,UAAW,YAAW,QAAQ;IACzC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAO;IAC1B,8GAA8G;IAC9G,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,6BAA6B,CAAU;IAC/D,OAAO,CAAC,MAAM,CAA+C;IAC7D,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,UAAU,CAAM;IACjB,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;gBAEhD,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC;IAavE,OAAO,IAAI,IAAI;IAQf,SAAS;IAIH,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ1C;;;;OAIG;IACG,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAUzE,+BAA+B;IACzB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInC,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWhD,KAAK;IAKL,IAAI;YAII,uBAAuB;IAOrC,eAAe,IAAI,YAAY;IAM/B;;;;OAIG;IACH,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAG,MAAM;IAsBtF,QAAQ,CACZ,iBAAiB,EAAE,CAAC,MAAM,EAAE,4BAA4B,KAAK,SAAS,EACtE,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,gBAAgB,EAAE,CAAC;IA6BxB,MAAM,CACV,iBAAiB,EAAE,CAAC,MAAM,EAAE,0BAA0B,KAAK,SAAS,EACpE,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,MAAM,CAAC;IAKlB;;;;OAIG;IACG,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAsBjF;;;;OAIG;IACH,sBAAsB,IAAI,MAAM;IAIhC;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,UAAU;IAelB;;;;;;;;;OASG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,cAAc;IAyBtB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAmBrB,2DAA2D;IAC3D,OAAO,CAAC,SAAS;IAgBjB,qGAAqG;IACrG,OAAO,CAAC,YAAY;CAOrB"}
@@ -54,6 +54,7 @@ exports.KnexDriver = void 0;
54
54
  var knex_1 = __importDefault(require("knex"));
55
55
  var db_1 = require("@proteinjs/db");
56
56
  var KnexLogValues_1 = require("./KnexLogValues");
57
+ var KnexFailureLine_1 = require("./KnexFailureLine");
57
58
  var logger_1 = require("@proteinjs/logger");
58
59
  var KnexSchemaOperations_1 = require("./KnexSchemaOperations");
59
60
  var KnexColumnTypeFactory_1 = require("./KnexColumnTypeFactory");
@@ -249,10 +250,14 @@ var KnexDriver = /** @class */ (function () {
249
250
  case 1:
250
251
  _b.trys.push([1, 3, , 4]);
251
252
  runner = transaction || this.getKnex();
252
- return [4 /*yield*/, runner.raw(sql, params)];
253
- case 2: return [2 /*return*/, (_b.sent())[0]]; // returns 2 arrays, first is records, second is metadata per record
253
+ return [4 /*yield*/, runner.raw(sql, params).timeout(this.getOperationDeadlineMs(), { cancel: true })];
254
+ case 2:
255
+ // returns 2 arrays, first is records, second is metadata per record
256
+ return [2 /*return*/, (_b.sent())[0]];
254
257
  case 3:
255
258
  error_1 = _b.sent();
259
+ // Rethrown as it is; marked, so no line about it — this driver's or a caller's — prints its text.
260
+ KnexFailureLine_1.KnexFailureLine.mark(error_1, 'Failed when executing sql');
256
261
  this.logFailure(sql, params, error_1);
257
262
  throw error_1;
258
263
  case 4: return [2 /*return*/];
@@ -280,25 +285,55 @@ var KnexDriver = /** @class */ (function () {
280
285
  */
281
286
  KnexDriver.prototype.runTransaction = function (fn) {
282
287
  return __awaiter(this, void 0, void 0, function () {
288
+ var bodyErrors, error_2;
283
289
  var _this = this;
284
290
  return __generator(this, function (_a) {
285
291
  switch (_a.label) {
286
- case 0: return [4 /*yield*/, this.getKnex().transaction(function (trx) { return __awaiter(_this, void 0, void 0, function () {
287
- var result;
288
- return __generator(this, function (_a) {
289
- switch (_a.label) {
290
- case 0: return [4 /*yield*/, fn(trx)];
291
- case 1:
292
- result = _a.sent();
293
- return [2 /*return*/, result];
294
- }
295
- });
296
- }); })];
297
- case 1: return [2 /*return*/, _a.sent()];
292
+ case 0:
293
+ bodyErrors = new Set();
294
+ _a.label = 1;
295
+ case 1:
296
+ _a.trys.push([1, 3, , 4]);
297
+ return [4 /*yield*/, this.getKnex().transaction(function (trx) { return __awaiter(_this, void 0, void 0, function () {
298
+ var error_3;
299
+ return __generator(this, function (_a) {
300
+ switch (_a.label) {
301
+ case 0:
302
+ _a.trys.push([0, 2, , 3]);
303
+ return [4 /*yield*/, fn(trx)];
304
+ case 1: return [2 /*return*/, _a.sent()];
305
+ case 2:
306
+ error_3 = _a.sent();
307
+ bodyErrors.add(error_3);
308
+ throw error_3;
309
+ case 3: return [2 /*return*/];
310
+ }
311
+ });
312
+ }); })];
313
+ case 2: return [2 /*return*/, _a.sent()];
314
+ case 3:
315
+ error_2 = _a.sent();
316
+ // What the BODY threw is the caller's own error, or a failure already marked at the
317
+ // statement's door. Anything else was raised around the body — beginning, committing —
318
+ // and words itself as the vendor did. Rethrown as it is, either way.
319
+ if (!bodyErrors.has(error_2)) {
320
+ KnexFailureLine_1.KnexFailureLine.mark(error_2, 'Transaction failed');
321
+ }
322
+ throw error_2;
323
+ case 4: return [2 /*return*/];
298
324
  }
299
325
  });
300
326
  });
301
327
  };
328
+ /**
329
+ * The deadline every statement runs under — `KnexConfig.operationDeadlineMs`, 60 s when unset —
330
+ * and the one place the driver reads it: the deadline this reports is the deadline runQuery
331
+ * enforces (the query layer's timeout, cancelling the statement on the server when it fires).
332
+ */
333
+ KnexDriver.prototype.getOperationDeadlineMs = function () {
334
+ var _a;
335
+ return (_a = this.config.operationDeadlineMs) !== null && _a !== void 0 ? _a : KnexDriver.DEFAULT_OPERATION_DEADLINE_MS;
336
+ };
302
337
  /**
303
338
  * The one line a failed statement writes. What is THROWN is the vendor's error itself, untouched
304
339
  * (runQuery rethrows it); this is only what the driver PRINTS of it.
@@ -321,7 +356,7 @@ var KnexDriver = /** @class */ (function () {
321
356
  KnexDriver.prototype.logFailure = function (sql, params, error) {
322
357
  var _this = this;
323
358
  this.writeStatementLine(function () {
324
- return _this.logger.error(__assign({ message: "Failed when executing sql", obj: __assign(__assign({ sql: sql, params: _this.describeParams(params) }, KnexLogValues_1.KnexLogValues.ofStatement(params)), { cause: _this.causeSummary(error) }) }, KnexLogValues_1.KnexLogValues.ofFailure(error)));
359
+ return _this.logger.error(__assign({ message: "Failed when executing sql", obj: __assign(__assign({ sql: sql, params: _this.describeParams(params) }, KnexLogValues_1.KnexLogValues.ofStatement(params)), { cause: KnexFailureLine_1.KnexFailureLine.causeOf(error) }) }, KnexLogValues_1.KnexLogValues.ofFailure(error)));
325
360
  });
326
361
  };
327
362
  /**
@@ -347,18 +382,6 @@ var KnexDriver = /** @class */ (function () {
347
382
  }
348
383
  }
349
384
  };
350
- /**
351
- * The name, codes and server message of any thrown value — never the query layer's rewritten
352
- * `message` or `sql`. Total: a fact that cannot be read (vendorFact) is left out.
353
- */
354
- KnexDriver.prototype.causeSummary = function (error) {
355
- var name = this.vendorFact(error, 'name');
356
- var code = this.vendorFact(error, 'code');
357
- var errno = this.vendorFact(error, 'errno');
358
- var sqlState = this.vendorFact(error, 'sqlState');
359
- var sqlMessage = this.vendorFact(error, 'sqlMessage');
360
- return __assign(__assign(__assign(__assign(__assign({}, (typeof name === 'string' ? { name: name } : {})), (typeof code === 'string' ? { code: code } : {})), (typeof errno === 'number' ? { errno: errno } : {})), (typeof sqlState === 'string' ? { sqlState: sqlState } : {})), (typeof sqlMessage === 'string' ? { sqlMessage: sqlMessage } : {}));
361
- };
362
385
  /**
363
386
  * A statement's bound parameters as a LOG LINE carries them — the one owner of that form: by
364
387
  * position, the KIND of each value and, for strings, arrays and bytes, its LENGTH. Never a
@@ -458,15 +481,8 @@ var KnexDriver = /** @class */ (function () {
458
481
  var prototype = Object.getPrototypeOf(params);
459
482
  return prototype === null || Object.getPrototypeOf(prototype) === null;
460
483
  };
461
- /** One fact of a thrown value, or nothing when it cannot be read (nothing thrown, a scalar, a throwing accessor). */
462
- KnexDriver.prototype.vendorFact = function (error, fact) {
463
- try {
464
- return error === null || error === void 0 ? void 0 : error[fact];
465
- }
466
- catch (_a) {
467
- return undefined;
468
- }
469
- };
484
+ /** The per-operation deadline when `KnexConfig.operationDeadlineMs` is unset (see getOperationDeadlineMs). */
485
+ KnexDriver.DEFAULT_OPERATION_DEADLINE_MS = 60000;
470
486
  return KnexDriver;
471
487
  }());
472
488
  exports.KnexDriver = KnexDriver;