pqb 0.0.4 → 0.0.6
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/index.d.ts +134 -2
- package/dist/index.esm.js +202 -202
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +225 -201
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/columnSchema/json/index.ts +19 -0
- package/src/columnSchema/json.ts +23 -19
- package/src/db.ts +1 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pqb",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Postgres query builder",
|
|
5
5
|
"homepage": "https://porm.netlify.app/guide/query-builder.html",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "
|
|
8
|
+
"url": "https://github.com/romeerez/porm/tree/main/packages/pqb"
|
|
9
9
|
},
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"module": "dist/index.esm.js",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './array'
|
|
2
|
+
export * from './discriminatedUnion'
|
|
3
|
+
export * from './enum'
|
|
4
|
+
export * from './instanceOf'
|
|
5
|
+
export * from './intersection'
|
|
6
|
+
export * from './lazy'
|
|
7
|
+
export * from './literal'
|
|
8
|
+
export * from './map'
|
|
9
|
+
export * from './nativeEnum'
|
|
10
|
+
export * from './nullable'
|
|
11
|
+
export * from './nullish'
|
|
12
|
+
export * from './object'
|
|
13
|
+
export * from './optional'
|
|
14
|
+
export * from './record'
|
|
15
|
+
export * from './scalarTypes'
|
|
16
|
+
export * from './set'
|
|
17
|
+
export * from './tuple'
|
|
18
|
+
export * from './typeBase'
|
|
19
|
+
export * from './union'
|
package/src/columnSchema/json.ts
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import { ColumnData, ColumnType } from './columnType';
|
|
2
2
|
import { Operators } from '../columnsOperators';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
import {
|
|
4
|
+
scalarTypes,
|
|
5
|
+
array,
|
|
6
|
+
discriminatedUnion,
|
|
7
|
+
enumType,
|
|
8
|
+
instanceOf,
|
|
9
|
+
intersection,
|
|
10
|
+
lazy,
|
|
11
|
+
literal,
|
|
12
|
+
map,
|
|
13
|
+
nativeEnum,
|
|
14
|
+
nullable,
|
|
15
|
+
nullish,
|
|
16
|
+
object,
|
|
17
|
+
optional,
|
|
18
|
+
record,
|
|
19
|
+
set,
|
|
20
|
+
tuple,
|
|
21
|
+
union,
|
|
22
|
+
JSONTypeAny,
|
|
23
|
+
} from './json/index';
|
|
24
|
+
|
|
25
|
+
export * from './json/index';
|
|
22
26
|
|
|
23
27
|
export type JSONTypes = typeof jsonTypes;
|
|
24
28
|
export const jsonTypes = {
|
package/src/db.ts
CHANGED
|
@@ -168,7 +168,7 @@ export type DbOptions<CT extends ColumnTypesBase = ColumnTypes> = (
|
|
|
168
168
|
columnTypes?: CT;
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
-
export const createDb = <CT extends ColumnTypesBase>({
|
|
171
|
+
export const createDb = <CT extends ColumnTypesBase = ColumnTypes>({
|
|
172
172
|
log,
|
|
173
173
|
logger,
|
|
174
174
|
columnTypes: ct = columnTypes as unknown as CT,
|