@sqb/postgres 4.19.5 → 4.20.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/README.md CHANGED
@@ -18,12 +18,12 @@ SQB is an extensible, multi-dialect SQL query builder and Database connection wr
18
18
 
19
19
  ## Main goals
20
20
 
21
- - Single code base for any sql based database
22
- - Powerful and simplified query coding scheme
23
- - Fast applications with low memory requirements
24
- - Let applications work with large data tables efficiently
25
- - Support latest JavaScript language standards
26
- - Lightweight and extensible framework.
21
+ - Single code base for any sql based database
22
+ - Powerful and simplified query coding scheme
23
+ - Fast applications with low memory requirements
24
+ - Let applications work with large data tables efficiently
25
+ - Support latest JavaScript language standards
26
+ - Lightweight and extensible framework.
27
27
 
28
28
  You can report bugs and discuss features on the [GitHub issues](https://github.com/sqbjs/sqb/issues) page
29
29
 
@@ -39,7 +39,7 @@ $ npm install @sqb/postgres --save
39
39
 
40
40
  ## Node Compatibility
41
41
 
42
- - node >= 16.x
42
+ - node >= 16.x
43
43
 
44
44
  ### License
45
45
 
@@ -90,7 +90,6 @@ class PgConnection {
90
90
  }
91
91
  onGenerateQuery(request) {
92
92
  if (this.intlcon) {
93
- // eslint-disable-next-line dot-notation
94
93
  request.dialectVersion = this.intlcon.sessionParameters['server_version'];
95
94
  }
96
95
  }
@@ -98,7 +97,9 @@ class PgConnection {
98
97
  if (!this.intlcon)
99
98
  throw new Error('Can not execute query with a closed db session');
100
99
  const params = query.params?.map((v, i) => {
101
- const paramOpts = Array.isArray(query.paramOptions) ? query.paramOptions[i] : undefined;
100
+ const paramOpts = Array.isArray(query.paramOptions)
101
+ ? query.paramOptions[i]
102
+ : undefined;
102
103
  if (v != null && paramOpts && paramOpts.dataType) {
103
104
  const oid = SqbDataTypToOIDMap[paramOpts.dataType]?.[paramOpts.isArray ? 1 : 0];
104
105
  if (oid)
@@ -1,5 +1,5 @@
1
1
  import { DataType } from '@sqb/connect';
2
- import { BindParam, DataTypeOIDs } from 'postgrejs';
2
+ import { BindParam, DataTypeOIDs, } from 'postgrejs';
3
3
  const SqbDataTypToOIDMap = {
4
4
  [DataType.BOOL]: [DataTypeOIDs.bool, DataTypeOIDs._bool],
5
5
  [DataType.CHAR]: [DataTypeOIDs.char, DataTypeOIDs._char],
@@ -87,7 +87,6 @@ export class PgConnection {
87
87
  }
88
88
  onGenerateQuery(request) {
89
89
  if (this.intlcon) {
90
- // eslint-disable-next-line dot-notation
91
90
  request.dialectVersion = this.intlcon.sessionParameters['server_version'];
92
91
  }
93
92
  }
@@ -95,7 +94,9 @@ export class PgConnection {
95
94
  if (!this.intlcon)
96
95
  throw new Error('Can not execute query with a closed db session');
97
96
  const params = query.params?.map((v, i) => {
98
- const paramOpts = Array.isArray(query.paramOptions) ? query.paramOptions[i] : undefined;
97
+ const paramOpts = Array.isArray(query.paramOptions)
98
+ ? query.paramOptions[i]
99
+ : undefined;
99
100
  if (v != null && paramOpts && paramOpts.dataType) {
100
101
  const oid = SqbDataTypToOIDMap[paramOpts.dataType]?.[paramOpts.isArray ? 1 : 0];
101
102
  if (oid)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sqb/postgres",
3
3
  "description": "SQB serialization extension for PostgreSQL database",
4
- "version": "4.19.5",
4
+ "version": "4.20.0",
5
5
  "author": "Panates",
6
6
  "license": "Apache-2.0",
7
7
  "dependencies": {
@@ -9,9 +9,9 @@
9
9
  "tslib": "^2.8.1"
10
10
  },
11
11
  "peerDependencies": {
12
- "@sqb/builder": "^4.19.5",
13
- "@sqb/connect": "^4.19.5",
14
- "@sqb/postgres-dialect": "^4.19.5",
12
+ "@sqb/builder": "^4.20.0",
13
+ "@sqb/connect": "^4.20.0",
14
+ "@sqb/postgres-dialect": "^4.20.0",
15
15
  "postgrejs": ">=2.15.1 <3.0.0"
16
16
  },
17
17
  "type": "module",
@@ -38,12 +38,11 @@
38
38
  ],
39
39
  "repository": {
40
40
  "type": "git",
41
- "url": "https://github.com/sqbjs/sqb.git",
41
+ "url": "https://github.com/panates/sqb.git",
42
42
  "directory": "packages/postgres"
43
43
  },
44
44
  "engines": {
45
- "node": ">=16.0",
46
- "npm": ">=7.0.0"
45
+ "node": ">=18.0"
47
46
  },
48
47
  "files": [
49
48
  "bin/",
@@ -64,5 +63,8 @@
64
63
  "dialect",
65
64
  "serializer",
66
65
  "database"
67
- ]
66
+ ],
67
+ "publishConfig": {
68
+ "access": "public"
69
+ }
68
70
  }