@ez4/database 0.39.0 → 0.41.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/dist/services/query.d.ts +9 -4
- package/package.json +7 -7
package/dist/services/query.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { OrderModeUtils } from './order';
|
|
|
7
7
|
import type { LockModeUtils } from './lock';
|
|
8
8
|
import type { TableMetadata } from './table';
|
|
9
9
|
import type { Database } from './contract';
|
|
10
|
-
import type { AnyObject, PartialProperties, PartialObject, FlatObject, OptionalObject, StrictObject, IsNullable, IsUndefined, IsObjectEmpty, IsObject,
|
|
10
|
+
import type { AnyObject, PartialProperties, PartialObject, FlatObject, OptionalObject, StrictObject, IsNullable, IsUndefined, IsObjectEmpty, IsObject, Prettify } from '@ez4/utils';
|
|
11
11
|
/**
|
|
12
12
|
* Query builder types.
|
|
13
13
|
*/
|
|
@@ -71,7 +71,12 @@ export declare namespace Query {
|
|
|
71
71
|
export type InsertOneResult<S extends AnyObject, T extends TableMetadata> = SelectInput<T> extends S ? void : Record<S, T>;
|
|
72
72
|
export type UpdateOneResult<S extends AnyObject, T extends TableMetadata> = SelectInput<T> extends S ? void : Record<S, T> | undefined;
|
|
73
73
|
export type FindOneResult<S extends AnyObject, T extends TableMetadata> = SelectInput<T> extends S ? void : Record<S, T> | undefined;
|
|
74
|
-
export type UpsertOneResult<S extends AnyObject, T extends TableMetadata> = SelectInput<T> extends S ?
|
|
74
|
+
export type UpsertOneResult<S extends AnyObject, T extends TableMetadata> = SelectInput<T> extends S ? {
|
|
75
|
+
inserted: boolean;
|
|
76
|
+
} : {
|
|
77
|
+
inserted: boolean;
|
|
78
|
+
record: Record<S, T>;
|
|
79
|
+
};
|
|
75
80
|
export type DeleteOneResult<S extends AnyObject, T extends TableMetadata> = SelectInput<T> extends S ? void : Record<S, T> | undefined;
|
|
76
81
|
export type UpdateManyResult<S extends AnyObject, T extends TableMetadata> = SelectInput<T> extends S ? void : Record<S, T>[];
|
|
77
82
|
export type InsertManyResult = void;
|
|
@@ -185,7 +190,7 @@ export declare namespace Query {
|
|
|
185
190
|
/**
|
|
186
191
|
* Check whether the entity value is in the given ones.
|
|
187
192
|
*/
|
|
188
|
-
isIn:
|
|
193
|
+
isIn: Exclude<V, undefined>[];
|
|
189
194
|
};
|
|
190
195
|
type WhereBetween<V> = {
|
|
191
196
|
/**
|
|
@@ -213,7 +218,7 @@ export declare namespace Query {
|
|
|
213
218
|
};
|
|
214
219
|
type WhereContains<V, E extends DatabaseEngine> = (V extends string ? InsensitiveModeUtils.Input<E> : {}) & {
|
|
215
220
|
/**
|
|
216
|
-
* Check whether the entity value contains
|
|
221
|
+
* Check whether the entity value contains the given one.
|
|
217
222
|
*/
|
|
218
223
|
contains: IsObject<V> extends true ? Partial<V> : V;
|
|
219
224
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ez4/database",
|
|
3
3
|
"description": "EZ4: Components to build database services",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.41.0",
|
|
5
5
|
"author": "Silas B.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
40
|
"lint": "eslint --cache",
|
|
41
|
-
"clean": "rm -
|
|
41
|
+
"clean": "rm -rf dist/* *.tsbuildinfo .eslintcache",
|
|
42
42
|
"build": "tsc && node tools/bundler.mjs",
|
|
43
43
|
"test": "npm run build && tsc -p tsconfig.test.json && ez4 test",
|
|
44
44
|
"local:publish": "npm run build && npm run clean:registry && npm publish --registry http://localhost:4873",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"live:publish": "npm run build && npm publish --access public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@ez4/common": "^0.
|
|
50
|
-
"@ez4/project": "^0.
|
|
51
|
-
"@ez4/reflection": "^0.
|
|
52
|
-
"@ez4/schema": "^0.
|
|
53
|
-
"@ez4/utils": "^0.
|
|
49
|
+
"@ez4/common": "^0.41.0",
|
|
50
|
+
"@ez4/project": "^0.41.0",
|
|
51
|
+
"@ez4/reflection": "^0.41.0",
|
|
52
|
+
"@ez4/schema": "^0.41.0",
|
|
53
|
+
"@ez4/utils": "^0.41.0"
|
|
54
54
|
}
|
|
55
55
|
}
|