@proteinjs/db-driver-knex 1.0.24 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
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.0.26](https://github.com/proteinjs/db/compare/@proteinjs/db-driver-knex@1.0.25...@proteinjs/db-driver-knex@1.0.26) (2024-06-19)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * handle undefined values when building a condition, querying, inserting, updating, or deleting and allow null in all column types ([#2](https://github.com/proteinjs/db/issues/2)) ([7edda4e](https://github.com/proteinjs/db/commit/7edda4e6e39a4c75fc70122daeb205a79eccc173))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.0.25](https://github.com/proteinjs/db/compare/@proteinjs/db-driver-knex@1.0.24...@proteinjs/db-driver-knex@1.0.25) (2024-06-15)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * Allow null values to be passed into Spanner DML ([#1](https://github.com/proteinjs/db/issues/1)) ([db1def2](https://github.com/proteinjs/db/commit/db1def2610298309911e8edc1e1c1497dbf2f7a7))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [1.0.24](https://github.com/proteinjs/db/compare/@proteinjs/db-driver-knex@1.0.23...@proteinjs/db-driver-knex@1.0.24) (2024-06-02)
7
29
 
8
30
  **Note:** Version bump only for package @proteinjs/db-driver-knex
@@ -38,12 +38,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  var db_1 = require("@proteinjs/db");
40
40
  var KnexDriver_1 = require("../src/KnexDriver");
41
- var knexDriver = new KnexDriver_1.KnexDriver({
42
- host: 'localhost',
43
- user: 'root',
44
- password: '',
45
- dbName: 'test',
46
- });
47
41
  var dropTable = function (table) { return __awaiter(void 0, void 0, void 0, function () {
48
42
  return __generator(this, function (_a) {
49
43
  switch (_a.label) {
@@ -58,5 +52,12 @@ var dropTable = function (table) { return __awaiter(void 0, void 0, void 0, func
58
52
  }
59
53
  });
60
54
  }); };
55
+ var knexDriver = new KnexDriver_1.KnexDriver({
56
+ host: 'localhost',
57
+ user: 'root',
58
+ password: '',
59
+ dbName: 'test',
60
+ });
61
+ describe('Column Type Tests', (0, db_1.columnTypeTests)(knexDriver, dropTable));
61
62
  describe('CRUD Tests', (0, db_1.crudTests)(knexDriver, dropTable));
62
63
  //# sourceMappingURL=Crud.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Crud.test.js","sourceRoot":"","sources":["../../test/Crud.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAiD;AACjD,gDAA+C;AAE/C,IAAM,UAAU,GAAG,IAAI,uBAAU,CAAC;IAChC,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,MAAM;CACf,CAAC,CAAC;AACH,IAAM,SAAS,GAAG,UAAO,KAAiB;;;oBACpC,qBAAM,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAA;;qBAAzF,SAAyF,EAAzF,wBAAyF;gBAC3F,qBAAM,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAAA;;gBAA1F,SAA0F,CAAC;;;;;KAE9F,CAAC;AAEF,QAAQ,CAAC,YAAY,EAAE,IAAA,cAAS,EAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"Crud.test.js","sourceRoot":"","sources":["../../test/Crud.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAkE;AAClE,gDAA+C;AAE/C,IAAM,SAAS,GAAG,UAAO,KAAiB;;;oBACpC,qBAAM,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAA;;qBAAzF,SAAyF,EAAzF,wBAAyF;gBAC3F,qBAAM,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAAA;;gBAA1F,SAA0F,CAAC;;;;;KAE9F,CAAC;AAEF,IAAM,UAAU,GAAG,IAAI,uBAAU,CAAC;IAChC,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,MAAM;CACf,CAAC,CAAC;AAEH,QAAQ,CAAC,mBAAmB,EAAE,IAAA,oBAAe,EAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;AAEtE,QAAQ,CAAC,YAAY,EAAE,IAAA,cAAS,EAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proteinjs/db-driver-knex",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "Db driver for Knex",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,8 +22,8 @@
22
22
  "test": "jest"
23
23
  },
24
24
  "dependencies": {
25
- "@proteinjs/db": "^1.0.25",
26
- "@proteinjs/db-query": "^1.0.12",
25
+ "@proteinjs/db": "^1.0.27",
26
+ "@proteinjs/db-query": "^1.0.14",
27
27
  "@proteinjs/reflection": "1.1.5",
28
28
  "@proteinjs/util": "1.1.2",
29
29
  "knex": "0.21.5",
@@ -48,5 +48,5 @@
48
48
  },
49
49
  "main": "./dist/generated/index.js",
50
50
  "types": "./dist/generated/index.d.ts",
51
- "gitHead": "0e2c62ec2d293159ccc9fc4b85933311fa8bc597"
51
+ "gitHead": "0b7dd8cce7b00e30b1c5670e7b2a618aa7ccc2b6"
52
52
  }
package/test/Crud.test.ts CHANGED
@@ -1,16 +1,19 @@
1
- import { Table, crudTests } from '@proteinjs/db';
1
+ import { Table, columnTypeTests, crudTests } from '@proteinjs/db';
2
2
  import { KnexDriver } from '../src/KnexDriver';
3
3
 
4
+ const dropTable = async (table: Table<any>) => {
5
+ if (await knexDriver.getKnex().schema.withSchema(knexDriver.getDbName()).hasTable(table.name)) {
6
+ await knexDriver.getKnex().schema.withSchema(knexDriver.getDbName()).dropTable(table.name);
7
+ }
8
+ };
9
+
4
10
  const knexDriver = new KnexDriver({
5
11
  host: 'localhost',
6
12
  user: 'root',
7
13
  password: '',
8
14
  dbName: 'test',
9
15
  });
10
- const dropTable = async (table: Table<any>) => {
11
- if (await knexDriver.getKnex().schema.withSchema(knexDriver.getDbName()).hasTable(table.name)) {
12
- await knexDriver.getKnex().schema.withSchema(knexDriver.getDbName()).dropTable(table.name);
13
- }
14
- };
16
+
17
+ describe('Column Type Tests', columnTypeTests(knexDriver, dropTable));
15
18
 
16
19
  describe('CRUD Tests', crudTests(knexDriver, dropTable));