@expo/entity-database-adapter-knex 0.49.0 → 0.51.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/entity-database-adapter-knex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "Knex database adapter for @expo/entity",
|
|
5
5
|
"files": [
|
|
6
6
|
"build",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"author": "Expo",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@expo/entity": "^0.
|
|
31
|
+
"@expo/entity": "^0.51.0",
|
|
32
32
|
"knex": "^3.1.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@expo/entity-testing-utils": "^0.
|
|
36
|
-
"@jest/globals": "^30.
|
|
37
|
-
"pg": "8.
|
|
38
|
-
"typescript": "^5.
|
|
35
|
+
"@expo/entity-testing-utils": "^0.51.0",
|
|
36
|
+
"@jest/globals": "^30.2.0",
|
|
37
|
+
"pg": "8.16.3",
|
|
38
|
+
"typescript": "^5.9.3"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "9140938e1cd20bab7e89224b9e5670e963d735d9"
|
|
41
41
|
}
|
|
@@ -729,13 +729,13 @@ describe('postgres entity integration', () => {
|
|
|
729
729
|
|
|
730
730
|
await expect(
|
|
731
731
|
PostgresValidatorTestEntity.creator(vc1)
|
|
732
|
-
.setField('name', '
|
|
732
|
+
.setField('name', 'beforeCreateAndUpdate')
|
|
733
733
|
.createAsync(),
|
|
734
|
-
).rejects.toThrow('name cannot have value
|
|
734
|
+
).rejects.toThrow('name cannot have value beforeCreateAndUpdate');
|
|
735
735
|
await expect(
|
|
736
736
|
PostgresValidatorTestEntity.loader(vc1).loadByFieldEqualingAsync(
|
|
737
737
|
'name',
|
|
738
|
-
'
|
|
738
|
+
'beforeCreateAndUpdate',
|
|
739
739
|
),
|
|
740
740
|
).resolves.toBeNull();
|
|
741
741
|
});
|
|
@@ -752,13 +752,13 @@ describe('postgres entity integration', () => {
|
|
|
752
752
|
|
|
753
753
|
await expect(
|
|
754
754
|
PostgresValidatorTestEntity.updater(entity)
|
|
755
|
-
.setField('name', '
|
|
755
|
+
.setField('name', 'beforeCreateAndUpdate')
|
|
756
756
|
.updateAsync(),
|
|
757
|
-
).rejects.toThrow('name cannot have value
|
|
757
|
+
).rejects.toThrow('name cannot have value beforeCreateAndUpdate');
|
|
758
758
|
await expect(
|
|
759
759
|
PostgresValidatorTestEntity.loader(vc1).loadByFieldEqualingAsync(
|
|
760
760
|
'name',
|
|
761
|
-
'
|
|
761
|
+
'beforeCreateAndUpdate',
|
|
762
762
|
),
|
|
763
763
|
).resolves.toBeNull();
|
|
764
764
|
});
|
|
@@ -34,7 +34,10 @@ export class PostgresValidatorTestEntity extends Entity<
|
|
|
34
34
|
entityClass: PostgresValidatorTestEntity,
|
|
35
35
|
entityConfiguration: postgresTestEntityConfiguration,
|
|
36
36
|
privacyPolicyClass: PostgresValidatorTestEntityPrivacyPolicy,
|
|
37
|
-
mutationValidators:
|
|
37
|
+
mutationValidators: {
|
|
38
|
+
beforeCreateAndUpdate: [new ThrowConditionallyTrigger('name', 'beforeCreateAndUpdate')],
|
|
39
|
+
beforeDelete: [new ThrowConditionallyTrigger('name', 'beforeDelete')],
|
|
40
|
+
},
|
|
38
41
|
};
|
|
39
42
|
}
|
|
40
43
|
|