@sqb/oracle-dialect 4.14.0 → 4.15.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/esm/index.js CHANGED
@@ -1,3 +1,5 @@
1
- import { SerializerRegistry } from '@sqb/builder';
2
- import { OracleSerializer } from './oracle-serializer.js';
3
- SerializerRegistry.register(new OracleSerializer());
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const builder_1 = require("@sqb/builder");
4
+ const oracle_serializer_js_1 = require("./oracle-serializer.js");
5
+ builder_1.SerializerRegistry.register(new oracle_serializer_js_1.OracleSerializer());
@@ -1,6 +1,9 @@
1
- import { OperatorType, SerializationType, } from '@sqb/builder';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OracleSerializer = void 0;
4
+ const builder_1 = require("@sqb/builder");
2
5
  const reservedWords = ['comment', 'dual'];
3
- export class OracleSerializer {
6
+ class OracleSerializer {
4
7
  constructor() {
5
8
  this.dialect = 'oracle';
6
9
  }
@@ -9,23 +12,23 @@ export class OracleSerializer {
9
12
  }
10
13
  serialize(ctx, type, o, defFn) {
11
14
  switch (type) {
12
- case SerializationType.SELECT_QUERY:
15
+ case builder_1.SerializationType.SELECT_QUERY:
13
16
  return this._serializeSelect(ctx, o, defFn);
14
- case SerializationType.SELECT_QUERY_FROM:
17
+ case builder_1.SerializationType.SELECT_QUERY_FROM:
15
18
  return this._serializeFrom(ctx, o, defFn);
16
- case SerializationType.COMPARISON_EXPRESSION:
19
+ case builder_1.SerializationType.COMPARISON_EXPRESSION:
17
20
  return this._serializeComparison(ctx, o, defFn);
18
- case SerializationType.STRING_VALUE:
21
+ case builder_1.SerializationType.STRING_VALUE:
19
22
  return this._serializeStringValue(ctx, o, defFn);
20
- case SerializationType.DATE_VALUE:
23
+ case builder_1.SerializationType.DATE_VALUE:
21
24
  return this._serializeDateValue(ctx, o, defFn);
22
- case SerializationType.BOOLEAN_VALUE:
25
+ case builder_1.SerializationType.BOOLEAN_VALUE:
23
26
  return this._serializeBooleanValue(ctx, o);
24
- case SerializationType.RETURNING_BLOCK:
27
+ case builder_1.SerializationType.RETURNING_BLOCK:
25
28
  return this._serializeReturning();
26
- case SerializationType.STRINGAGG_STATEMENT:
29
+ case builder_1.SerializationType.STRINGAGG_STATEMENT:
27
30
  return this._serializeStringAGG(ctx, o, defFn);
28
- case SerializationType.SEQUENCE_GETTER_STATEMENT:
31
+ case builder_1.SerializationType.SEQUENCE_GETTER_STATEMENT:
29
32
  return this._serializeSequenceGetter(ctx, o, defFn);
30
33
  default:
31
34
  break;
@@ -79,9 +82,9 @@ export class OracleSerializer {
79
82
  o.right.expression = ctx.anyToSQL(o.right.value);
80
83
  o.right.isParam = false;
81
84
  if (o.operatorType === 'eq')
82
- return defFn(ctx, { ...o, operatorType: OperatorType.is, symbol: 'in' });
85
+ return defFn(ctx, { ...o, operatorType: builder_1.OperatorType.is, symbol: 'in' });
83
86
  if (o.operatorType === 'ne')
84
- return defFn(ctx, { ...o, operatorType: OperatorType.isNot, symbol: 'not in' });
87
+ return defFn(ctx, { ...o, operatorType: builder_1.OperatorType.isNot, symbol: 'not in' });
85
88
  }
86
89
  else if ((o.right?.expression && o.right?.expression === 'null') ||
87
90
  (o.right && o.right?.value == null && (!o.right.expression || o.right.expression.startsWith(':')))) {
@@ -97,9 +100,9 @@ export class OracleSerializer {
97
100
  o.right.isParam = false;
98
101
  }
99
102
  if (o.operatorType === 'eq')
100
- return defFn(ctx, { ...o, operatorType: OperatorType.is, symbol: 'is' });
103
+ return defFn(ctx, { ...o, operatorType: builder_1.OperatorType.is, symbol: 'is' });
101
104
  if (o.operatorType === 'ne')
102
- return defFn(ctx, { ...o, operatorType: OperatorType.isNot, symbol: 'is not' });
105
+ return defFn(ctx, { ...o, operatorType: builder_1.OperatorType.isNot, symbol: 'is not' });
103
106
  }
104
107
  return defFn(ctx, o);
105
108
  }
@@ -142,3 +145,4 @@ export class OracleSerializer {
142
145
  return '';
143
146
  }
144
147
  }
148
+ exports.OracleSerializer = OracleSerializer;
package/package.json CHANGED
@@ -1,29 +1,16 @@
1
1
  {
2
2
  "name": "@sqb/oracle-dialect",
3
3
  "description": "SQB serialization extension for Oracle database",
4
- "version": "4.14.0",
4
+ "version": "4.15.0",
5
5
  "author": "Panates",
6
- "contributors": [
7
- "Eray Hanoglu <e.hanoglu@panates.com>",
8
- "Ilker Gurelli <i.gurelli@panates.com>"
9
- ],
10
6
  "license": "Apache-2.0",
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/sqbjs/sqb.git",
14
- "directory": "packages/oracle-dialect"
15
- },
16
- "type": "module",
17
- "module": "./esm/index.js",
18
- "main": "./cjs/index.js",
19
- "types": "./types/index.d.ts",
20
7
  "scripts": {
21
8
  "compile": "tsc",
22
9
  "prebuild": "npm run lint && npm run clean",
23
10
  "build": "npm run build:cjs && npm run build:esm",
24
11
  "build:cjs": "tsc -b tsconfig-build-cjs.json",
25
12
  "build:esm": "tsc -b tsconfig-build-esm.json",
26
- "postbuild": "cp README.md package.json ../../LICENSE ../../build/oracle-dialect && cp ../../package.cjs.json ../../build/oracle-dialect/cjs/package.json",
13
+ "postbuild": "cp README.md package.json ../../LICENSE ../../build/oracle-dialect",
27
14
  "lint": "eslint . --max-warnings=0",
28
15
  "lint:fix": "eslint . --max-warnings=0 --fix",
29
16
  "format": "prettier . --write --log-level=warn",
@@ -35,7 +22,26 @@
35
22
  "clean:cover": "rimraf ../../coverage/oracle-dialect"
36
23
  },
37
24
  "peerDependencies": {
38
- "@sqb/builder": "^4.14.0"
25
+ "@sqb/builder": "^4.15.0"
26
+ },
27
+ "main": "./cjs/index.js",
28
+ "module": "./esm/index.js",
29
+ "types": "./types/index.d.ts",
30
+ "exports": {
31
+ ".": {
32
+ "require": "./cjs/index.js",
33
+ "import": "./esm/index.js",
34
+ "types": "./types/index.d.ts"
35
+ }
36
+ },
37
+ "contributors": [
38
+ "Eray Hanoglu <e.hanoglu@panates.com>",
39
+ "Ilker Gurelli <i.gurelli@panates.com>"
40
+ ],
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "https://github.com/sqbjs/sqb.git",
44
+ "directory": "packages/oracle-dialect"
39
45
  },
40
46
  "engines": {
41
47
  "node": ">=16.0",
package/cjs/package.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }