@expo/entity-database-adapter-knex 0.46.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/package.json +7 -5
  2. package/src/__integration-tests__/PostgresEntityIntegration-test.ts +27 -0
  3. package/src/__testfixtures__/PostgresTestEntity.ts +6 -0
  4. package/LICENSE +0 -21
  5. package/build/src/__integration-tests__/EntityCreationUtils-test.d.ts +0 -1
  6. package/build/src/__integration-tests__/EntityCreationUtils-test.js +0 -105
  7. package/build/src/__integration-tests__/EntityCreationUtils-test.js.map +0 -1
  8. package/build/src/__integration-tests__/PostgresEntityIntegration-test.d.ts +0 -1
  9. package/build/src/__integration-tests__/PostgresEntityIntegration-test.js +0 -497
  10. package/build/src/__integration-tests__/PostgresEntityIntegration-test.js.map +0 -1
  11. package/build/src/__integration-tests__/PostgresEntityQueryContextProvider-test.d.ts +0 -1
  12. package/build/src/__integration-tests__/PostgresEntityQueryContextProvider-test.js +0 -294
  13. package/build/src/__integration-tests__/PostgresEntityQueryContextProvider-test.js.map +0 -1
  14. package/build/src/__integration-tests__/PostgresInvalidSetup-test.d.ts +0 -1
  15. package/build/src/__integration-tests__/PostgresInvalidSetup-test.js +0 -70
  16. package/build/src/__integration-tests__/PostgresInvalidSetup-test.js.map +0 -1
  17. package/build/src/__integration-tests__/errors-test.d.ts +0 -1
  18. package/build/src/__integration-tests__/errors-test.js +0 -128
  19. package/build/src/__integration-tests__/errors-test.js.map +0 -1
  20. package/build/src/__testfixtures__/ErrorsTestEntity.d.ts +0 -24
  21. package/build/src/__testfixtures__/ErrorsTestEntity.js +0 -107
  22. package/build/src/__testfixtures__/ErrorsTestEntity.js.map +0 -1
  23. package/build/src/__testfixtures__/InvalidTestEntity.d.ts +0 -19
  24. package/build/src/__testfixtures__/InvalidTestEntity.js +0 -62
  25. package/build/src/__testfixtures__/InvalidTestEntity.js.map +0 -1
  26. package/build/src/__testfixtures__/PostgresTestEntity.d.ts +0 -31
  27. package/build/src/__testfixtures__/PostgresTestEntity.js +0 -96
  28. package/build/src/__testfixtures__/PostgresTestEntity.js.map +0 -1
  29. package/build/src/__testfixtures__/PostgresTriggerTestEntity.d.ts +0 -19
  30. package/build/src/__testfixtures__/PostgresTriggerTestEntity.js +0 -101
  31. package/build/src/__testfixtures__/PostgresTriggerTestEntity.js.map +0 -1
  32. package/build/src/__testfixtures__/PostgresUniqueTestEntity.d.ts +0 -25
  33. package/build/src/__testfixtures__/PostgresUniqueTestEntity.js +0 -71
  34. package/build/src/__testfixtures__/PostgresUniqueTestEntity.js.map +0 -1
  35. package/build/src/__testfixtures__/PostgresValidatorTestEntity.d.ts +0 -19
  36. package/build/src/__testfixtures__/PostgresValidatorTestEntity.js +0 -77
  37. package/build/src/__testfixtures__/PostgresValidatorTestEntity.js.map +0 -1
  38. package/build/src/__testfixtures__/createKnexIntegrationTestEntityCompanionProvider.d.ts +0 -3
  39. package/build/src/__testfixtures__/createKnexIntegrationTestEntityCompanionProvider.js +0 -27
  40. package/build/src/__testfixtures__/createKnexIntegrationTestEntityCompanionProvider.js.map +0 -1
  41. package/build/src/__tests__/EntityFields-test.d.ts +0 -1
  42. package/build/src/__tests__/EntityFields-test.js +0 -8
  43. package/build/src/__tests__/EntityFields-test.js.map +0 -1
  44. package/build/src/errors/__tests__/wrapNativePostgresCallAsync-test.d.ts +0 -1
  45. package/build/src/errors/__tests__/wrapNativePostgresCallAsync-test.js +0 -22
  46. package/build/src/errors/__tests__/wrapNativePostgresCallAsync-test.js.map +0 -1
  47. package/build/tsconfig.tsbuildinfo +0 -1
package/package.json CHANGED
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "name": "@expo/entity-database-adapter-knex",
3
- "version": "0.46.0",
3
+ "version": "0.47.0",
4
4
  "description": "Knex database adapter for @expo/entity",
5
5
  "files": [
6
6
  "build",
7
+ "!*.tsbuildinfo",
8
+ "!__*",
7
9
  "src"
8
10
  ],
9
11
  "main": "build/src/index.js",
10
12
  "types": "build/src/index.d.ts",
11
13
  "scripts": {
12
14
  "build": "tsc --build",
15
+ "prepack": "rm -rf build && yarn build",
13
16
  "clean": "yarn build --clean",
14
17
  "lint": "yarn run --top-level eslint src",
15
18
  "lint-fix": "yarn lint --fix",
@@ -25,14 +28,13 @@
25
28
  "author": "Expo",
26
29
  "license": "MIT",
27
30
  "dependencies": {
28
- "@expo/entity": "^0.46.0",
31
+ "@expo/entity": "workspace:^",
29
32
  "knex": "^3.1.0"
30
33
  },
31
34
  "devDependencies": {
32
- "@expo/entity-testing-utils": "^0.46.0",
35
+ "@expo/entity-testing-utils": "workspace:^",
33
36
  "@jest/globals": "^30.0.0",
34
37
  "pg": "8.14.1",
35
38
  "typescript": "^5.8.3"
36
- },
37
- "gitHead": "79f61f8d7f7f024e4e9a557473a5737eedb3ffe6"
39
+ }
38
40
  }
@@ -256,6 +256,33 @@ describe('postgres entity integration', () => {
256
256
  });
257
257
  });
258
258
 
259
+ describe.only('BYTEA fields', () => {
260
+ it('supports BYTEA fields', async () => {
261
+ const vc1 = new ViewerContext(createKnexIntegrationTestEntityCompanionProvider(knexInstance));
262
+
263
+ const buffer = Buffer.from('hello world');
264
+ let entity = await enforceAsyncResult(
265
+ PostgresTestEntity.creatorWithAuthorizationResults(vc1)
266
+ .setField('binaryField', buffer)
267
+ .createAsync(),
268
+ );
269
+ expect(entity.getField('binaryField')).toEqual(buffer);
270
+
271
+ // load the entity in a different viewer context to ensure field deserialization works from db
272
+ const vc2 = new ViewerContext(createKnexIntegrationTestEntityCompanionProvider(knexInstance));
273
+ const entityLoaded = await PostgresTestEntity.loader(vc2).loadByIDAsync(entity.getID());
274
+ expect(entityLoaded.getField('binaryField')).toEqual(buffer);
275
+
276
+ const updatedBuffer = Buffer.from('updated hello world');
277
+ entity = await enforceAsyncResult(
278
+ PostgresTestEntity.updaterWithAuthorizationResults(entity)
279
+ .setField('binaryField', updatedBuffer)
280
+ .updateAsync(),
281
+ );
282
+ expect(entity.getField('binaryField')).toEqual(updatedBuffer);
283
+ });
284
+ });
285
+
259
286
  it('supports single field and composite field equality loading', async () => {
260
287
  const vc1 = new ViewerContext(createKnexIntegrationTestEntityCompanionProvider(knexInstance));
261
288
 
@@ -11,6 +11,7 @@ import {
11
11
  StringField,
12
12
  UUIDField,
13
13
  ViewerContext,
14
+ BufferField,
14
15
  } from '@expo/entity';
15
16
  import { Knex } from 'knex';
16
17
 
@@ -29,6 +30,7 @@ type PostgresTestEntityFields = {
29
30
  dateField: Date | null;
30
31
  maybeJsonArrayField: string[] | { hello: string } | null;
31
32
  bigintField: string | null;
33
+ binaryField: Buffer | null;
32
34
  };
33
35
 
34
36
  export class PostgresTestEntity extends Entity<PostgresTestEntityFields, 'id', ViewerContext> {
@@ -61,6 +63,7 @@ export class PostgresTestEntity extends Entity<PostgresTestEntityFields, 'id', V
61
63
  table.dateTime('date_field', { useTz: true });
62
64
  table.jsonb('maybe_json_array_field');
63
65
  table.bigint('bigint_field');
66
+ table.binary('binary_field');
64
67
  });
65
68
  }
66
69
  await knex.into(tableName).truncate();
@@ -153,6 +156,9 @@ export const postgresTestEntityConfiguration = new EntityConfiguration<
153
156
  bigintField: new BigIntField({
154
157
  columnName: 'bigint_field',
155
158
  }),
159
+ binaryField: new BufferField({
160
+ columnName: 'binary_field',
161
+ }),
156
162
  },
157
163
  databaseAdapterFlavor: 'postgres',
158
164
  cacheAdapterFlavor: 'redis',
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2020-present 650 Industries, Inc. (aka Expo)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,105 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const entity_1 = require("@expo/entity");
7
- const globals_1 = require("@jest/globals");
8
- const knex_1 = __importDefault(require("knex"));
9
- const nullthrows_1 = __importDefault(require("nullthrows"));
10
- const PostgresUniqueTestEntity_1 = require("../__testfixtures__/PostgresUniqueTestEntity");
11
- const createKnexIntegrationTestEntityCompanionProvider_1 = require("../__testfixtures__/createKnexIntegrationTestEntityCompanionProvider");
12
- (0, globals_1.describe)(entity_1.createWithUniqueConstraintRecoveryAsync, () => {
13
- let knexInstance;
14
- (0, globals_1.beforeAll)(() => {
15
- knexInstance = (0, knex_1.default)({
16
- client: 'pg',
17
- connection: {
18
- user: (0, nullthrows_1.default)(process.env['PGUSER']),
19
- password: (0, nullthrows_1.default)(process.env['PGPASSWORD']),
20
- host: 'localhost',
21
- port: parseInt((0, nullthrows_1.default)(process.env['PGPORT']), 10),
22
- database: (0, nullthrows_1.default)(process.env['PGDATABASE']),
23
- },
24
- });
25
- });
26
- (0, globals_1.beforeEach)(async () => {
27
- await PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createOrTruncatePostgresTableAsync(knexInstance);
28
- });
29
- (0, globals_1.afterAll)(async () => {
30
- await PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.dropPostgresTableAsync(knexInstance);
31
- await knexInstance.destroy();
32
- });
33
- globals_1.describe.each([true, false])('is parallel creations %p', (parallel) => {
34
- (0, globals_1.it)('recovers when the same entity is created twice outside of transaction', async () => {
35
- const vc1 = new entity_1.ViewerContext((0, createKnexIntegrationTestEntityCompanionProvider_1.createKnexIntegrationTestEntityCompanionProvider)(knexInstance));
36
- const args = {
37
- name: 'unique',
38
- };
39
- let createdEntities;
40
- if (parallel) {
41
- createdEntities = await Promise.all([
42
- (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args),
43
- (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args),
44
- ]);
45
- }
46
- else {
47
- createdEntities = [
48
- await (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args),
49
- await (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args),
50
- ];
51
- }
52
- (0, globals_1.expect)(createdEntities[0].getID()).toEqual(createdEntities[1].getID());
53
- });
54
- (0, globals_1.it)('recovers when the same entity is created twice within same transaction', async () => {
55
- const vc1 = new entity_1.ViewerContext((0, createKnexIntegrationTestEntityCompanionProvider_1.createKnexIntegrationTestEntityCompanionProvider)(knexInstance));
56
- const args = {
57
- name: 'unique',
58
- };
59
- const createdEntities = await vc1.runInTransactionForDatabaseAdaptorFlavorAsync('postgres', async (queryContext) => {
60
- if (parallel) {
61
- return await Promise.all([
62
- (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args, queryContext),
63
- (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args, queryContext),
64
- ]);
65
- }
66
- else {
67
- return [
68
- await (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args, queryContext),
69
- await (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args, queryContext),
70
- ];
71
- }
72
- });
73
- (0, globals_1.expect)((0, nullthrows_1.default)(createdEntities[0]).getID()).toEqual((0, nullthrows_1.default)(createdEntities[1]).getID());
74
- });
75
- (0, globals_1.it)('recovers when the same entity is created twice within two transactions', async () => {
76
- const vc1 = new entity_1.ViewerContext((0, createKnexIntegrationTestEntityCompanionProvider_1.createKnexIntegrationTestEntityCompanionProvider)(knexInstance));
77
- const args = {
78
- name: 'unique',
79
- };
80
- let createdEntities;
81
- if (parallel) {
82
- createdEntities = await Promise.all([
83
- await vc1.runInTransactionForDatabaseAdaptorFlavorAsync('postgres', async (queryContext) => {
84
- return await (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args, queryContext);
85
- }),
86
- await vc1.runInTransactionForDatabaseAdaptorFlavorAsync('postgres', async (queryContext) => {
87
- return await (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args, queryContext);
88
- }),
89
- ]);
90
- }
91
- else {
92
- createdEntities = [
93
- await vc1.runInTransactionForDatabaseAdaptorFlavorAsync('postgres', async (queryContext) => {
94
- return await (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args, queryContext);
95
- }),
96
- await vc1.runInTransactionForDatabaseAdaptorFlavorAsync('postgres', async (queryContext) => {
97
- return await (0, entity_1.createWithUniqueConstraintRecoveryAsync)(vc1, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.getByNameAsync, args, PostgresUniqueTestEntity_1.PostgresUniqueTestEntity.createWithNameAsync, args, queryContext);
98
- }),
99
- ];
100
- }
101
- (0, globals_1.expect)((0, nullthrows_1.default)(createdEntities[0]).getID()).toEqual((0, nullthrows_1.default)(createdEntities[1]).getID());
102
- });
103
- });
104
- });
105
- //# sourceMappingURL=EntityCreationUtils-test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EntityCreationUtils-test.js","sourceRoot":"","sources":["../../../src/__integration-tests__/EntityCreationUtils-test.ts"],"names":[],"mappings":";;;;;AAAA,yCAAsF;AACtF,2CAAsF;AACtF,gDAAkC;AAClC,4DAAoC;AAEpC,2FAAwF;AACxF,2IAAwI;AAExI,IAAA,kBAAQ,EAAC,gDAAuC,EAAE,GAAG,EAAE;IACrD,IAAI,YAAkB,CAAC;IAEvB,IAAA,mBAAS,EAAC,GAAG,EAAE;QACb,YAAY,GAAG,IAAA,cAAI,EAAC;YAClB,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE;gBACV,IAAI,EAAE,IAAA,oBAAU,EAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBACvC,QAAQ,EAAE,IAAA,oBAAU,EAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gBAC/C,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ,CAAC,IAAA,oBAAU,EAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC;gBACrD,QAAQ,EAAE,IAAA,oBAAU,EAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;aAChD;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,oBAAU,EAAC,KAAK,IAAI,EAAE;QACpB,MAAM,mDAAwB,CAAC,kCAAkC,CAAC,YAAY,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;IAEH,IAAA,kBAAQ,EAAC,KAAK,IAAI,EAAE;QAClB,MAAM,mDAAwB,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;QACpE,MAAM,YAAY,CAAC,OAAO,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,kBAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,0BAA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