@sqb/connect 4.15.0 → 4.16.1
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/cjs/package.json +3 -0
- package/esm/client/adapter.js +1 -2
- package/esm/client/cursor-stream.js +4 -9
- package/esm/client/cursor.js +17 -22
- package/esm/client/extensions.js +1 -5
- package/esm/client/field-info-map.js +1 -5
- package/esm/client/helpers.js +12 -19
- package/esm/client/sqb-client.js +27 -32
- package/esm/client/sqb-connection.js +36 -41
- package/esm/client/types.js +1 -5
- package/esm/index.js +32 -40
- package/esm/orm/backward.js +12 -19
- package/esm/orm/base-entity.js +6 -10
- package/esm/orm/commands/command.helper.js +28 -34
- package/esm/orm/commands/count.command.js +6 -10
- package/esm/orm/commands/create.command.js +14 -18
- package/esm/orm/commands/delete.command.js +6 -10
- package/esm/orm/commands/find.command.js +30 -34
- package/esm/orm/commands/row-converter.js +3 -7
- package/esm/orm/commands/update.command.js +14 -18
- package/esm/orm/decorators/column.decorator.js +7 -10
- package/esm/orm/decorators/embedded.decorator.js +4 -7
- package/esm/orm/decorators/entity.decorator.js +53 -56
- package/esm/orm/decorators/events.decorator.js +19 -27
- package/esm/orm/decorators/foreignkey.decorator.js +4 -7
- package/esm/orm/decorators/index.decorator.js +6 -9
- package/esm/orm/decorators/link.decorator.js +8 -11
- package/esm/orm/decorators/primarykey.decorator.js +8 -11
- package/esm/orm/decorators/transform.decorator.js +7 -11
- package/esm/orm/model/association-field-metadata.js +4 -8
- package/esm/orm/model/association-node.js +2 -6
- package/esm/orm/model/association.js +16 -20
- package/esm/orm/model/column-field-metadata.js +4 -8
- package/esm/orm/model/embedded-field-metadata.js +4 -7
- package/esm/orm/model/entity-metadata.js +47 -50
- package/esm/orm/model/field-metadata.js +1 -2
- package/esm/orm/model/index-metadata.js +1 -2
- package/esm/orm/model/link-chain.js +4 -8
- package/esm/orm/orm.const.js +3 -6
- package/esm/orm/orm.type.js +1 -2
- package/esm/orm/repository.class.js +22 -26
- package/esm/orm/util/apply-mixins.js +1 -4
- package/esm/orm/util/extract-keyvalues.js +6 -9
- package/esm/orm/util/orm.helper.js +10 -20
- package/esm/orm/util/parse-fields-projection.js +6 -11
- package/esm/orm/util/serialize-field.js +10 -13
- package/esm/package.json +3 -0
- package/package.json +26 -17
- package/types/client/types.d.ts +4 -4
- package/types/orm/commands/row-converter.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqb/connect",
|
|
3
3
|
"description": "Multi-dialect database connection framework written with TypeScript",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.16.1",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"compile": "tsc",
|
|
9
9
|
"prebuild": "npm run lint && npm run clean",
|
|
10
10
|
"build": "npm run build:cjs && npm run build:esm",
|
|
11
|
-
"build:cjs": "tsc -b tsconfig-build-cjs.json",
|
|
12
|
-
"build:esm": "tsc -b tsconfig-build-esm.json",
|
|
11
|
+
"build:cjs": "tsc -b tsconfig-build-cjs.json && cp ../../support/package.cjs.json ../../build/connect/cjs/package.json",
|
|
12
|
+
"build:esm": "tsc -b tsconfig-build-esm.json && cp ../../support/package.esm.json ../../build/connect/esm/package.json",
|
|
13
13
|
"postbuild": "cp README.md package.json ../../LICENSE ../../build/connect",
|
|
14
14
|
"lint": "eslint . --max-warnings=0",
|
|
15
15
|
"lint:fix": "eslint . --max-warnings=0 --fix",
|
|
@@ -24,36 +24,45 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"debug": "^4.3.6",
|
|
26
26
|
"doublylinked": "^2.5.4",
|
|
27
|
-
"fast-tokenizer": "^1.
|
|
28
|
-
"lightning-pool": "^4.
|
|
27
|
+
"fast-tokenizer": "^1.6.0",
|
|
28
|
+
"lightning-pool": "^4.7.3",
|
|
29
29
|
"lodash": "^4.17.21",
|
|
30
|
-
"power-tasks": "^1.
|
|
30
|
+
"power-tasks": "^1.10.1",
|
|
31
31
|
"putil-isplainobject": "^1.1.5",
|
|
32
32
|
"putil-merge": "^3.13.0",
|
|
33
33
|
"putil-promisify": "^1.10.1",
|
|
34
34
|
"putil-varhelpers": "^1.6.5",
|
|
35
|
-
"strict-typed-events": "^2.
|
|
36
|
-
"ts-gems": "^3.5.0"
|
|
35
|
+
"strict-typed-events": "^2.7.2",
|
|
36
|
+
"ts-gems": "^3.5.0",
|
|
37
|
+
"tslib": "^2.6.3"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@types/debug": "^4.1.12",
|
|
40
41
|
"@types/lodash": "^4.17.7",
|
|
41
|
-
"postgrejs": "^2.
|
|
42
|
+
"postgrejs": "^2.18.1"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
|
-
"@sqb/builder": "^4.
|
|
45
|
+
"@sqb/builder": "^4.16.1",
|
|
45
46
|
"reflect-metadata": "^0.2.2"
|
|
46
47
|
},
|
|
47
|
-
"
|
|
48
|
-
"module": "./esm/index.js",
|
|
49
|
-
"types": "./types/index.d.ts",
|
|
48
|
+
"type": "module",
|
|
50
49
|
"exports": {
|
|
51
50
|
".": {
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
"import": {
|
|
52
|
+
"types": "./types/index.d.ts",
|
|
53
|
+
"default": "./esm/index.js"
|
|
54
|
+
},
|
|
55
|
+
"require": {
|
|
56
|
+
"types": "./types/index.d.ts",
|
|
57
|
+
"default": "./cjs/index.js"
|
|
58
|
+
},
|
|
59
|
+
"default": "./esm/index.js"
|
|
60
|
+
},
|
|
61
|
+
"./package.json": "./package.json"
|
|
56
62
|
},
|
|
63
|
+
"main": "./cjs/index.js",
|
|
64
|
+
"module": "./esm/index.js",
|
|
65
|
+
"types": "./types/index.d.ts",
|
|
57
66
|
"contributors": [
|
|
58
67
|
"Eray Hanoglu <e.hanoglu@panates.com>",
|
|
59
68
|
"Ilker Gurelli <i.gurelli@panates.com>"
|
package/types/client/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DataType, ParamOptions } from '@sqb/builder';
|
|
2
2
|
import type { PoolConfiguration } from 'lightning-pool';
|
|
3
3
|
import { Maybe } from 'ts-gems';
|
|
4
|
-
import type { Adapter } from './adapter';
|
|
5
|
-
import type { Cursor } from './cursor';
|
|
6
|
-
import type { FieldInfoMap } from './field-info-map';
|
|
7
|
-
import type { SqbConnection } from './sqb-connection';
|
|
4
|
+
import type { Adapter } from './adapter.js';
|
|
5
|
+
import type { Cursor } from './cursor.js';
|
|
6
|
+
import type { FieldInfoMap } from './field-info-map.js';
|
|
7
|
+
import type { SqbConnection } from './sqb-connection.js';
|
|
8
8
|
export { DataType } from '@sqb/builder';
|
|
9
9
|
export type ExecuteHookFunction = (connection: SqbConnection, request: QueryRequest) => Promise<void>;
|
|
10
10
|
export type FetchFunction = (row: any, request: QueryRequest) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataType } from '@sqb/builder';
|
|
2
2
|
import { Type } from 'ts-gems';
|
|
3
|
-
import type { FieldInfoMap } from '../../client/field-info-map';
|
|
3
|
+
import type { FieldInfoMap } from '../../client/field-info-map.js';
|
|
4
4
|
import { SqbConnection } from '../../client/sqb-connection.js';
|
|
5
5
|
import { ColumnTransformFunction } from '../orm.type.js';
|
|
6
6
|
import type { Repository } from '../repository.class.js';
|