@relq/orm 0.1.4 → 0.1.6

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.
@@ -21141,4 +21141,3 @@ __export(exports_mysql2, {
21141
21141
  });
21142
21142
  module.exports = __toCommonJS(exports_mysql2);
21143
21143
  __reExport(exports_mysql2, __toESM(require_promise(), 1), module.exports);
21144
- var import_promise = __toESM(require_promise(), 1);
@@ -4943,7 +4943,7 @@ __export(exports_pg, {
4943
4943
  escapeLiteral: () => escapeLiteral,
4944
4944
  escapeIdentifier: () => escapeIdentifier,
4945
4945
  defaults: () => defaults,
4946
- default: () => esm_default,
4946
+ default: () => import_pg.default,
4947
4947
  TypeOverrides: () => TypeOverrides,
4948
4948
  Result: () => Result,
4949
4949
  Query: () => Query,
@@ -4967,4 +4967,3 @@ var escapeLiteral = import_lib.default.escapeLiteral;
4967
4967
  var Result = import_lib.default.Result;
4968
4968
  var TypeOverrides = import_lib.default.TypeOverrides;
4969
4969
  var defaults = import_lib.default.defaults;
4970
- var esm_default = import_lib.default;
@@ -1,83 +1,74 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RelqBase = exports.RelqTimescale = exports.RelqCitus = exports.RelqYugabyteDB = exports.RelqAurora = exports.RelqAlloyDB = exports.RelqNeon = exports.RelqSupabase = exports.RelqCockroachDB = exports.RelqDsql = exports.RelqNile = exports.RelqPostgres = exports.Relq = void 0;
4
- const pg_client_1 = require("../pg/clients/pg-client/index.cjs");
5
- const nile_client_1 = require("../pg/clients/nile-client/index.cjs");
6
- const dsql_client_1 = require("../pg/clients/dsql-client/index.cjs");
7
- const cockroachdb_client_1 = require("../pg/clients/cockroachdb-client/index.cjs");
8
- const supabase_client_1 = require("../pg/clients/supabase-client/index.cjs");
9
- const neon_client_1 = require("../pg/clients/neon-client/index.cjs");
10
- const alloydb_client_1 = require("../pg/clients/alloydb-client/index.cjs");
11
- const aurora_client_1 = require("../pg/clients/aurora-client/index.cjs");
12
- const yugabytedb_client_1 = require("../pg/clients/yugabytedb-client/index.cjs");
13
- const citus_client_1 = require("../pg/clients/citus-client/index.cjs");
14
- const timescale_client_1 = require("../pg/clients/timescale-client/index.cjs");
15
- const mysql_client_1 = require("../mysql/clients/mysql-client/index.cjs");
16
- const mariadb_client_1 = require("../mysql/clients/mariadb-client/index.cjs");
17
- const planetscale_client_1 = require("../mysql/clients/planetscale-client/index.cjs");
3
+ exports.RelqBase = exports.Relq = void 0;
18
4
  const relq_errors_1 = require("../shared/errors/relq-errors.cjs");
19
5
  const SUPPORTED_DIALECTS = 'postgres, nile, cockroachdb, awsdsql, supabase, neon, alloydb, aurora, yugabytedb, citus, timescale, mysql, mariadb, planetscale';
20
6
  class RelqImpl {
21
7
  constructor(schema, dialect, options) {
22
8
  const opts = options ?? {};
23
9
  switch (dialect) {
24
- case 'postgres':
25
- return new pg_client_1.RelqPostgres(schema, { ...opts, dialect: 'postgres' });
26
- case 'nile':
27
- return new nile_client_1.RelqNile(schema, { ...opts, dialect: 'nile' });
28
- case 'cockroachdb':
29
- return new cockroachdb_client_1.RelqCockroachDB(schema, { ...opts, dialect: 'cockroachdb' });
30
- case 'awsdsql':
31
- return new dsql_client_1.RelqDsql(schema, { ...opts, dialect: 'awsdsql' });
32
- case 'supabase':
33
- return new supabase_client_1.RelqSupabase(schema, { ...opts, dialect: 'supabase' });
34
- case 'neon':
35
- return new neon_client_1.RelqNeon(schema, { ...opts, dialect: 'neon' });
36
- case 'alloydb':
37
- return new alloydb_client_1.RelqAlloyDB(schema, { ...opts, dialect: 'alloydb' });
38
- case 'aurora':
39
- return new aurora_client_1.RelqAurora(schema, { ...opts, dialect: 'aurora' });
40
- case 'yugabytedb':
41
- return new yugabytedb_client_1.RelqYugabyteDB(schema, { ...opts, dialect: 'yugabytedb' });
42
- case 'citus':
43
- return new citus_client_1.RelqCitus(schema, { ...opts, dialect: 'citus' });
44
- case 'timescale':
45
- return new timescale_client_1.RelqTimescale(schema, { ...opts, dialect: 'timescale' });
46
- case 'mysql':
47
- return new mysql_client_1.RelqMysql(schema, { ...opts, dialect: 'mysql' });
48
- case 'mariadb':
49
- return new mariadb_client_1.RelqMariaDB(schema, { ...opts, dialect: 'mariadb' });
50
- case 'planetscale':
51
- return new planetscale_client_1.RelqPlanetScale(schema, { ...opts, dialect: 'planetscale' });
10
+ case 'postgres': {
11
+ const { RelqPostgres } = require("../pg/clients/pg-client/index.cjs");
12
+ return new RelqPostgres(schema, { ...opts, dialect: 'postgres' });
13
+ }
14
+ case 'nile': {
15
+ const { RelqNile } = require("../pg/clients/nile-client/index.cjs");
16
+ return new RelqNile(schema, { ...opts, dialect: 'nile' });
17
+ }
18
+ case 'cockroachdb': {
19
+ const { RelqCockroachDB } = require("../pg/clients/cockroachdb-client/index.cjs");
20
+ return new RelqCockroachDB(schema, { ...opts, dialect: 'cockroachdb' });
21
+ }
22
+ case 'awsdsql': {
23
+ const { RelqDsql } = require("../pg/clients/dsql-client/index.cjs");
24
+ return new RelqDsql(schema, { ...opts, dialect: 'awsdsql' });
25
+ }
26
+ case 'supabase': {
27
+ const { RelqSupabase } = require("../pg/clients/supabase-client/index.cjs");
28
+ return new RelqSupabase(schema, { ...opts, dialect: 'supabase' });
29
+ }
30
+ case 'neon': {
31
+ const { RelqNeon } = require("../pg/clients/neon-client/index.cjs");
32
+ return new RelqNeon(schema, { ...opts, dialect: 'neon' });
33
+ }
34
+ case 'alloydb': {
35
+ const { RelqAlloyDB } = require("../pg/clients/alloydb-client/index.cjs");
36
+ return new RelqAlloyDB(schema, { ...opts, dialect: 'alloydb' });
37
+ }
38
+ case 'aurora': {
39
+ const { RelqAurora } = require("../pg/clients/aurora-client/index.cjs");
40
+ return new RelqAurora(schema, { ...opts, dialect: 'aurora' });
41
+ }
42
+ case 'yugabytedb': {
43
+ const { RelqYugabyteDB } = require("../pg/clients/yugabytedb-client/index.cjs");
44
+ return new RelqYugabyteDB(schema, { ...opts, dialect: 'yugabytedb' });
45
+ }
46
+ case 'citus': {
47
+ const { RelqCitus } = require("../pg/clients/citus-client/index.cjs");
48
+ return new RelqCitus(schema, { ...opts, dialect: 'citus' });
49
+ }
50
+ case 'timescale': {
51
+ const { RelqTimescale } = require("../pg/clients/timescale-client/index.cjs");
52
+ return new RelqTimescale(schema, { ...opts, dialect: 'timescale' });
53
+ }
54
+ case 'mysql': {
55
+ const { RelqMysql } = require("../mysql/clients/mysql-client/index.cjs");
56
+ return new RelqMysql(schema, { ...opts, dialect: 'mysql' });
57
+ }
58
+ case 'mariadb': {
59
+ const { RelqMariaDB } = require("../mysql/clients/mariadb-client/index.cjs");
60
+ return new RelqMariaDB(schema, { ...opts, dialect: 'mariadb' });
61
+ }
62
+ case 'planetscale': {
63
+ const { RelqPlanetScale } = require("../mysql/clients/planetscale-client/index.cjs");
64
+ return new RelqPlanetScale(schema, { ...opts, dialect: 'planetscale' });
65
+ }
52
66
  default:
53
- throw new relq_errors_1.RelqConfigError(`Unknown dialect: "${dialect}". ` +
54
- `Supported dialects: ${SUPPORTED_DIALECTS}, mysql, mariadb, planetscale`, { field: 'dialect', value: dialect });
67
+ throw new relq_errors_1.RelqConfigError(`Unknown dialect: "${dialect}". Supported: ${SUPPORTED_DIALECTS}`, { field: 'dialect', value: dialect });
55
68
  }
56
69
  }
57
70
  }
58
71
  exports.Relq = RelqImpl;
59
- var pg_client_2 = require("../pg/clients/pg-client/index.cjs");
60
- Object.defineProperty(exports, "RelqPostgres", { enumerable: true, get: function () { return pg_client_2.RelqPostgres; } });
61
- var nile_client_2 = require("../pg/clients/nile-client/index.cjs");
62
- Object.defineProperty(exports, "RelqNile", { enumerable: true, get: function () { return nile_client_2.RelqNile; } });
63
- var dsql_client_2 = require("../pg/clients/dsql-client/index.cjs");
64
- Object.defineProperty(exports, "RelqDsql", { enumerable: true, get: function () { return dsql_client_2.RelqDsql; } });
65
- var cockroachdb_client_2 = require("../pg/clients/cockroachdb-client/index.cjs");
66
- Object.defineProperty(exports, "RelqCockroachDB", { enumerable: true, get: function () { return cockroachdb_client_2.RelqCockroachDB; } });
67
- var supabase_client_2 = require("../pg/clients/supabase-client/index.cjs");
68
- Object.defineProperty(exports, "RelqSupabase", { enumerable: true, get: function () { return supabase_client_2.RelqSupabase; } });
69
- var neon_client_2 = require("../pg/clients/neon-client/index.cjs");
70
- Object.defineProperty(exports, "RelqNeon", { enumerable: true, get: function () { return neon_client_2.RelqNeon; } });
71
- var alloydb_client_2 = require("../pg/clients/alloydb-client/index.cjs");
72
- Object.defineProperty(exports, "RelqAlloyDB", { enumerable: true, get: function () { return alloydb_client_2.RelqAlloyDB; } });
73
- var aurora_client_2 = require("../pg/clients/aurora-client/index.cjs");
74
- Object.defineProperty(exports, "RelqAurora", { enumerable: true, get: function () { return aurora_client_2.RelqAurora; } });
75
- var yugabytedb_client_2 = require("../pg/clients/yugabytedb-client/index.cjs");
76
- Object.defineProperty(exports, "RelqYugabyteDB", { enumerable: true, get: function () { return yugabytedb_client_2.RelqYugabyteDB; } });
77
- var citus_client_2 = require("../pg/clients/citus-client/index.cjs");
78
- Object.defineProperty(exports, "RelqCitus", { enumerable: true, get: function () { return citus_client_2.RelqCitus; } });
79
- var timescale_client_2 = require("../pg/clients/timescale-client/index.cjs");
80
- Object.defineProperty(exports, "RelqTimescale", { enumerable: true, get: function () { return timescale_client_2.RelqTimescale; } });
81
72
  var relq_base_1 = require("./relq-base.cjs");
82
73
  Object.defineProperty(exports, "RelqBase", { enumerable: true, get: function () { return relq_base_1.RelqBase; } });
83
74
  exports.default = exports.Relq;