@expo/entity-database-adapter-knex 0.45.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.
- package/build/src/EntityFields.js.map +1 -0
- package/build/{PostgresEntityDatabaseAdapter.d.ts → src/PostgresEntityDatabaseAdapter.d.ts} +2 -2
- package/build/{PostgresEntityDatabaseAdapter.js → src/PostgresEntityDatabaseAdapter.js} +10 -12
- package/build/src/PostgresEntityDatabaseAdapter.js.map +1 -0
- package/build/{PostgresEntityDatabaseAdapterProvider.d.ts → src/PostgresEntityDatabaseAdapterProvider.d.ts} +2 -2
- package/build/src/PostgresEntityDatabaseAdapterProvider.js +11 -0
- package/build/src/PostgresEntityDatabaseAdapterProvider.js.map +1 -0
- package/build/{PostgresEntityQueryContextProvider.d.ts → src/PostgresEntityQueryContextProvider.d.ts} +1 -1
- package/build/{PostgresEntityQueryContextProvider.js → src/PostgresEntityQueryContextProvider.js} +2 -1
- package/build/src/PostgresEntityQueryContextProvider.js.map +1 -0
- package/build/src/errors/wrapNativePostgresCallAsync.d.ts +1 -0
- package/build/{errors → src/errors}/wrapNativePostgresCallAsync.js +1 -1
- package/build/src/errors/wrapNativePostgresCallAsync.js.map +1 -0
- package/build/src/index.d.ts +9 -0
- package/build/src/index.js +27 -0
- package/build/src/index.js.map +1 -0
- package/package.json +16 -27
- package/src/PostgresEntityDatabaseAdapter.ts +5 -5
- package/src/PostgresEntityDatabaseAdapterProvider.ts +3 -5
- package/src/PostgresEntityQueryContextProvider.ts +1 -1
- package/src/__integration-tests__/EntityCreationUtils-test.ts +2 -1
- package/src/__integration-tests__/PostgresEntityIntegration-test.ts +47 -19
- package/src/__integration-tests__/PostgresEntityQueryContextProvider-test.ts +3 -2
- package/src/__integration-tests__/PostgresInvalidSetup-test.ts +5 -4
- package/src/__integration-tests__/errors-test.ts +3 -2
- package/src/__testfixtures__/ErrorsTestEntity.ts +6 -6
- package/src/__testfixtures__/InvalidTestEntity.ts +6 -10
- package/src/__testfixtures__/PostgresTestEntity.ts +14 -12
- package/src/__testfixtures__/PostgresTriggerTestEntity.ts +7 -7
- package/src/__testfixtures__/PostgresUniqueTestEntity.ts +6 -6
- package/src/__testfixtures__/PostgresValidatorTestEntity.ts +6 -6
- package/src/__testfixtures__/createKnexIntegrationTestEntityCompanionProvider.ts +4 -4
- package/src/errors/__tests__/wrapNativePostgresCallAsync-test.ts +3 -1
- package/src/errors/wrapNativePostgresCallAsync.ts +2 -2
- package/src/index.ts +4 -4
- package/LICENSE +0 -21
- package/build/EntityFields.js.map +0 -1
- package/build/PostgresEntityDatabaseAdapter.js.map +0 -1
- package/build/PostgresEntityDatabaseAdapterProvider.js +0 -13
- package/build/PostgresEntityDatabaseAdapterProvider.js.map +0 -1
- package/build/PostgresEntityQueryContextProvider.js.map +0 -1
- package/build/errors/wrapNativePostgresCallAsync.d.ts +0 -1
- package/build/errors/wrapNativePostgresCallAsync.js.map +0 -1
- package/build/index.d.ts +0 -9
- package/build/index.js +0 -35
- package/build/index.js.map +0 -1
- package/build/tsconfig.build.tsbuildinfo +0 -1
- /package/build/{EntityFields.d.ts → src/EntityFields.d.ts} +0 -0
- /package/build/{EntityFields.js → src/EntityFields.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityFields.js","sourceRoot":"","sources":["../../src/EntityFields.ts"],"names":[],"mappings":";;;AAAA,yCAAqD;AAErD;;GAEG;AACH,MAAa,cAAsD,SAAQ,8BAG1E;IACW,0BAA0B,CAAC,KAAY;QAC/C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACF;AAPD,wCAOC;AAED;;;GAGG;AACH,MAAa,mBAEX,SAAQ,8BAAyD;IACvD,0BAA0B,CAAC,MAAW;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAND,kDAMC;AAED;;GAEG;AACH,MAAa,WAAmD,SAAQ,8BAGvE;IACW,0BAA0B,CAAC,KAAa;QAChD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;IACnC,CAAC;CACF;AAPD,kCAOC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EntityDatabaseAdapter, FieldTransformerMap,
|
|
1
|
+
import { EntityDatabaseAdapter, FieldTransformerMap, TableFieldMultiValueEqualityCondition, TableFieldSingleValueEqualityCondition, TableQuerySelectionModifiers, TableQuerySelectionModifiersWithOrderByRaw } from '@expo/entity';
|
|
2
2
|
import { Knex } from 'knex';
|
|
3
|
-
export
|
|
3
|
+
export declare class PostgresEntityDatabaseAdapter<TFields extends Record<string, any>, TIDField extends keyof TFields> extends EntityDatabaseAdapter<TFields, TIDField> {
|
|
4
4
|
protected getFieldTransformerMap(): FieldTransformerMap;
|
|
5
5
|
protected fetchManyWhereInternalAsync(queryInterface: Knex, tableName: string, tableColumns: readonly string[], tableTuples: any[][]): Promise<object[]>;
|
|
6
6
|
private applyQueryModifiersToQueryOrderByRaw;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostgresEntityDatabaseAdapter = void 0;
|
|
6
4
|
const entity_1 = require("@expo/entity");
|
|
7
5
|
const EntityFields_1 = require("./EntityFields");
|
|
8
|
-
const wrapNativePostgresCallAsync_1 =
|
|
6
|
+
const wrapNativePostgresCallAsync_1 = require("./errors/wrapNativePostgresCallAsync");
|
|
9
7
|
class PostgresEntityDatabaseAdapter extends entity_1.EntityDatabaseAdapter {
|
|
10
8
|
getFieldTransformerMap() {
|
|
11
9
|
return new Map([
|
|
@@ -54,7 +52,7 @@ class PostgresEntityDatabaseAdapter extends entity_1.EntityDatabaseAdapter {
|
|
|
54
52
|
// We could use the IN operator for single column queries as well, but we prefer to use ANY to at least keep some
|
|
55
53
|
// consistency in the query shape for the stats table.
|
|
56
54
|
if (tableColumns.length === 1) {
|
|
57
|
-
return await (0, wrapNativePostgresCallAsync_1.
|
|
55
|
+
return await (0, wrapNativePostgresCallAsync_1.wrapNativePostgresCallAsync)(() => queryInterface
|
|
58
56
|
.select()
|
|
59
57
|
.from(tableName)
|
|
60
58
|
.whereRaw(`(??) = ANY(?)`, [
|
|
@@ -62,7 +60,7 @@ class PostgresEntityDatabaseAdapter extends entity_1.EntityDatabaseAdapter {
|
|
|
62
60
|
tableTuples.map((tableTuple) => tableTuple[0]),
|
|
63
61
|
]));
|
|
64
62
|
}
|
|
65
|
-
return await (0, wrapNativePostgresCallAsync_1.
|
|
63
|
+
return await (0, wrapNativePostgresCallAsync_1.wrapNativePostgresCallAsync)(() => queryInterface.select().from(tableName).whereIn(tableColumns, tableTuples));
|
|
66
64
|
}
|
|
67
65
|
applyQueryModifiersToQueryOrderByRaw(query, querySelectionModifiers) {
|
|
68
66
|
let ret = this.applyQueryModifiersToQuery(query, querySelectionModifiers);
|
|
@@ -119,7 +117,7 @@ class PostgresEntityDatabaseAdapter extends entity_1.EntityDatabaseAdapter {
|
|
|
119
117
|
}
|
|
120
118
|
}
|
|
121
119
|
query = this.applyQueryModifiersToQuery(query, querySelectionModifiers);
|
|
122
|
-
return await (0, wrapNativePostgresCallAsync_1.
|
|
120
|
+
return await (0, wrapNativePostgresCallAsync_1.wrapNativePostgresCallAsync)(() => query);
|
|
123
121
|
}
|
|
124
122
|
async fetchManyByRawWhereClauseInternalAsync(queryInterface, tableName, rawWhereClause, bindings, querySelectionModifiers) {
|
|
125
123
|
let query = queryInterface
|
|
@@ -127,17 +125,17 @@ class PostgresEntityDatabaseAdapter extends entity_1.EntityDatabaseAdapter {
|
|
|
127
125
|
.from(tableName)
|
|
128
126
|
.whereRaw(rawWhereClause, bindings);
|
|
129
127
|
query = this.applyQueryModifiersToQueryOrderByRaw(query, querySelectionModifiers);
|
|
130
|
-
return await (0, wrapNativePostgresCallAsync_1.
|
|
128
|
+
return await (0, wrapNativePostgresCallAsync_1.wrapNativePostgresCallAsync)(() => query);
|
|
131
129
|
}
|
|
132
130
|
async insertInternalAsync(queryInterface, tableName, object) {
|
|
133
|
-
return await (0, wrapNativePostgresCallAsync_1.
|
|
131
|
+
return await (0, wrapNativePostgresCallAsync_1.wrapNativePostgresCallAsync)(() => queryInterface.insert(object).into(tableName).returning('*'));
|
|
134
132
|
}
|
|
135
133
|
async updateInternalAsync(queryInterface, tableName, tableIdField, id, object) {
|
|
136
|
-
return await (0, wrapNativePostgresCallAsync_1.
|
|
134
|
+
return await (0, wrapNativePostgresCallAsync_1.wrapNativePostgresCallAsync)(() => queryInterface.update(object).into(tableName).where(tableIdField, id).returning('*'));
|
|
137
135
|
}
|
|
138
136
|
async deleteInternalAsync(queryInterface, tableName, tableIdField, id) {
|
|
139
|
-
return await (0, wrapNativePostgresCallAsync_1.
|
|
137
|
+
return await (0, wrapNativePostgresCallAsync_1.wrapNativePostgresCallAsync)(() => queryInterface.into(tableName).where(tableIdField, id).del());
|
|
140
138
|
}
|
|
141
139
|
}
|
|
142
|
-
exports.
|
|
140
|
+
exports.PostgresEntityDatabaseAdapter = PostgresEntityDatabaseAdapter;
|
|
143
141
|
//# sourceMappingURL=PostgresEntityDatabaseAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostgresEntityDatabaseAdapter.js","sourceRoot":"","sources":["../../src/PostgresEntityDatabaseAdapter.ts"],"names":[],"mappings":";;;AAAA,yCAQsB;AAGtB,iDAAqE;AACrE,sFAAmF;AAEnF,MAAa,6BAGX,SAAQ,8BAAwC;IACtC,sBAAsB;QAC9B,OAAO,IAAI,GAAG,CAAgC;YAC5C;gBACE,6BAAc,CAAC,IAAI;gBACnB;oBACE;;;uBAGG;oBACH,KAAK,EAAE,CAAC,GAAU,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;iBAC3C;aACF;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,EAAO;QAEP,OAAO,MAAM,IAAA,yDAA2B,EAAC,GAAG,EAAE,CAC5C,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAC7D,CAAC;IACJ,CAAC;CACF;AA9MD,sEA8MC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { EntityConfiguration, EntityDatabaseAdapter, IEntityDatabaseAdapterProvider } from '@expo/entity';
|
|
2
|
+
export declare class PostgresEntityDatabaseAdapterProvider implements IEntityDatabaseAdapterProvider {
|
|
3
3
|
getDatabaseAdapter<TFields extends Record<string, any>, TIDField extends keyof TFields>(entityConfiguration: EntityConfiguration<TFields, TIDField>): EntityDatabaseAdapter<TFields, TIDField>;
|
|
4
4
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostgresEntityDatabaseAdapterProvider = void 0;
|
|
4
|
+
const PostgresEntityDatabaseAdapter_1 = require("./PostgresEntityDatabaseAdapter");
|
|
5
|
+
class PostgresEntityDatabaseAdapterProvider {
|
|
6
|
+
getDatabaseAdapter(entityConfiguration) {
|
|
7
|
+
return new PostgresEntityDatabaseAdapter_1.PostgresEntityDatabaseAdapter(entityConfiguration);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.PostgresEntityDatabaseAdapterProvider = PostgresEntityDatabaseAdapterProvider;
|
|
11
|
+
//# sourceMappingURL=PostgresEntityDatabaseAdapterProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostgresEntityDatabaseAdapterProvider.js","sourceRoot":"","sources":["../../src/PostgresEntityDatabaseAdapterProvider.ts"],"names":[],"mappings":";;;AAMA,mFAAgF;AAEhF,MAAa,qCAAqC;IAChD,kBAAkB,CAChB,mBAA2D;QAE3D,OAAO,IAAI,6DAA6B,CAAC,mBAAmB,CAAC,CAAC;IAChE,CAAC;CACF;AAND,sFAMC"}
|
|
@@ -3,7 +3,7 @@ import { Knex } from 'knex';
|
|
|
3
3
|
/**
|
|
4
4
|
* Query context provider for knex (postgres).
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export declare class PostgresEntityQueryContextProvider extends EntityQueryContextProvider {
|
|
7
7
|
private readonly knexInstance;
|
|
8
8
|
constructor(knexInstance: Knex);
|
|
9
9
|
protected getQueryInterface(): any;
|
package/build/{PostgresEntityQueryContextProvider.js → src/PostgresEntityQueryContextProvider.js}
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostgresEntityQueryContextProvider = void 0;
|
|
3
4
|
const entity_1 = require("@expo/entity");
|
|
4
5
|
/**
|
|
5
6
|
* Query context provider for knex (postgres).
|
|
@@ -39,5 +40,5 @@ class PostgresEntityQueryContextProvider extends entity_1.EntityQueryContextProv
|
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
exports.
|
|
43
|
+
exports.PostgresEntityQueryContextProvider = PostgresEntityQueryContextProvider;
|
|
43
44
|
//# sourceMappingURL=PostgresEntityQueryContextProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostgresEntityQueryContextProvider.js","sourceRoot":"","sources":["../../src/PostgresEntityQueryContextProvider.ts"],"names":[],"mappings":";;;AAAA,yCAIsB;AAGtB;;GAEG;AACH,MAAa,kCAAmC,SAAQ,mCAA0B;IACnD;IAA7B,YAA6B,YAAkB;QAC7C,KAAK,EAAE,CAAC;QADmB,iBAAY,GAAZ,YAAY,CAAM;IAE/C,CAAC;IAES,iBAAiB;QACzB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAES,uBAAuB,CAC/B,iBAAqC;QAErC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAC1B,IAAI,CAAC,YAAY,CAAC,WAAW,CAC3B,gBAAgB,EAChB,iBAAiB;YACf,CAAC,CAAC,kCAAkC,CAAC,wBAAwB,CAAC,iBAAiB,CAAC;YAChF,CAAC,CAAC,SAAS,CACd,CAAC;IACN,CAAC;IAES,6BAA6B,CACrC,mBAAwB;QAExB,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAE,mBAA4B,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAC3F,CAAC;IAEO,MAAM,CAAC,wBAAwB,CACrC,iBAAoC;QAEpC,MAAM,qBAAqB,GAAG,CAC5B,cAAyC,EACnB,EAAE;YACxB,QAAQ,cAAc,EAAE,CAAC;gBACvB,KAAK,kCAAyB,CAAC,cAAc;oBAC3C,OAAO,gBAAgB,CAAC;gBAC1B,KAAK,kCAAyB,CAAC,eAAe;oBAC5C,OAAO,iBAAiB,CAAC;gBAC3B,KAAK,kCAAyB,CAAC,YAAY;oBACzC,OAAO,cAAc,CAAC;YAC1B,CAAC;QACH,CAAC,CAAC;QAEF,OAAO;YACL,GAAG,CAAC,iBAAiB,CAAC,cAAc;gBAClC,CAAC,CAAC,EAAE,cAAc,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE;gBAC7E,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;IACJ,CAAC;CACF;AAjDD,gFAiDC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function wrapNativePostgresCallAsync<T>(fn: () => Promise<T>): Promise<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.wrapNativePostgresCallAsync = wrapNativePostgresCallAsync;
|
|
4
4
|
const entity_1 = require("@expo/entity");
|
|
5
5
|
const knex_1 = require("knex");
|
|
6
6
|
function wrapNativePostgresError(error) {
|
|
@@ -0,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AI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,CAAC,CAAC;QACV,CAAC;QACD,MAAM,uBAAuB,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @module @expo/entity-database-adapter-knex
|
|
4
|
+
*/
|
|
5
|
+
export * from './EntityFields';
|
|
6
|
+
export * from './PostgresEntityDatabaseAdapter';
|
|
7
|
+
export * from './PostgresEntityDatabaseAdapterProvider';
|
|
8
|
+
export * from './PostgresEntityQueryContextProvider';
|
|
9
|
+
export * from './errors/wrapNativePostgresCallAsync';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable tsdoc/syntax */
|
|
3
|
+
/**
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
* @module @expo/entity-database-adapter-knex
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
__exportStar(require("./EntityFields"), exports);
|
|
23
|
+
__exportStar(require("./PostgresEntityDatabaseAdapter"), exports);
|
|
24
|
+
__exportStar(require("./PostgresEntityDatabaseAdapterProvider"), exports);
|
|
25
|
+
__exportStar(require("./PostgresEntityQueryContextProvider"), exports);
|
|
26
|
+
__exportStar(require("./errors/wrapNativePostgresCallAsync"), exports);
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,iCAAiC;AACjC;;;GAGG;;;;;;;;;;;;;;;;AAEH,iDAA+B;AAC/B,kEAAgD;AAChD,0EAAwD;AACxD,uEAAqD;AACrD,uEAAqD"}
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/entity-database-adapter-knex",
|
|
3
|
-
"version": "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
|
-
"main": "build/index.js",
|
|
10
|
-
"types": "build/index.d.ts",
|
|
11
|
+
"main": "build/src/index.js",
|
|
12
|
+
"types": "build/src/index.d.ts",
|
|
11
13
|
"scripts": {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"clean": "
|
|
15
|
-
"lint": "eslint src",
|
|
16
|
-
"lint-fix": "
|
|
17
|
-
"test": "
|
|
18
|
-
"integration": "
|
|
19
|
-
"integration-no-setup": "jest --config ../../resources/jest-integration.config.js --rootDir . --runInBand --passWithNoTests",
|
|
20
|
-
"ctix": "ctix build --config ../../.ctirc && ../../resources/prepend-barrel.sh '@expo/entity-database-adapter-knex'"
|
|
14
|
+
"build": "tsc --build",
|
|
15
|
+
"prepack": "rm -rf build && yarn build",
|
|
16
|
+
"clean": "yarn build --clean",
|
|
17
|
+
"lint": "yarn run --top-level eslint src",
|
|
18
|
+
"lint-fix": "yarn lint --fix",
|
|
19
|
+
"test": "yarn test:all --rootDir $(pwd)",
|
|
20
|
+
"integration": "yarn integration:all --rootDir $(pwd)"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=16"
|
|
@@ -28,24 +28,13 @@
|
|
|
28
28
|
"author": "Expo",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@expo/entity": "
|
|
31
|
+
"@expo/entity": "workspace:^",
|
|
32
32
|
"knex": "^3.1.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@expo/entity-testing-utils": "
|
|
36
|
-
"@
|
|
37
|
-
"@types/node": "^20.14.1",
|
|
38
|
-
"ctix": "^2.7.0",
|
|
39
|
-
"eslint": "^9.26.0",
|
|
40
|
-
"eslint-config-universe": "^15.0.3",
|
|
41
|
-
"eslint-plugin-tsdoc": "^0.4.0",
|
|
42
|
-
"jest": "^29.7.0",
|
|
35
|
+
"@expo/entity-testing-utils": "workspace:^",
|
|
36
|
+
"@jest/globals": "^30.0.0",
|
|
43
37
|
"pg": "8.14.1",
|
|
44
|
-
"prettier": "^3.5.3",
|
|
45
|
-
"prettier-plugin-organize-imports": "^4.1.0",
|
|
46
|
-
"ts-jest": "^29.3.2",
|
|
47
|
-
"ts-mockito": "^2.6.1",
|
|
48
38
|
"typescript": "^5.8.3"
|
|
49
|
-
}
|
|
50
|
-
"gitHead": "fe2d246f87adc98a13cc7c1ae57f3628769560c9"
|
|
39
|
+
}
|
|
51
40
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EntityDatabaseAdapter,
|
|
3
|
-
FieldTransformerMap,
|
|
4
3
|
FieldTransformer,
|
|
5
|
-
|
|
6
|
-
TableFieldSingleValueEqualityCondition,
|
|
4
|
+
FieldTransformerMap,
|
|
7
5
|
TableFieldMultiValueEqualityCondition,
|
|
6
|
+
TableFieldSingleValueEqualityCondition,
|
|
7
|
+
TableQuerySelectionModifiers,
|
|
8
8
|
TableQuerySelectionModifiersWithOrderByRaw,
|
|
9
9
|
} from '@expo/entity';
|
|
10
10
|
import { Knex } from 'knex';
|
|
11
11
|
|
|
12
12
|
import { JSONArrayField, MaybeJSONArrayField } from './EntityFields';
|
|
13
|
-
import wrapNativePostgresCallAsync from './errors/wrapNativePostgresCallAsync';
|
|
13
|
+
import { wrapNativePostgresCallAsync } from './errors/wrapNativePostgresCallAsync';
|
|
14
14
|
|
|
15
|
-
export
|
|
15
|
+
export class PostgresEntityDatabaseAdapter<
|
|
16
16
|
TFields extends Record<string, any>,
|
|
17
17
|
TIDField extends keyof TFields,
|
|
18
18
|
> extends EntityDatabaseAdapter<TFields, TIDField> {
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IEntityDatabaseAdapterProvider,
|
|
3
2
|
EntityConfiguration,
|
|
4
3
|
EntityDatabaseAdapter,
|
|
4
|
+
IEntityDatabaseAdapterProvider,
|
|
5
5
|
} from '@expo/entity';
|
|
6
6
|
|
|
7
|
-
import PostgresEntityDatabaseAdapter from './PostgresEntityDatabaseAdapter';
|
|
7
|
+
import { PostgresEntityDatabaseAdapter } from './PostgresEntityDatabaseAdapter';
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
implements IEntityDatabaseAdapterProvider
|
|
11
|
-
{
|
|
9
|
+
export class PostgresEntityDatabaseAdapterProvider implements IEntityDatabaseAdapterProvider {
|
|
12
10
|
getDatabaseAdapter<TFields extends Record<string, any>, TIDField extends keyof TFields>(
|
|
13
11
|
entityConfiguration: EntityConfiguration<TFields, TIDField>,
|
|
14
12
|
): EntityDatabaseAdapter<TFields, TIDField> {
|
|
@@ -8,7 +8,7 @@ import { Knex } from 'knex';
|
|
|
8
8
|
/**
|
|
9
9
|
* Query context provider for knex (postgres).
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export class PostgresEntityQueryContextProvider extends EntityQueryContextProvider {
|
|
12
12
|
constructor(private readonly knexInstance: Knex) {
|
|
13
13
|
super();
|
|
14
14
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createWithUniqueConstraintRecoveryAsync, ViewerContext } from '@expo/entity';
|
|
2
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from '@jest/globals';
|
|
2
3
|
import knex, { Knex } from 'knex';
|
|
3
4
|
import nullthrows from 'nullthrows';
|
|
4
5
|
|
|
5
|
-
import PostgresUniqueTestEntity from '../__testfixtures__/PostgresUniqueTestEntity';
|
|
6
|
+
import { PostgresUniqueTestEntity } from '../__testfixtures__/PostgresUniqueTestEntity';
|
|
6
7
|
import { createKnexIntegrationTestEntityCompanionProvider } from '../__testfixtures__/createKnexIntegrationTestEntityCompanionProvider';
|
|
7
8
|
|
|
8
9
|
describe(createWithUniqueConstraintRecoveryAsync, () => {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { OrderByOrdering,
|
|
1
|
+
import { OrderByOrdering, TransactionIsolationLevel, ViewerContext } from '@expo/entity';
|
|
2
2
|
import { createUnitTestEntityCompanionProvider } from '@expo/entity-testing-utils';
|
|
3
3
|
import { enforceAsyncResult } from '@expo/results';
|
|
4
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it, test } from '@jest/globals';
|
|
4
5
|
import { knex, Knex } from 'knex';
|
|
5
6
|
import nullthrows from 'nullthrows';
|
|
6
7
|
import { setTimeout } from 'timers/promises';
|
|
7
8
|
|
|
8
|
-
import PostgresTestEntity from '../__testfixtures__/PostgresTestEntity';
|
|
9
|
-
import PostgresTriggerTestEntity from '../__testfixtures__/PostgresTriggerTestEntity';
|
|
10
|
-
import PostgresValidatorTestEntity from '../__testfixtures__/PostgresValidatorTestEntity';
|
|
9
|
+
import { PostgresTestEntity } from '../__testfixtures__/PostgresTestEntity';
|
|
10
|
+
import { PostgresTriggerTestEntity } from '../__testfixtures__/PostgresTriggerTestEntity';
|
|
11
|
+
import { PostgresValidatorTestEntity } from '../__testfixtures__/PostgresValidatorTestEntity';
|
|
11
12
|
import { createKnexIntegrationTestEntityCompanionProvider } from '../__testfixtures__/createKnexIntegrationTestEntityCompanionProvider';
|
|
12
13
|
|
|
13
14
|
describe('postgres entity integration', () => {
|
|
@@ -255,6 +256,33 @@ describe('postgres entity integration', () => {
|
|
|
255
256
|
});
|
|
256
257
|
});
|
|
257
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
|
+
|
|
258
286
|
it('supports single field and composite field equality loading', async () => {
|
|
259
287
|
const vc1 = new ViewerContext(createKnexIntegrationTestEntityCompanionProvider(knexInstance));
|
|
260
288
|
|
|
@@ -561,35 +589,35 @@ describe('postgres entity integration', () => {
|
|
|
561
589
|
|
|
562
590
|
await expect(
|
|
563
591
|
PostgresTriggerTestEntity.creator(vc1).setField('name', 'beforeCreate').createAsync(),
|
|
564
|
-
).rejects.
|
|
592
|
+
).rejects.toThrow('name cannot have value beforeCreate');
|
|
565
593
|
await expect(
|
|
566
594
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'beforeCreate'),
|
|
567
595
|
).resolves.toBeNull();
|
|
568
596
|
|
|
569
597
|
await expect(
|
|
570
598
|
PostgresTriggerTestEntity.creator(vc1).setField('name', 'afterCreate').createAsync(),
|
|
571
|
-
).rejects.
|
|
599
|
+
).rejects.toThrow('name cannot have value afterCreate');
|
|
572
600
|
await expect(
|
|
573
601
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'afterCreate'),
|
|
574
602
|
).resolves.toBeNull();
|
|
575
603
|
|
|
576
604
|
await expect(
|
|
577
605
|
PostgresTriggerTestEntity.creator(vc1).setField('name', 'beforeAll').createAsync(),
|
|
578
|
-
).rejects.
|
|
606
|
+
).rejects.toThrow('name cannot have value beforeAll');
|
|
579
607
|
await expect(
|
|
580
608
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'beforeAll'),
|
|
581
609
|
).resolves.toBeNull();
|
|
582
610
|
|
|
583
611
|
await expect(
|
|
584
612
|
PostgresTriggerTestEntity.creator(vc1).setField('name', 'afterAll').createAsync(),
|
|
585
|
-
).rejects.
|
|
613
|
+
).rejects.toThrow('name cannot have value afterAll');
|
|
586
614
|
await expect(
|
|
587
615
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'afterAll'),
|
|
588
616
|
).resolves.toBeNull();
|
|
589
617
|
|
|
590
618
|
await expect(
|
|
591
619
|
PostgresTriggerTestEntity.creator(vc1).setField('name', 'afterCommit').createAsync(),
|
|
592
|
-
).rejects.
|
|
620
|
+
).rejects.toThrow('name cannot have value afterCommit');
|
|
593
621
|
await expect(
|
|
594
622
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'afterCommit'),
|
|
595
623
|
).resolves.not.toBeNull();
|
|
@@ -608,35 +636,35 @@ describe('postgres entity integration', () => {
|
|
|
608
636
|
|
|
609
637
|
await expect(
|
|
610
638
|
PostgresTriggerTestEntity.updater(entity).setField('name', 'beforeUpdate').updateAsync(),
|
|
611
|
-
).rejects.
|
|
639
|
+
).rejects.toThrow('name cannot have value beforeUpdate');
|
|
612
640
|
await expect(
|
|
613
641
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'beforeUpdate'),
|
|
614
642
|
).resolves.toBeNull();
|
|
615
643
|
|
|
616
644
|
await expect(
|
|
617
645
|
PostgresTriggerTestEntity.updater(entity).setField('name', 'afterUpdate').updateAsync(),
|
|
618
|
-
).rejects.
|
|
646
|
+
).rejects.toThrow('name cannot have value afterUpdate');
|
|
619
647
|
await expect(
|
|
620
648
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'afterUpdate'),
|
|
621
649
|
).resolves.toBeNull();
|
|
622
650
|
|
|
623
651
|
await expect(
|
|
624
652
|
PostgresTriggerTestEntity.updater(entity).setField('name', 'beforeAll').updateAsync(),
|
|
625
|
-
).rejects.
|
|
653
|
+
).rejects.toThrow('name cannot have value beforeAll');
|
|
626
654
|
await expect(
|
|
627
655
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'beforeAll'),
|
|
628
656
|
).resolves.toBeNull();
|
|
629
657
|
|
|
630
658
|
await expect(
|
|
631
659
|
PostgresTriggerTestEntity.updater(entity).setField('name', 'afterAll').updateAsync(),
|
|
632
|
-
).rejects.
|
|
660
|
+
).rejects.toThrow('name cannot have value afterAll');
|
|
633
661
|
await expect(
|
|
634
662
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'afterAll'),
|
|
635
663
|
).resolves.toBeNull();
|
|
636
664
|
|
|
637
665
|
await expect(
|
|
638
666
|
PostgresTriggerTestEntity.updater(entity).setField('name', 'afterCommit').updateAsync(),
|
|
639
|
-
).rejects.
|
|
667
|
+
).rejects.toThrow('name cannot have value afterCommit');
|
|
640
668
|
await expect(
|
|
641
669
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'afterCommit'),
|
|
642
670
|
).resolves.not.toBeNull();
|
|
@@ -654,7 +682,7 @@ describe('postgres entity integration', () => {
|
|
|
654
682
|
.createAsync();
|
|
655
683
|
await expect(
|
|
656
684
|
PostgresTriggerTestEntity.deleter(entityBeforeDelete).deleteAsync(),
|
|
657
|
-
).rejects.
|
|
685
|
+
).rejects.toThrow('name cannot have value beforeDelete');
|
|
658
686
|
await expect(
|
|
659
687
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'beforeDelete'),
|
|
660
688
|
).resolves.not.toBeNull();
|
|
@@ -664,7 +692,7 @@ describe('postgres entity integration', () => {
|
|
|
664
692
|
.createAsync();
|
|
665
693
|
await expect(
|
|
666
694
|
PostgresTriggerTestEntity.deleter(entityAfterDelete).deleteAsync(),
|
|
667
|
-
).rejects.
|
|
695
|
+
).rejects.toThrow('name cannot have value afterDelete');
|
|
668
696
|
await expect(
|
|
669
697
|
PostgresTriggerTestEntity.loader(vc1).loadByFieldEqualingAsync('name', 'afterDelete'),
|
|
670
698
|
).resolves.not.toBeNull();
|
|
@@ -681,7 +709,7 @@ describe('postgres entity integration', () => {
|
|
|
681
709
|
PostgresValidatorTestEntity.creator(vc1)
|
|
682
710
|
.setField('name', 'beforeCreateAndBeforeUpdate')
|
|
683
711
|
.createAsync(),
|
|
684
|
-
).rejects.
|
|
712
|
+
).rejects.toThrow('name cannot have value beforeCreateAndBeforeUpdate');
|
|
685
713
|
await expect(
|
|
686
714
|
PostgresValidatorTestEntity.loader(vc1).loadByFieldEqualingAsync(
|
|
687
715
|
'name',
|
|
@@ -704,7 +732,7 @@ describe('postgres entity integration', () => {
|
|
|
704
732
|
PostgresValidatorTestEntity.updater(entity)
|
|
705
733
|
.setField('name', 'beforeCreateAndBeforeUpdate')
|
|
706
734
|
.updateAsync(),
|
|
707
|
-
).rejects.
|
|
735
|
+
).rejects.toThrow('name cannot have value beforeCreateAndBeforeUpdate');
|
|
708
736
|
await expect(
|
|
709
737
|
PostgresValidatorTestEntity.loader(vc1).loadByFieldEqualingAsync(
|
|
710
738
|
'name',
|
|
@@ -783,7 +811,7 @@ describe('postgres entity integration', () => {
|
|
|
783
811
|
throw Error('wat');
|
|
784
812
|
}, 0);
|
|
785
813
|
}),
|
|
786
|
-
).rejects.
|
|
814
|
+
).rejects.toThrow('wat');
|
|
787
815
|
|
|
788
816
|
expect(preCommitCallCount).toBe(2);
|
|
789
817
|
expect(preCommitInnerCallCount).toBe(2);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { TransactionalDataLoaderMode, ViewerContext } from '@expo/entity';
|
|
2
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it, test } from '@jest/globals';
|
|
2
3
|
import { knex, Knex } from 'knex';
|
|
3
4
|
import nullthrows from 'nullthrows';
|
|
4
5
|
|
|
5
|
-
import PostgresEntityQueryContextProvider from '../PostgresEntityQueryContextProvider';
|
|
6
|
-
import PostgresUniqueTestEntity from '../__testfixtures__/PostgresUniqueTestEntity';
|
|
6
|
+
import { PostgresEntityQueryContextProvider } from '../PostgresEntityQueryContextProvider';
|
|
7
|
+
import { PostgresUniqueTestEntity } from '../__testfixtures__/PostgresUniqueTestEntity';
|
|
7
8
|
import { createKnexIntegrationTestEntityCompanionProvider } from '../__testfixtures__/createKnexIntegrationTestEntityCompanionProvider';
|
|
8
9
|
|
|
9
10
|
describe(PostgresEntityQueryContextProvider, () => {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ViewerContext } from '@expo/entity';
|
|
2
2
|
import { enforceAsyncResult } from '@expo/results';
|
|
3
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from '@jest/globals';
|
|
3
4
|
import { knex, Knex } from 'knex';
|
|
4
5
|
import nullthrows from 'nullthrows';
|
|
5
6
|
|
|
6
|
-
import InvalidTestEntity from '../__testfixtures__/InvalidTestEntity';
|
|
7
|
+
import { InvalidTestEntity } from '../__testfixtures__/InvalidTestEntity';
|
|
7
8
|
import { createKnexIntegrationTestEntityCompanionProvider } from '../__testfixtures__/createKnexIntegrationTestEntityCompanionProvider';
|
|
8
9
|
|
|
9
10
|
describe('postgres entity integration', () => {
|
|
@@ -47,7 +48,7 @@ describe('postgres entity integration', () => {
|
|
|
47
48
|
.createAsync(),
|
|
48
49
|
);
|
|
49
50
|
|
|
50
|
-
await expect(InvalidTestEntity.deleter(entity1).deleteAsync()).rejects.
|
|
51
|
+
await expect(InvalidTestEntity.deleter(entity1).deleteAsync()).rejects.toThrow(
|
|
51
52
|
'Excessive deletions from database adapter delete',
|
|
52
53
|
);
|
|
53
54
|
});
|
|
@@ -69,7 +70,7 @@ describe('postgres entity integration', () => {
|
|
|
69
70
|
|
|
70
71
|
await expect(
|
|
71
72
|
InvalidTestEntity.updater(entity1).setField('name', 'blah').updateAsync(),
|
|
72
|
-
).rejects.
|
|
73
|
+
).rejects.toThrow('Excessive results from database adapter update');
|
|
73
74
|
});
|
|
74
75
|
|
|
75
76
|
it('throws after update of no rows', async () => {
|
|
@@ -84,7 +85,7 @@ describe('postgres entity integration', () => {
|
|
|
84
85
|
|
|
85
86
|
await expect(
|
|
86
87
|
InvalidTestEntity.updater(entity1).setField('name', 'blah').updateAsync(),
|
|
87
|
-
).rejects.
|
|
88
|
+
).rejects.toThrow('Empty results from database adapter update');
|
|
88
89
|
});
|
|
89
90
|
});
|
|
90
91
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ViewerContext,
|
|
3
2
|
EntityDatabaseAdapterCheckConstraintError,
|
|
4
3
|
EntityDatabaseAdapterExclusionConstraintError,
|
|
5
4
|
EntityDatabaseAdapterForeignKeyConstraintError,
|
|
@@ -7,11 +6,13 @@ import {
|
|
|
7
6
|
EntityDatabaseAdapterTransientError,
|
|
8
7
|
EntityDatabaseAdapterUniqueConstraintError,
|
|
9
8
|
EntityDatabaseAdapterUnknownError,
|
|
9
|
+
ViewerContext,
|
|
10
10
|
} from '@expo/entity';
|
|
11
|
+
import { afterAll, beforeAll, beforeEach, describe, expect, it } from '@jest/globals';
|
|
11
12
|
import { knex, Knex } from 'knex';
|
|
12
13
|
import nullthrows from 'nullthrows';
|
|
13
14
|
|
|
14
|
-
import ErrorsTestEntity from '../__testfixtures__/ErrorsTestEntity';
|
|
15
|
+
import { ErrorsTestEntity } from '../__testfixtures__/ErrorsTestEntity';
|
|
15
16
|
import { createKnexIntegrationTestEntityCompanionProvider } from '../__testfixtures__/createKnexIntegrationTestEntityCompanionProvider';
|
|
16
17
|
|
|
17
18
|
describe('postgres errors', () => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AlwaysAllowPrivacyPolicyRule,
|
|
3
|
-
EntityPrivacyPolicy,
|
|
4
|
-
ViewerContext,
|
|
5
|
-
StringField,
|
|
6
|
-
EntityConfiguration,
|
|
7
|
-
EntityCompanionDefinition,
|
|
8
3
|
Entity,
|
|
4
|
+
EntityCompanionDefinition,
|
|
5
|
+
EntityConfiguration,
|
|
6
|
+
EntityPrivacyPolicy,
|
|
9
7
|
IntField,
|
|
8
|
+
StringField,
|
|
9
|
+
ViewerContext,
|
|
10
10
|
} from '@expo/entity';
|
|
11
11
|
import { Knex } from 'knex';
|
|
12
12
|
|
|
@@ -22,7 +22,7 @@ type ErrorsTestEntityFields = {
|
|
|
22
22
|
|
|
23
23
|
const foreignTableName = 'foreign_table';
|
|
24
24
|
|
|
25
|
-
export
|
|
25
|
+
export class ErrorsTestEntity extends Entity<ErrorsTestEntityFields, 'id', ViewerContext> {
|
|
26
26
|
static defineCompanionDefinition(): EntityCompanionDefinition<
|
|
27
27
|
ErrorsTestEntityFields,
|
|
28
28
|
'id',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AlwaysAllowPrivacyPolicyRule,
|
|
3
|
-
EntityPrivacyPolicy,
|
|
4
|
-
ViewerContext,
|
|
5
|
-
StringField,
|
|
6
|
-
EntityConfiguration,
|
|
7
|
-
EntityCompanionDefinition,
|
|
8
3
|
Entity,
|
|
4
|
+
EntityCompanionDefinition,
|
|
5
|
+
EntityConfiguration,
|
|
6
|
+
EntityPrivacyPolicy,
|
|
9
7
|
IntField,
|
|
8
|
+
StringField,
|
|
9
|
+
ViewerContext,
|
|
10
10
|
} from '@expo/entity';
|
|
11
11
|
import { Knex } from 'knex';
|
|
12
12
|
|
|
@@ -15,11 +15,7 @@ type InvalidTestEntityFields = {
|
|
|
15
15
|
name: string | null;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
export
|
|
19
|
-
InvalidTestEntityFields,
|
|
20
|
-
'id',
|
|
21
|
-
ViewerContext
|
|
22
|
-
> {
|
|
18
|
+
export class InvalidTestEntity extends Entity<InvalidTestEntityFields, 'id', ViewerContext> {
|
|
23
19
|
static defineCompanionDefinition(): EntityCompanionDefinition<
|
|
24
20
|
InvalidTestEntityFields,
|
|
25
21
|
'id',
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AlwaysAllowPrivacyPolicyRule,
|
|
3
|
-
EntityPrivacyPolicy,
|
|
4
|
-
ViewerContext,
|
|
5
|
-
StringField,
|
|
6
3
|
BooleanField,
|
|
7
|
-
StringArrayField,
|
|
8
|
-
JSONObjectField,
|
|
9
4
|
DateField,
|
|
10
|
-
EntityConfiguration,
|
|
11
|
-
EntityCompanionDefinition,
|
|
12
5
|
Entity,
|
|
6
|
+
EntityCompanionDefinition,
|
|
7
|
+
EntityConfiguration,
|
|
8
|
+
EntityPrivacyPolicy,
|
|
9
|
+
JSONObjectField,
|
|
10
|
+
StringArrayField,
|
|
11
|
+
StringField,
|
|
13
12
|
UUIDField,
|
|
13
|
+
ViewerContext,
|
|
14
|
+
BufferField,
|
|
14
15
|
} from '@expo/entity';
|
|
15
16
|
import { Knex } from 'knex';
|
|
16
17
|
|
|
@@ -29,13 +30,10 @@ 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
|
-
export
|
|
35
|
-
PostgresTestEntityFields,
|
|
36
|
-
'id',
|
|
37
|
-
ViewerContext
|
|
38
|
-
> {
|
|
36
|
+
export class PostgresTestEntity extends Entity<PostgresTestEntityFields, 'id', ViewerContext> {
|
|
39
37
|
static defineCompanionDefinition(): EntityCompanionDefinition<
|
|
40
38
|
PostgresTestEntityFields,
|
|
41
39
|
'id',
|
|
@@ -65,6 +63,7 @@ export default class PostgresTestEntity extends Entity<
|
|
|
65
63
|
table.dateTime('date_field', { useTz: true });
|
|
66
64
|
table.jsonb('maybe_json_array_field');
|
|
67
65
|
table.bigint('bigint_field');
|
|
66
|
+
table.binary('binary_field');
|
|
68
67
|
});
|
|
69
68
|
}
|
|
70
69
|
await knex.into(tableName).truncate();
|
|
@@ -157,6 +156,9 @@ export const postgresTestEntityConfiguration = new EntityConfiguration<
|
|
|
157
156
|
bigintField: new BigIntField({
|
|
158
157
|
columnName: 'bigint_field',
|
|
159
158
|
}),
|
|
159
|
+
binaryField: new BufferField({
|
|
160
|
+
columnName: 'binary_field',
|
|
161
|
+
}),
|
|
160
162
|
},
|
|
161
163
|
databaseAdapterFlavor: 'postgres',
|
|
162
164
|
cacheAdapterFlavor: 'redis',
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AlwaysAllowPrivacyPolicyRule,
|
|
3
|
-
EntityPrivacyPolicy,
|
|
4
|
-
ViewerContext,
|
|
5
|
-
StringField,
|
|
6
|
-
EntityConfiguration,
|
|
7
|
-
EntityCompanionDefinition,
|
|
8
3
|
Entity,
|
|
4
|
+
EntityCompanionDefinition,
|
|
5
|
+
EntityConfiguration,
|
|
9
6
|
EntityMutationTrigger,
|
|
10
|
-
EntityQueryContext,
|
|
11
7
|
EntityNonTransactionalMutationTrigger,
|
|
8
|
+
EntityPrivacyPolicy,
|
|
9
|
+
EntityQueryContext,
|
|
12
10
|
EntityTriggerMutationInfo,
|
|
11
|
+
StringField,
|
|
13
12
|
UUIDField,
|
|
13
|
+
ViewerContext,
|
|
14
14
|
} from '@expo/entity';
|
|
15
15
|
import { Knex } from 'knex';
|
|
16
16
|
|
|
@@ -19,7 +19,7 @@ type PostgresTriggerTestEntityFields = {
|
|
|
19
19
|
name: string | null;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
export
|
|
22
|
+
export class PostgresTriggerTestEntity extends Entity<
|
|
23
23
|
PostgresTriggerTestEntityFields,
|
|
24
24
|
'id',
|
|
25
25
|
ViewerContext
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AlwaysAllowPrivacyPolicyRule,
|
|
3
|
+
Entity,
|
|
4
|
+
EntityCompanionDefinition,
|
|
5
|
+
EntityConfiguration,
|
|
3
6
|
EntityPrivacyPolicy,
|
|
4
|
-
|
|
7
|
+
EntityTransactionalQueryContext,
|
|
5
8
|
StringField,
|
|
6
|
-
EntityConfiguration,
|
|
7
|
-
EntityCompanionDefinition,
|
|
8
|
-
Entity,
|
|
9
9
|
UUIDField,
|
|
10
|
-
|
|
10
|
+
ViewerContext,
|
|
11
11
|
} from '@expo/entity';
|
|
12
12
|
import { Knex } from 'knex';
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ type PostgresUniqueTestEntityFields = {
|
|
|
16
16
|
name: string | null;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export
|
|
19
|
+
export class PostgresUniqueTestEntity extends Entity<
|
|
20
20
|
PostgresUniqueTestEntityFields,
|
|
21
21
|
'id',
|
|
22
22
|
ViewerContext
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AlwaysAllowPrivacyPolicyRule,
|
|
3
|
-
EntityPrivacyPolicy,
|
|
4
|
-
ViewerContext,
|
|
5
|
-
StringField,
|
|
6
|
-
EntityConfiguration,
|
|
7
|
-
EntityCompanionDefinition,
|
|
8
3
|
Entity,
|
|
4
|
+
EntityCompanionDefinition,
|
|
5
|
+
EntityConfiguration,
|
|
9
6
|
EntityMutationTrigger,
|
|
7
|
+
EntityPrivacyPolicy,
|
|
10
8
|
EntityQueryContext,
|
|
11
9
|
EntityValidatorMutationInfo,
|
|
10
|
+
StringField,
|
|
12
11
|
UUIDField,
|
|
12
|
+
ViewerContext,
|
|
13
13
|
} from '@expo/entity';
|
|
14
14
|
import { Knex } from 'knex';
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@ type PostgresValidatorTestEntityFields = {
|
|
|
18
18
|
name: string | null;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export
|
|
21
|
+
export class PostgresValidatorTestEntity extends Entity<
|
|
22
22
|
PostgresValidatorTestEntityFields,
|
|
23
23
|
'id',
|
|
24
24
|
ViewerContext
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
NoOpEntityMetricsAdapter,
|
|
3
|
-
IEntityMetricsAdapter,
|
|
4
2
|
EntityCompanionProvider,
|
|
3
|
+
IEntityMetricsAdapter,
|
|
4
|
+
NoOpEntityMetricsAdapter,
|
|
5
5
|
} from '@expo/entity';
|
|
6
6
|
import { InMemoryFullCacheStubCacheAdapterProvider } from '@expo/entity-testing-utils';
|
|
7
7
|
import { Knex } from 'knex';
|
|
8
8
|
|
|
9
|
-
import PostgresEntityDatabaseAdapterProvider from '../PostgresEntityDatabaseAdapterProvider';
|
|
10
|
-
import PostgresEntityQueryContextProvider from '../PostgresEntityQueryContextProvider';
|
|
9
|
+
import { PostgresEntityDatabaseAdapterProvider } from '../PostgresEntityDatabaseAdapterProvider';
|
|
10
|
+
import { PostgresEntityQueryContextProvider } from '../PostgresEntityQueryContextProvider';
|
|
11
11
|
|
|
12
12
|
export const createKnexIntegrationTestEntityCompanionProvider = (
|
|
13
13
|
knex: Knex,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { describe, expect, it } from '@jest/globals';
|
|
2
|
+
|
|
3
|
+
import { wrapNativePostgresCallAsync } from '../wrapNativePostgresCallAsync';
|
|
2
4
|
|
|
3
5
|
describe(wrapNativePostgresCallAsync, () => {
|
|
4
6
|
it('rethrows literals', async () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
EntityDatabaseAdapterError,
|
|
3
2
|
EntityDatabaseAdapterCheckConstraintError,
|
|
3
|
+
EntityDatabaseAdapterError,
|
|
4
4
|
EntityDatabaseAdapterExclusionConstraintError,
|
|
5
5
|
EntityDatabaseAdapterForeignKeyConstraintError,
|
|
6
6
|
EntityDatabaseAdapterNotNullConstraintError,
|
|
@@ -43,7 +43,7 @@ function translatePostgresError(
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export
|
|
46
|
+
export async function wrapNativePostgresCallAsync<T>(fn: () => Promise<T>): Promise<T> {
|
|
47
47
|
try {
|
|
48
48
|
return await fn();
|
|
49
49
|
} catch (e) {
|
package/src/index.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
export * from './EntityFields';
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
8
|
+
export * from './PostgresEntityDatabaseAdapter';
|
|
9
|
+
export * from './PostgresEntityDatabaseAdapterProvider';
|
|
10
|
+
export * from './PostgresEntityQueryContextProvider';
|
|
11
|
+
export * from './errors/wrapNativePostgresCallAsync';
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntityFields.js","sourceRoot":"","sources":["../src/EntityFields.ts"],"names":[],"mappings":";;;AAAA,yCAAqD;AAErD;;GAEG;AACH,MAAa,cAAsD,SAAQ,8BAG1E;IACW,0BAA0B,CAAC,KAAY;QAC/C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACF;AAPD,wCAOC;AAED;;;GAGG;AACH,MAAa,mBAEX,SAAQ,8BAAyD;IACvD,0BAA0B,CAAC,MAAW;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAND,kDAMC;AAED;;GAEG;AACH,MAAa,WAAmD,SAAQ,8BAGvE;IACW,0BAA0B,CAAC,KAAa;QAChD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;IACnC,CAAC;CACF;AAPD,kCAOC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PostgresEntityDatabaseAdapter.js","sourceRoot":"","sources":["../src/PostgresEntityDatabaseAdapter.ts"],"names":[],"mappings":";;;;;AAAA,yCAQsB;AAGtB,iDAAqE;AACrE,uGAA+E;AAE/E,MAAqB,6BAGnB,SAAQ,8BAAwC;IACtC,sBAAsB;QAC9B,OAAO,IAAI,GAAG,CAAgC;YAC5C;gBACE,6BAAc,CAAC,IAAI;gBACnB;oBACE;;;uBAGG;oBACH,KAAK,EAAE,CAAC,GAAU,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;iBAC3C;aACF;YACD;gBACE,kCAAmB,CAAC,IAAI;gBACxB;oBACE;;;;uBAIG;oBACH,KAAK,EAAE,CAAC,GAAgB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;iBAC9E;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAES,KAAK,CAAC,2BAA2B,CACzC,cAAoB,EACpB,SAAiB,EACjB,YAA+B,EAC/B,WAAoB;QAEpB,yEAAyE;QACzE,iDAAiD;QACjD,gFAAgF;QAChF,yFAAyF;QACzF,kCAAkC;QAClC,EAAE;QACF,gFAAgF;QAChF,4GAA4G;QAC5G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,CAAC,oCAAoC,CAAC,KAAK,EAAE,uBAAuB,CAAC,CAAC;QAClF,OAAO,MAAM,IAAA,qCAA2B,EAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;IAES,KAAK,CAAC,mBAAmB,CACjC,cAAoB,EACpB,SAAiB,EACjB,MAAc;QAEd,OAAO,MAAM,IAAA,qCAA2B,EAAC,GAAG,EAAE,CAC5C,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAC7D,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,mBAAmB,CACjC,cAAoB,EACpB,SAAiB,EACjB,YAAoB,EACpB,EAAO,EACP,MAAc;QAEd,OAAO,MAAM,IAAA,qCAA2B,EAAC,GAAG,EAAE,CAC5C,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CACrF,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,mBAAmB,CACjC,cAAoB,EACpB,SAAiB,EACjB,YAAoB,EACpB,EAAO;QAEP,OAAO,MAAM,IAAA,qCAA2B,EAAC,GAAG,EAAE,CAC5C,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAC7D,CAAC;IACJ,CAAC;CACF;AA9MD,gDA8MC"}
|
|
@@ -1,13 +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 PostgresEntityDatabaseAdapter_1 = __importDefault(require("./PostgresEntityDatabaseAdapter"));
|
|
7
|
-
class PostgresEntityDatabaseAdapterProvider {
|
|
8
|
-
getDatabaseAdapter(entityConfiguration) {
|
|
9
|
-
return new PostgresEntityDatabaseAdapter_1.default(entityConfiguration);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.default = PostgresEntityDatabaseAdapterProvider;
|
|
13
|
-
//# sourceMappingURL=PostgresEntityDatabaseAdapterProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PostgresEntityDatabaseAdapterProvider.js","sourceRoot":"","sources":["../src/PostgresEntityDatabaseAdapterProvider.ts"],"names":[],"mappings":";;;;;AAMA,oGAA4E;AAE5E,MAAqB,qCAAqC;IAGxD,kBAAkB,CAChB,mBAA2D;QAE3D,OAAO,IAAI,uCAA6B,CAAC,mBAAmB,CAAC,CAAC;IAChE,CAAC;CACF;AARD,wDAQC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PostgresEntityQueryContextProvider.js","sourceRoot":"","sources":["../src/PostgresEntityQueryContextProvider.ts"],"names":[],"mappings":";;AAAA,yCAIsB;AAGtB;;GAEG;AACH,MAAqB,kCAAmC,SAAQ,mCAA0B;IAC3D;IAA7B,YAA6B,YAAkB;QAC7C,KAAK,EAAE,CAAC;QADmB,iBAAY,GAAZ,YAAY,CAAM;IAE/C,CAAC;IAES,iBAAiB;QACzB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAES,uBAAuB,CAC/B,iBAAqC;QAErC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAC1B,IAAI,CAAC,YAAY,CAAC,WAAW,CAC3B,gBAAgB,EAChB,iBAAiB;YACf,CAAC,CAAC,kCAAkC,CAAC,wBAAwB,CAAC,iBAAiB,CAAC;YAChF,CAAC,CAAC,SAAS,CACd,CAAC;IACN,CAAC;IAES,6BAA6B,CACrC,mBAAwB;QAExB,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAE,mBAA4B,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAC3F,CAAC;IAEO,MAAM,CAAC,wBAAwB,CACrC,iBAAoC;QAEpC,MAAM,qBAAqB,GAAG,CAC5B,cAAyC,EACnB,EAAE;YACxB,QAAQ,cAAc,EAAE,CAAC;gBACvB,KAAK,kCAAyB,CAAC,cAAc;oBAC3C,OAAO,gBAAgB,CAAC;gBAC1B,KAAK,kCAAyB,CAAC,eAAe;oBAC5C,OAAO,iBAAiB,CAAC;gBAC3B,KAAK,kCAAyB,CAAC,YAAY;oBACzC,OAAO,cAAc,CAAC;YAC1B,CAAC;QACH,CAAC,CAAC;QAEF,OAAO;YACL,GAAG,CAAC,iBAAiB,CAAC,cAAc;gBAClC,CAAC,CAAC,EAAE,cAAc,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE;gBAC7E,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;IACJ,CAAC;CACF;AAjDD,qDAiDC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function wrapNativePostgresCallAsync<T>(fn: () => Promise<T>): Promise<T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wrapNativePostgresCallAsync.js","sourceRoot":"","sources":["../../src/errors/wrapNativePostgresCallAsync.ts"],"names":[],"mappings":";;AA6CA,8CASC;AAtDD,yCASsB;AACtB,+BAA4B;AAE5B,SAAS,uBAAuB,CAC9B,KAAgC;IAEhC,MAAM,GAAG,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAChB,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,sBAAsB,CAC7B,KAAgC;IAEhC,IAAI,KAAK,YAAY,WAAI,CAAC,gBAAgB,EAAE,CAAC;QAC3C,OAAO,IAAI,4CAAmC,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACvE,CAAC;IAED,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,IAAI,oDAA2C,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC/E,KAAK,OAAO;YACV,OAAO,IAAI,uDAA8C,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAClF,KAAK,OAAO;YACV,OAAO,IAAI,mDAA0C,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC9E,KAAK,OAAO;YACV,OAAO,IAAI,kDAAyC,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC7E,KAAK,OAAO;YACV,OAAO,IAAI,sDAA6C,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACjF;YACE,OAAO,IAAI,0CAAiC,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACvE,CAAC;AACH,CAAC;AAEc,KAAK,UAAU,2BAA2B,CAAI,EAAoB;IAC/E,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,CAAC,CAAC;QACV,CAAC;QACD,MAAM,uBAAuB,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;AACH,CAAC"}
|
package/build/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @packageDocumentation
|
|
3
|
-
* @module @expo/entity-database-adapter-knex
|
|
4
|
-
*/
|
|
5
|
-
export * from './EntityFields';
|
|
6
|
-
export { default as PostgresEntityDatabaseAdapter } from './PostgresEntityDatabaseAdapter';
|
|
7
|
-
export { default as PostgresEntityDatabaseAdapterProvider } from './PostgresEntityDatabaseAdapterProvider';
|
|
8
|
-
export { default as PostgresEntityQueryContextProvider } from './PostgresEntityQueryContextProvider';
|
|
9
|
-
export { default as wrapNativePostgresCallAsync } from './errors/wrapNativePostgresCallAsync';
|
package/build/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable tsdoc/syntax */
|
|
3
|
-
/**
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
* @module @expo/entity-database-adapter-knex
|
|
6
|
-
*/
|
|
7
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
-
if (k2 === undefined) k2 = k;
|
|
9
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(o, k2, desc);
|
|
14
|
-
}) : (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
o[k2] = m[k];
|
|
17
|
-
}));
|
|
18
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.wrapNativePostgresCallAsync = exports.PostgresEntityQueryContextProvider = exports.PostgresEntityDatabaseAdapterProvider = exports.PostgresEntityDatabaseAdapter = void 0;
|
|
26
|
-
__exportStar(require("./EntityFields"), exports);
|
|
27
|
-
var PostgresEntityDatabaseAdapter_1 = require("./PostgresEntityDatabaseAdapter");
|
|
28
|
-
Object.defineProperty(exports, "PostgresEntityDatabaseAdapter", { enumerable: true, get: function () { return __importDefault(PostgresEntityDatabaseAdapter_1).default; } });
|
|
29
|
-
var PostgresEntityDatabaseAdapterProvider_1 = require("./PostgresEntityDatabaseAdapterProvider");
|
|
30
|
-
Object.defineProperty(exports, "PostgresEntityDatabaseAdapterProvider", { enumerable: true, get: function () { return __importDefault(PostgresEntityDatabaseAdapterProvider_1).default; } });
|
|
31
|
-
var PostgresEntityQueryContextProvider_1 = require("./PostgresEntityQueryContextProvider");
|
|
32
|
-
Object.defineProperty(exports, "PostgresEntityQueryContextProvider", { enumerable: true, get: function () { return __importDefault(PostgresEntityQueryContextProvider_1).default; } });
|
|
33
|
-
var wrapNativePostgresCallAsync_1 = require("./errors/wrapNativePostgresCallAsync");
|
|
34
|
-
Object.defineProperty(exports, "wrapNativePostgresCallAsync", { enumerable: true, get: function () { return __importDefault(wrapNativePostgresCallAsync_1).default; } });
|
|
35
|
-
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,iCAAiC;AACjC;;;GAGG;;;;;;;;;;;;;;;;;;;;AAEH,iDAA+B;AAC/B,iFAA2F;AAAlF,+JAAA,OAAO,OAAiC;AACjD,iGAA2G;AAAlG,+KAAA,OAAO,OAAyC;AACzD,2FAAqG;AAA5F,yKAAA,OAAO,OAAsC;AACtD,oFAA8F;AAArF,2JAAA,OAAO,OAA+B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["../src/entityfields.ts","../src/postgresentitydatabaseadapter.ts","../src/postgresentitydatabaseadapterprovider.ts","../src/postgresentityquerycontextprovider.ts","../src/index.ts","../src/errors/wrapnativepostgrescallasync.ts"],"version":"5.8.3"}
|
|
File without changes
|
|
File without changes
|