@relq/orm 0.1.1 → 0.1.2
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/dist/cjs/core/helpers/PaginateBuilder.cjs +1 -1
- package/dist/cjs/core/helpers/select-joins.cjs +1 -1
- package/dist/cjs/core/helpers/select-pagination.cjs +1 -1
- package/dist/cjs/core/pg-family/nile-client/tenant-context.cjs +1 -1
- package/dist/cjs/core/pg-family/shared/pg-base.cjs +3 -3
- package/dist/cjs/core/pg-family/shared/pg-error-parser.cjs +1 -1
- package/dist/cjs/core/shared/errors.cjs +1 -1
- package/dist/cjs/core/shared/validation.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/core/helpers/PaginateBuilder.js +1 -1
- package/dist/esm/core/helpers/select-joins.js +1 -1
- package/dist/esm/core/helpers/select-pagination.js +1 -1
- package/dist/esm/core/pg-family/nile-client/tenant-context.js +1 -1
- package/dist/esm/core/pg-family/shared/pg-base.js +3 -3
- package/dist/esm/core/pg-family/shared/pg-error-parser.js +1 -1
- package/dist/esm/core/shared/errors.js +1 -1
- package/dist/esm/core/shared/validation.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PaginateBuilder = void 0;
|
|
4
4
|
const count_builder_1 = require("../../count/count-builder.cjs");
|
|
5
|
-
const relq_errors_1 = require("
|
|
5
|
+
const relq_errors_1 = require("../../shared/errors/relq-errors.cjs");
|
|
6
6
|
const select_builder_1 = require("../../select/select-builder.cjs");
|
|
7
7
|
const methods_1 = require("./methods.cjs");
|
|
8
8
|
class PaginateBuilder {
|
|
@@ -7,7 +7,7 @@ const table_proxy_1 = require("../../select/table-proxy.cjs");
|
|
|
7
7
|
const join_condition_builder_1 = require("../../select/join-condition-builder.cjs");
|
|
8
8
|
const join_internals_1 = require("../../select/join-internals.cjs");
|
|
9
9
|
const join_many_condition_builder_1 = require("../../select/join-many-condition-builder.cjs");
|
|
10
|
-
const relq_errors_1 = require("
|
|
10
|
+
const relq_errors_1 = require("../../shared/errors/relq-errors.cjs");
|
|
11
11
|
const fk_resolver_1 = require("../../utils/fk-resolver.cjs");
|
|
12
12
|
const methods_1 = require("./methods.cjs");
|
|
13
13
|
function executeTypeSafeJoin(ctx, joinType, tableOrAlias, callback) {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.executeCursorEach = executeCursorEach;
|
|
7
7
|
exports.executePagination = executePagination;
|
|
8
8
|
const pg_cursor_1 = __importDefault(require("../../addon/cursor.cjs"));
|
|
9
|
-
const relq_errors_1 = require("
|
|
9
|
+
const relq_errors_1 = require("../../shared/errors/relq-errors.cjs");
|
|
10
10
|
const pagination_types_1 = require("../../types/pagination-types.cjs");
|
|
11
11
|
const methods_1 = require("./methods.cjs");
|
|
12
12
|
async function executeCursorEach(ctx, callback, options = {}) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TenantContext = void 0;
|
|
4
|
-
const relq_errors_1 = require("
|
|
4
|
+
const relq_errors_1 = require("../../../shared/errors/relq-errors.cjs");
|
|
5
5
|
function escapeTenantId(value) {
|
|
6
6
|
if (value.includes('\0')) {
|
|
7
7
|
throw new relq_errors_1.RelqConfigError('Tenant ID cannot contain null bytes', {
|
|
@@ -35,9 +35,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.PgBase = void 0;
|
|
37
37
|
exports.loadPg = loadPg;
|
|
38
|
-
const config_types_1 = require("
|
|
39
|
-
const aws_dsql_1 = require("
|
|
40
|
-
const relq_errors_1 = require("
|
|
38
|
+
const config_types_1 = require("../../../shared/types/config-types.cjs");
|
|
39
|
+
const aws_dsql_1 = require("../../../shared/aws-dsql.cjs");
|
|
40
|
+
const relq_errors_1 = require("../../../shared/errors/relq-errors.cjs");
|
|
41
41
|
const environment_detection_1 = require("../../../utils/environment-detection.cjs");
|
|
42
42
|
const pool_defaults_1 = require("../../../utils/pool-defaults.cjs");
|
|
43
43
|
const methods_1 = require("../../helpers/methods.cjs");
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PG_CONNECTION_ERROR_CODES = exports.PG_RECOVERABLE_ERROR_CODES = void 0;
|
|
4
4
|
exports.isPgConnectionError = isPgConnectionError;
|
|
5
5
|
exports.parsePgError = parsePgError;
|
|
6
|
-
const relq_errors_1 = require("
|
|
6
|
+
const relq_errors_1 = require("../../../shared/errors/relq-errors.cjs");
|
|
7
7
|
exports.PG_RECOVERABLE_ERROR_CODES = new Set([
|
|
8
8
|
'ETIMEDOUT',
|
|
9
9
|
'ECONNRESET',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RelqDialectError = void 0;
|
|
4
|
-
const relq_errors_1 = require("
|
|
4
|
+
const relq_errors_1 = require("../../shared/errors/relq-errors.cjs");
|
|
5
5
|
class RelqDialectError extends relq_errors_1.RelqConfigError {
|
|
6
6
|
dialect;
|
|
7
7
|
suggestion;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateData = validateData;
|
|
4
4
|
exports.validateComposite = validateComposite;
|
|
5
|
-
const relq_errors_1 = require("
|
|
5
|
+
const relq_errors_1 = require("../../shared/errors/relq-errors.cjs");
|
|
6
6
|
const methods_1 = require("../helpers/methods.cjs");
|
|
7
7
|
function validateData(tableName, data, operation, mappings, config) {
|
|
8
8
|
const validation = config?.validation;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -11,7 +11,7 @@ var dsql_client_1 = require("./core/pg-family/dsql-client/index.cjs");
|
|
|
11
11
|
Object.defineProperty(exports, "RelqDsql", { enumerable: true, get: function () { return dsql_client_1.RelqDsql; } });
|
|
12
12
|
var cockroachdb_client_1 = require("./core/pg-family/cockroachdb-client/index.cjs");
|
|
13
13
|
Object.defineProperty(exports, "RelqCockroachDB", { enumerable: true, get: function () { return cockroachdb_client_1.RelqCockroachDB; } });
|
|
14
|
-
var relq_errors_1 = require("
|
|
14
|
+
var relq_errors_1 = require("./shared/errors/relq-errors.cjs");
|
|
15
15
|
Object.defineProperty(exports, "RelqError", { enumerable: true, get: function () { return relq_errors_1.RelqError; } });
|
|
16
16
|
Object.defineProperty(exports, "RelqConnectionError", { enumerable: true, get: function () { return relq_errors_1.RelqConnectionError; } });
|
|
17
17
|
Object.defineProperty(exports, "RelqQueryError", { enumerable: true, get: function () { return relq_errors_1.RelqQueryError; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CountBuilder } from "../../count/count-builder.js";
|
|
2
|
-
import { RelqQueryError } from "
|
|
2
|
+
import { RelqQueryError } from "../../shared/errors/relq-errors.js";
|
|
3
3
|
import { SelectBuilder } from "../../select/select-builder.js";
|
|
4
4
|
import { INTERNAL } from "./methods.js";
|
|
5
5
|
export class PaginateBuilder {
|
|
@@ -2,7 +2,7 @@ import { createTableProxy } from "../../select/table-proxy.js";
|
|
|
2
2
|
import { JoinConditionBuilder } from "../../select/join-condition-builder.js";
|
|
3
3
|
import { JOIN_INTERNAL, JOIN_SETUP } from "../../select/join-internals.js";
|
|
4
4
|
import { JoinManyConditionBuilder } from "../../select/join-many-condition-builder.js";
|
|
5
|
-
import { RelqQueryError } from "
|
|
5
|
+
import { RelqQueryError } from "../../shared/errors/relq-errors.js";
|
|
6
6
|
import { resolveForeignKey } from "../../utils/fk-resolver.js";
|
|
7
7
|
import { INTERNAL } from "./methods.js";
|
|
8
8
|
export function executeTypeSafeJoin(ctx, joinType, tableOrAlias, callback) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Cursor from "../../addon/cursor.js";
|
|
2
|
-
import { RelqConfigError, RelqQueryError } from "
|
|
2
|
+
import { RelqConfigError, RelqQueryError } from "../../shared/errors/relq-errors.js";
|
|
3
3
|
import { randomLimit } from "../../types/pagination-types.js";
|
|
4
4
|
import { INTERNAL } from "./methods.js";
|
|
5
5
|
export async function executeCursorEach(ctx, callback, options = {}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RelqConfigError } from "
|
|
1
|
+
import { RelqConfigError } from "../../../shared/errors/relq-errors.js";
|
|
2
2
|
function escapeTenantId(value) {
|
|
3
3
|
if (value.includes('\0')) {
|
|
4
4
|
throw new RelqConfigError('Tenant ID cannot contain null bytes', {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { toPoolConfig, isAwsDsqlConfig } from "
|
|
2
|
-
import { getAwsDsqlToken } from "
|
|
3
|
-
import { RelqConfigError, RelqConnectionError, parsePostgresError } from "
|
|
1
|
+
import { toPoolConfig, isAwsDsqlConfig } from "../../../shared/types/config-types.js";
|
|
2
|
+
import { getAwsDsqlToken } from "../../../shared/aws-dsql.js";
|
|
3
|
+
import { RelqConfigError, RelqConnectionError, parsePostgresError } from "../../../shared/errors/relq-errors.js";
|
|
4
4
|
import { detectEnvironment } from "../../../utils/environment-detection.js";
|
|
5
5
|
import { validatePoolConfig, formatPoolConfig, getSmartPoolDefaults } from "../../../utils/pool-defaults.js";
|
|
6
6
|
import { debugLog } from "../../helpers/methods.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RelqQueryError } from "
|
|
1
|
+
import { RelqQueryError } from "../../shared/errors/relq-errors.js";
|
|
2
2
|
import { debugLog } from "../helpers/methods.js";
|
|
3
3
|
export function validateData(tableName, data, operation, mappings, config) {
|
|
4
4
|
const validation = config?.validation;
|
package/dist/esm/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export { RelqPostgres } from "./core/pg-family/pg-client/index.js";
|
|
|
3
3
|
export { RelqNile } from "./core/pg-family/nile-client/index.js";
|
|
4
4
|
export { RelqDsql } from "./core/pg-family/dsql-client/index.js";
|
|
5
5
|
export { RelqCockroachDB } from "./core/pg-family/cockroachdb-client/index.js";
|
|
6
|
-
export { RelqError, RelqConnectionError, RelqQueryError, RelqTransactionError, RelqConfigError, RelqTimeoutError, RelqPoolError, isRelqError, isRelqConnectionError, isRelqQueryError, } from "
|
|
6
|
+
export { RelqError, RelqConnectionError, RelqQueryError, RelqTransactionError, RelqConfigError, RelqTimeoutError, RelqPoolError, isRelqError, isRelqConnectionError, isRelqQueryError, } from "./shared/errors/relq-errors.js";
|
|
7
7
|
export { format as pg_format } from "./utils/index.js";
|
package/package.json
CHANGED