@sqb/postgres-dialect 4.9.0 → 4.10.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.
|
@@ -4,7 +4,9 @@ exports.PostgresSerializer = void 0;
|
|
|
4
4
|
const builder_1 = require("@sqb/builder");
|
|
5
5
|
const reservedWords = ['comment'];
|
|
6
6
|
class PostgresSerializer {
|
|
7
|
-
|
|
7
|
+
constructor() {
|
|
8
|
+
this.dialect = 'postgres';
|
|
9
|
+
}
|
|
8
10
|
isReservedWord(ctx, s) {
|
|
9
11
|
return s && typeof s === 'string' &&
|
|
10
12
|
reservedWords.includes(s.toLowerCase());
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { OperatorType, SerializationType } from '@sqb/builder';
|
|
2
2
|
const reservedWords = ['comment'];
|
|
3
3
|
export class PostgresSerializer {
|
|
4
|
-
|
|
4
|
+
constructor() {
|
|
5
|
+
this.dialect = 'postgres';
|
|
6
|
+
}
|
|
5
7
|
isReservedWord(ctx, s) {
|
|
6
8
|
return s && typeof s === 'string' &&
|
|
7
9
|
reservedWords.includes(s.toLowerCase());
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqb/postgres-dialect",
|
|
3
3
|
"description": "SQB serialization extension for PostgreSQL database",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.10.0",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Eray Hanoglu <e.hanoglu@panates.com>",
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
"url": "https://github.com/sqbjs/sqb.git",
|
|
14
14
|
"directory": "packages/postgres-dialect"
|
|
15
15
|
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"module": "./esm/index.js",
|
|
18
|
+
"main": "./cjs/index.js",
|
|
19
|
+
"types": "./types/index.d.ts",
|
|
16
20
|
"scripts": {
|
|
17
21
|
"compile": "tsc",
|
|
18
22
|
"prebuild": "npm run lint && npm run clean",
|
|
@@ -29,17 +33,7 @@
|
|
|
29
33
|
"clean:cover": "rimraf ../../coverage/postgres-dialect"
|
|
30
34
|
},
|
|
31
35
|
"peerDependencies": {
|
|
32
|
-
"@sqb/builder": "^4.
|
|
33
|
-
},
|
|
34
|
-
"type": "module",
|
|
35
|
-
"types": "esm/index.d.ts",
|
|
36
|
-
"exports": {
|
|
37
|
-
".": {
|
|
38
|
-
"require": "./cjs/index.js",
|
|
39
|
-
"default": "./esm/index.js"
|
|
40
|
-
},
|
|
41
|
-
"./cjs": "./cjs/index.js",
|
|
42
|
-
"./esm": "./esm/index.js"
|
|
36
|
+
"@sqb/builder": "^4.10.0"
|
|
43
37
|
},
|
|
44
38
|
"engines": {
|
|
45
39
|
"node": ">=16.0",
|
package/esm/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DefaultSerializeFunction, SerializationType, SerializeContext, SerializerExtension } from '@sqb/builder';
|
|
2
|
-
export declare class PostgresSerializer implements SerializerExtension {
|
|
3
|
-
dialect: string;
|
|
4
|
-
isReservedWord(ctx: any, s: any): any;
|
|
5
|
-
serialize(ctx: SerializeContext, type: SerializationType | string, o: any, defFn: DefaultSerializeFunction): string | undefined;
|
|
6
|
-
private _serializeSelect;
|
|
7
|
-
private _serializeComparison;
|
|
8
|
-
private _serializeParameter;
|
|
9
|
-
}
|