@noldova/context.data.sql 0.0.0-stage → 0.0.7

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.
Files changed (56) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -2
  3. package/api/index.d.ts +664 -0
  4. package/api/index.js +31 -0
  5. package/api/index.js.map +1 -0
  6. package/enums/column-type.js +13 -0
  7. package/enums/column-type.js.map +1 -0
  8. package/models/operations/create-index-operation.js +19 -0
  9. package/models/operations/create-index-operation.js.map +1 -0
  10. package/models/operations/create-table-operation.js +19 -0
  11. package/models/operations/create-table-operation.js.map +1 -0
  12. package/models/operations/schema-operation.js +10 -0
  13. package/models/operations/schema-operation.js.map +1 -0
  14. package/models/operations/sql-statement-operation.js +22 -0
  15. package/models/operations/sql-statement-operation.js.map +1 -0
  16. package/models/schema/column-builder.js +25 -0
  17. package/models/schema/column-builder.js.map +1 -0
  18. package/models/schema/column.js +21 -0
  19. package/models/schema/column.js.map +1 -0
  20. package/models/schema/columns-builder.js +21 -0
  21. package/models/schema/columns-builder.js.map +1 -0
  22. package/models/schema/constraints-builder.js +29 -0
  23. package/models/schema/constraints-builder.js.map +1 -0
  24. package/models/schema/foreign-key.js +23 -0
  25. package/models/schema/foreign-key.js.map +1 -0
  26. package/models/schema/migration-builder.js +45 -0
  27. package/models/schema/migration-builder.js.map +1 -0
  28. package/models/schema/primary-key.js +18 -0
  29. package/models/schema/primary-key.js.map +1 -0
  30. package/models/schema/table.js +25 -0
  31. package/models/schema/table.js.map +1 -0
  32. package/models/sql-connection.js +46 -0
  33. package/models/sql-connection.js.map +1 -0
  34. package/models/sql-migration.js +14 -0
  35. package/models/sql-migration.js.map +1 -0
  36. package/models/sql-query.js +22 -0
  37. package/models/sql-query.js.map +1 -0
  38. package/models/sql-session.js +10 -0
  39. package/models/sql-session.js.map +1 -0
  40. package/models/sql-transaction.js +36 -0
  41. package/models/sql-transaction.js.map +1 -0
  42. package/package.json +25 -4
  43. package/resources.js +58 -0
  44. package/resources.js.map +1 -0
  45. package/services/sql-change-feed.js +54 -0
  46. package/services/sql-change-feed.js.map +1 -0
  47. package/services/sql-dialect.js +49 -0
  48. package/services/sql-dialect.js.map +1 -0
  49. package/services/sql-migration-history.js +32 -0
  50. package/services/sql-migration-history.js.map +1 -0
  51. package/services/sql-migrator.js +37 -0
  52. package/services/sql-migrator.js.map +1 -0
  53. package/services/sql-provider.js +19 -0
  54. package/services/sql-provider.js.map +1 -0
  55. package/types/column-selector.js +9 -0
  56. package/types/column-selector.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-type.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql/src/enums/column-type.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,iCAAmB,CAAA;AACrB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { SchemaOperation } from "./schema-operation.js";
9
+ export class CreateIndexOperation extends SchemaOperation {
10
+ index;
11
+ constructor(index) {
12
+ super();
13
+ this.index = index;
14
+ }
15
+ render(dialect) {
16
+ return dialect.renderCreateIndex(this.index);
17
+ }
18
+ }
19
+ //# sourceMappingURL=create-index-operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-index-operation.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/operations/create-index-operation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,OAAO,oBAAqB,SAAQ,eAAe;IACvC,KAAK,CAAQ;IAE7B,YAAmB,KAAY;QAC7B,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEe,MAAM,CAAC,OAAmB;QACxC,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { SchemaOperation } from "./schema-operation.js";
9
+ export class CreateTableOperation extends SchemaOperation {
10
+ table;
11
+ constructor(table) {
12
+ super();
13
+ this.table = table;
14
+ }
15
+ render(dialect) {
16
+ return dialect.renderCreateTable(this.table);
17
+ }
18
+ }
19
+ //# sourceMappingURL=create-table-operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-table-operation.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/operations/create-table-operation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,OAAO,oBAAqB,SAAQ,eAAe;IACvC,KAAK,CAAQ;IAE7B,YAAmB,KAAY;QAC7B,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEe,MAAM,CAAC,OAAmB;QACxC,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class SchemaOperation {
9
+ }
10
+ //# sourceMappingURL=schema-operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-operation.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/operations/schema-operation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAgB,eAAe;CAEpC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ArgumentException } from "@noldova/context.exceptions";
9
+ import { Resources } from "../../resources.js";
10
+ import { SchemaOperation } from "./schema-operation.js";
11
+ export class SqlStatementOperation extends SchemaOperation {
12
+ statement;
13
+ constructor(statement) {
14
+ super();
15
+ ArgumentException.throwIfNullOrWhitespace(statement, Resources.statementParameterName);
16
+ this.statement = statement;
17
+ }
18
+ render() {
19
+ return this.statement;
20
+ }
21
+ }
22
+ //# sourceMappingURL=sql-statement-operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-statement-operation.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/operations/sql-statement-operation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,OAAO,qBAAsB,SAAQ,eAAe;IACxC,SAAS,CAAS;IAElC,YAAmB,SAAiB;QAClC,KAAK,EAAE,CAAC;QACR,iBAAiB,CAAC,uBAAuB,CAAC,SAAS,EAAE,SAAS,CAAC,sBAAsB,CAAC,CAAC;QAEvF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAEe,MAAM;QACpB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Column } from "./column.js";
9
+ export class ColumnBuilder {
10
+ isNullable = false;
11
+ name;
12
+ type;
13
+ constructor(name, type) {
14
+ this.name = name;
15
+ this.type = type;
16
+ }
17
+ makeNullable() {
18
+ this.isNullable = true;
19
+ return this;
20
+ }
21
+ toColumn() {
22
+ return new Column(this.name, this.type, this.isNullable);
23
+ }
24
+ }
25
+ //# sourceMappingURL=column-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-builder.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/schema/column-builder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,OAAO,aAAa;IAChB,UAAU,GAAY,KAAK,CAAC;IAEpB,IAAI,CAAS;IACb,IAAI,CAAa;IAEjC,YAAmB,IAAY,EAAE,IAAgB;QAC/C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,YAAY;QACjB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3D,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ArgumentException } from "@noldova/context.exceptions";
9
+ import { Resources } from "../../resources.js";
10
+ export class Column {
11
+ name;
12
+ type;
13
+ isNullable;
14
+ constructor(name, type, isNullable) {
15
+ ArgumentException.throwIfNullOrWhitespace(name, Resources.nameParameterName);
16
+ this.name = name;
17
+ this.type = type;
18
+ this.isNullable = isNullable;
19
+ }
20
+ }
21
+ //# sourceMappingURL=column.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/schema/column.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,MAAM;IACD,IAAI,CAAS;IACb,IAAI,CAAa;IACjB,UAAU,CAAU;IAEpC,YAAmB,IAAY,EAAE,IAAgB,EAAE,UAAmB;QACpE,iBAAiB,CAAC,uBAAuB,CAAC,IAAI,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAE7E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { nameof } from "@noldova/context.core";
9
+ import { ColumnBuilder } from "./column-builder.js";
10
+ export class ColumnsBuilder {
11
+ columns = [];
12
+ addColumn(nameOrSelector, type) {
13
+ const column = new ColumnBuilder(Object.isString(nameOrSelector) ? nameOrSelector : nameof(nameOrSelector), type);
14
+ this.columns.push(column);
15
+ return column;
16
+ }
17
+ toColumns() {
18
+ return this.columns.map(t => t.toColumn());
19
+ }
20
+ }
21
+ //# sourceMappingURL=columns-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"columns-builder.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/schema/columns-builder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAK/C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,OAAO,cAAc;IACR,OAAO,GAAoB,EAAE,CAAC;IAIxC,SAAS,CAAC,cAA+C,EAAE,IAAgB;QAChF,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAS,cAAc,CAAC,EAAE,IAAI,CAAC,CAAC;QAC1H,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1B,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,SAAS;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7C,CAAC;CACF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { nameof } from "@noldova/context.core";
9
+ import { ForeignKey } from "./foreign-key.js";
10
+ import { PrimaryKey } from "./primary-key.js";
11
+ export class ConstraintsBuilder {
12
+ key = null;
13
+ foreignKeys = [];
14
+ addPrimaryKey(...columns) {
15
+ this.key = new PrimaryKey(columns.map(t => nameof(t)));
16
+ return this;
17
+ }
18
+ addForeignKey(column, principalTable, principalColumn) {
19
+ this.foreignKeys.push(new ForeignKey(nameof(column), principalTable, nameof(principalColumn)));
20
+ return this;
21
+ }
22
+ toPrimaryKey() {
23
+ return this.key;
24
+ }
25
+ toForeignKeys() {
26
+ return [...this.foreignKeys];
27
+ }
28
+ }
29
+ //# sourceMappingURL=constraints-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constraints-builder.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/schema/constraints-builder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,MAAM,OAAO,kBAAkB;IACrB,GAAG,GAAsB,IAAI,CAAC;IACrB,WAAW,GAAiB,EAAE,CAAC;IAEzC,aAAa,CAAC,GAAG,OAA0C;QAChE,IAAI,CAAC,GAAG,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,aAAa,CAAa,MAA8B,EAAE,cAAsB,EAAE,eAA2C;QAClI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,MAAM,CAAS,MAAM,CAAC,EAAE,cAAc,EAAE,MAAM,CAAa,eAAe,CAAC,CAAC,CAAC,CAAC;QACnH,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,YAAY;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAEM,aAAa;QAClB,OAAO,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/B,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ArgumentException } from "@noldova/context.exceptions";
9
+ import { Resources } from "../../resources.js";
10
+ export class ForeignKey {
11
+ column;
12
+ principalTable;
13
+ principalColumn;
14
+ constructor(column, principalTable, principalColumn) {
15
+ ArgumentException.throwIfNullOrWhitespace(column, Resources.columnParameterName);
16
+ ArgumentException.throwIfNullOrWhitespace(principalTable, Resources.principalTableParameterName);
17
+ ArgumentException.throwIfNullOrWhitespace(principalColumn, Resources.principalColumnParameterName);
18
+ this.column = column;
19
+ this.principalTable = principalTable;
20
+ this.principalColumn = principalColumn;
21
+ }
22
+ }
23
+ //# sourceMappingURL=foreign-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foreign-key.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/schema/foreign-key.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,UAAU;IACL,MAAM,CAAS;IACf,cAAc,CAAS;IACvB,eAAe,CAAS;IAExC,YAAmB,MAAc,EAAE,cAAsB,EAAE,eAAuB;QAChF,iBAAiB,CAAC,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACjF,iBAAiB,CAAC,uBAAuB,CAAC,cAAc,EAAE,SAAS,CAAC,2BAA2B,CAAC,CAAC;QACjG,iBAAiB,CAAC,uBAAuB,CAAC,eAAe,EAAE,SAAS,CAAC,4BAA4B,CAAC,CAAC;QAEnG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;CACF"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { nameof } from "@noldova/context.core";
9
+ import { Index } from "@noldova/context.data";
10
+ import { CreateIndexOperation } from "../operations/create-index-operation.js";
11
+ import { CreateTableOperation } from "../operations/create-table-operation.js";
12
+ import { SqlStatementOperation } from "../operations/sql-statement-operation.js";
13
+ import { Table } from "./table.js";
14
+ import { Resources } from "../../resources.js";
15
+ import { ColumnsBuilder } from "./columns-builder.js";
16
+ import { ConstraintsBuilder } from "./constraints-builder.js";
17
+ export class MigrationBuilder {
18
+ operations = [];
19
+ createTable(name, columns, constraints) {
20
+ const columnsBuilder = new ColumnsBuilder();
21
+ columns(columnsBuilder);
22
+ const constraintsBuilder = new ConstraintsBuilder();
23
+ if (!Object.isUndefined(constraints))
24
+ constraints(constraintsBuilder);
25
+ const table = new Table(name, columnsBuilder.toColumns(), constraintsBuilder.toPrimaryKey(), constraintsBuilder.toForeignKeys());
26
+ this.operations.push(new CreateTableOperation(table));
27
+ }
28
+ createIndex(table, ...columns) {
29
+ this.addIndex(table, columns.map(t => nameof(t)), false);
30
+ }
31
+ createUniqueIndex(table, ...columns) {
32
+ this.addIndex(table, columns.map(t => nameof(t)), true);
33
+ }
34
+ executeSql(statement) {
35
+ this.operations.push(new SqlStatementOperation(statement));
36
+ }
37
+ toOperations() {
38
+ return [...this.operations];
39
+ }
40
+ addIndex(table, columns, isUnique) {
41
+ const name = [Resources.indexNamePrefix, table, ...columns].join(Resources.nameSeparator);
42
+ this.operations.push(new CreateIndexOperation(new Index(name, table, columns, isUnique)));
43
+ }
44
+ }
45
+ //# sourceMappingURL=migration-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-builder.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/schema/migration-builder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAE/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,E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,OAAO,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9B,CAAC;IAEO,QAAQ,CAAC,KAAa,EAAE,OAA0B,EAAE,QAAiB;QAC3E,MAAM,IAAI,GAAG,CAAC,SAAS,CAAC,eAAe,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAC1F,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,oBAAoB,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5F,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ArgumentException } from "@noldova/context.exceptions";
9
+ import { Resources } from "../../resources.js";
10
+ export class PrimaryKey {
11
+ columns;
12
+ constructor(columns) {
13
+ if (columns.length === 0)
14
+ throw new ArgumentException(Resources.keyWithoutColumns, Resources.columnsParameterName);
15
+ this.columns = [...columns];
16
+ }
17
+ }
18
+ //# sourceMappingURL=primary-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primary-key.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/schema/primary-key.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,UAAU;IACL,OAAO,CAAoB;IAE3C,YAAmB,OAA0B;QAC3C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YACtB,MAAM,IAAI,iBAAiB,CAAC,SAAS,CAAC,iBAAiB,EAAE,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAE3F,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ArgumentException } from "@noldova/context.exceptions";
9
+ import { Resources } from "../../resources.js";
10
+ export class Table {
11
+ name;
12
+ columns;
13
+ primaryKey;
14
+ foreignKeys;
15
+ constructor(name, columns, primaryKey, foreignKeys) {
16
+ ArgumentException.throwIfNullOrWhitespace(name, Resources.nameParameterName);
17
+ if (columns.length === 0)
18
+ throw new ArgumentException(Resources.formatTableWithoutColumns(name), Resources.columnsParameterName);
19
+ this.name = name;
20
+ this.columns = [...columns];
21
+ this.primaryKey = primaryKey;
22
+ this.foreignKeys = [...foreignKeys];
23
+ }
24
+ }
25
+ //# sourceMappingURL=table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../../src/data/noldova.context.data.sql/src/models/schema/table.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK/C,MAAM,OAAO,KAAK;IACA,IAAI,CAAS;IACb,OAAO,CAAoB;IAC3B,UAAU,CAAoB;IAC9B,WAAW,CAAwB;IAEnD,YAAmB,IAAY,EAAE,OAA0B,EAAE,UAA6B,EAAE,WAAkC;QAC5H,iBAAiB,CAAC,uBAAuB,CAAC,IAAI,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAC7E,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YACtB,MAAM,IAAI,iBAAiB,CAAC,SAAS,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAEzG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC;IACtC,CAAC;CACF"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Connection } from "@noldova/context.data";
9
+ import { SqlQuery } from "./sql-query.js";
10
+ import { SqlTransaction } from "./sql-transaction.js";
11
+ export class SqlConnection extends Connection {
12
+ session;
13
+ constructor(dataSource, session) {
14
+ super(dataSource);
15
+ this.session = session;
16
+ }
17
+ get isOpen() {
18
+ return this.session.isOpen;
19
+ }
20
+ async executeAsync(query) {
21
+ return this.runExclusiveAsync(async () => {
22
+ this.throwIfClosed();
23
+ return this.session.executeAsync(query);
24
+ });
25
+ }
26
+ async insertAsync(query) {
27
+ return this.runExclusiveAsync(async () => {
28
+ this.throwIfClosed();
29
+ return this.session.insertAsync(query);
30
+ });
31
+ }
32
+ async queryAsync(query) {
33
+ return this.runExclusiveAsync(async () => {
34
+ this.throwIfClosed();
35
+ return this.session.queryAsync(query);
36
+ });
37
+ }
38
+ async beginTransactionCoreAsync() {
39
+ await this.session.executeAsync(new SqlQuery(this.dialect.formatBeginTransaction()));
40
+ return new SqlTransaction(this.session);
41
+ }
42
+ async closeCoreAsync() {
43
+ await this.session.closeAsync();
44
+ }
45
+ }
46
+ //# sourceMappingURL=sql-connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-connection.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql/src/models/sql-connection.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAoC,MAAM,uBAAuB,CAAC;AAErF,OAAO,EAAE,QAAQ,EAAE,MAAM,g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AC1C,CAAC;IAEkB,KAAK,CAAC,cAAc;QACrC,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Migration } from "@noldova/context.data";
9
+ export class SqlMigration extends Migration {
10
+ constructor(id) {
11
+ super(id);
12
+ }
13
+ }
14
+ //# sourceMappingURL=sql-migration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-migration.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql/src/models/sql-migration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIlD,MAAM,OAAgB,YAAa,SAAQ,SAAS;IAClD,YAAsB,EAAU;QAC9B,KAAK,CAAC,EAAE,CAAC,CAAC;IACZ,CAAC;CAGF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ArgumentException } from "@noldova/context.exceptions";
9
+ import { Resources } from "../resources.js";
10
+ export class SqlQuery {
11
+ text;
12
+ parameters;
13
+ constructor(text, parameters = []) {
14
+ ArgumentException.throwIfNullOrWhitespace(text, Resources.textParameterName);
15
+ this.text = text;
16
+ this.parameters = [...parameters];
17
+ }
18
+ toString() {
19
+ return this.text;
20
+ }
21
+ }
22
+ //# sourceMappingURL=sql-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-query.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql/src/models/sql-query.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,QAAQ;IACH,IAAI,CAAS;IACb,UAAU,CAAuB;IAEjD,YAAmB,IAAY,EAAE,UAAU,GAAyB,EAAE;QACpE,iBAAiB,CAAC,uBAAuB,CAAC,IAAI,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAE7E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC;IACpC,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class SqlSession {
9
+ }
10
+ //# sourceMappingURL=sql-session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-session.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql/src/models/sql-session.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAgB,UAAU;CAU/B"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Transaction } from "@noldova/context.data";
9
+ import { SqlQuery } from "./sql-query.js";
10
+ import { Resources } from "../resources.js";
11
+ export class SqlTransaction extends Transaction {
12
+ session;
13
+ constructor(session) {
14
+ super();
15
+ this.session = session;
16
+ }
17
+ async executeAsync(query) {
18
+ this.throwIfCompleted();
19
+ return this.session.executeAsync(query);
20
+ }
21
+ async insertAsync(query) {
22
+ this.throwIfCompleted();
23
+ return this.session.insertAsync(query);
24
+ }
25
+ async queryAsync(query) {
26
+ this.throwIfCompleted();
27
+ return this.session.queryAsync(query);
28
+ }
29
+ async commitCoreAsync() {
30
+ await this.session.executeAsync(new SqlQuery(Resources.commitTransaction));
31
+ }
32
+ async rollbackCoreAsync() {
33
+ await this.session.executeAsync(new SqlQuery(Resources.rollbackTransaction));
34
+ }
35
+ }
36
+ //# sourceMappingURL=sql-transaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-transaction.js","sourceRoot":"","sources":["../../../../src/data/noldova.context.data.sql/src/models/sql-transaction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAmB,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC5B,OAAO,CAAa;IAErC,YAAmB,OAAmB;QACpC,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,KAAe;QACvC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,KAAe;QACtC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,KAAe;QACrC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAEkB,KAAK,CAAC,eAAe;QACtC,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC7E,CAAC;IAEkB,KAAK,CAAC,iBAAiB;QACxC,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC/E,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,27 @@
1
1
  {
2
2
  "name": "@noldova/context.data.sql",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.7",
4
+ "type": "module",
5
+ "main": "api/index.js",
6
+ "types": "api/index.d.ts",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/noldova-com/context.git",
11
+ "directory": "src/data/noldova.context.data.sql"
12
+ },
13
+ "homepage": "https://github.com/noldova-com/context#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/noldova-com/context/issues"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public",
19
+ "registry": "https://registry.npmjs.org/"
20
+ },
21
+ "dependencies": {
22
+ "@noldova/context.core": "0.0.7",
23
+ "@noldova/context.data": "0.0.7",
24
+ "@noldova/context.exceptions": "0.0.7"
25
+ },
26
+ "gitHead": "e9d41328166262bf33aa8c896abc82092ebdfffc"
27
+ }
package/resources.js ADDED
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class Resources {
9
+ static changesTable = "__changes";
10
+ static closeParenthesis = ")";
11
+ static columnParameterName = "column";
12
+ static columnsParameterName = "columns";
13
+ static commitTransaction = "COMMIT";
14
+ static createChangesIndex = "CREATE INDEX IF NOT EXISTS \"IX___changes_entity_entityId\" ON \"__changes\" (\"entity\", \"entityId\")";
15
+ static createdAtColumn = "createdAt";
16
+ static createIndex = "CREATE INDEX";
17
+ static createMigrationsTable = "CREATE TABLE IF NOT EXISTS \"__migrations\" (\"id\" TEXT PRIMARY KEY, \"appliedAt\" TEXT NOT NULL)";
18
+ static createTable = "CREATE TABLE";
19
+ static createUniqueIndex = "CREATE UNIQUE INDEX";
20
+ static entityColumn = "entity";
21
+ static entityIdColumn = "entityId";
22
+ static escapedIdentifierQuote = "\"\"";
23
+ static foreignKeyConstraint = "FOREIGN KEY";
24
+ static idColumn = "id";
25
+ static identifierQuote = "\"";
26
+ static indexNamePrefix = "IX";
27
+ static insertChange = "INSERT INTO \"__changes\" (\"entity\", \"entityId\", \"operation\", \"payload\", \"createdAt\") VALUES (?, ?, ?, ?, ?)";
28
+ static insertMigration = "INSERT INTO \"__migrations\" (\"id\", \"appliedAt\") VALUES (?, ?)";
29
+ static keyWithoutColumns = "A primary key names at least one column.";
30
+ static listSeparator = ", ";
31
+ static migrationsTable = "__migrations";
32
+ static nameParameterName = "name";
33
+ static nameSeparator = "_";
34
+ static notNullConstraint = "NOT NULL";
35
+ static onKeyword = "ON";
36
+ static openParenthesis = "(";
37
+ static operationColumn = "operation";
38
+ static payloadColumn = "payload";
39
+ static primaryKeyConstraint = "PRIMARY KEY";
40
+ static principalColumnParameterName = "principalColumn";
41
+ static principalTableParameterName = "principalTable";
42
+ static referencesConstraint = "REFERENCES";
43
+ static rollbackTransaction = "ROLLBACK";
44
+ static selectAppliedMigrations = "SELECT \"id\" FROM \"__migrations\" ORDER BY \"id\"";
45
+ static selectChangesAfter = "SELECT \"sequence\", \"entity\", \"entityId\", \"operation\", \"payload\", \"createdAt\" FROM \"__changes\" WHERE \"sequence\" > ? ORDER BY \"sequence\" LIMIT ?";
46
+ static sequenceColumn = "sequence";
47
+ static textParameterName = "text";
48
+ static statementParameterName = "statement";
49
+ static unknownOperation = "The change holds an operation the feed does not know.";
50
+ static wordSeparator = " ";
51
+ static formatCreateChangesTable(identityColumnType) {
52
+ return `CREATE TABLE IF NOT EXISTS "__changes" ("sequence" ${identityColumnType}, "entity" TEXT NOT NULL, "entityId" TEXT NOT NULL, "operation" TEXT NOT NULL, "payload" TEXT NOT NULL, "createdAt" TEXT NOT NULL)`;
53
+ }
54
+ static formatTableWithoutColumns(table) {
55
+ return `The table "${table}" defines no columns.`;
56
+ }
57
+ }
58
+ //# sourceMappingURL=resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../src/data/noldova.context.data.sql/src/resources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,SAAS;IACb,MAAM,CAAU,YAAY,GAAW,WAAW,CAAC;IACnD,MAAM,CAAU,gBAAgB,GAAW,GAAG,CAAC;IAC/C,MAAM,CAAU,mBAAmB,GAAW,QAAQ,CAAC;IACvD,MAAM,CAAU,oBAAoB,GAAW,SAAS,CAAC;IACzD,MAAM,CAAU,iBAAiB,GAAW,QAAQ,CAAC;IACrD,MAAM,CAAU,kBAAkB,GAAW,yGAAyG,CAAC;IACvJ,MAAM,CAAU,eAAe,GAAW,WAAW,CAAC;IACtD,MAAM,CAAU,WAAW,GAAW,cAAc,CAAC;IACrD,MAAM,CAAU,qBAAqB,GAAW,oGAAoG,CAAC;IACrJ,MAAM,CAAU,WAAW,GAAW,cAAc,CAAC;IACrD,MAAM,CAAU,iBAAiB,GAAW,qBAAqB,CAAC;IAClE,MAAM,CAAU,YAAY,GAAW,QAAQ,CAAC;IAChD,MAAM,CAAU,cAAc,GAAW,UAAU,CAAC;IACpD,MAAM,CAAU,sBAAsB,GAAW,MAAM,CAAC;IACxD,MAAM,CAAU,oBAAoB,GAAW,aAAa,CAAC;IAC7D,MAAM,CAAU,QAAQ,GAAW,IAAI,CAAC;IACxC,MAAM,CAAU,eAAe,GAAW,IAAI,CAAC;IAC/C,MAAM,CAAU,eAAe,GAAW,IAAI,CAAC;IAC/C,MAAM,CAAU,YAAY,GAAW,wHAAwH,CAAC;IAChK,MAAM,CAAU,eAAe,GAAW,oEAAoE,CAAC;IAC/G,MAAM,CAAU,iBAAiB,GAAW,0CAA0C,CAAC;IACvF,MAAM,CAAU,aAAa,G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