UNPKG

@clickup/pg-microsharding

Version:
13 lines 538 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.factor = factor; const names_1 = require("../internal/names"); const quote_1 = require("../internal/quote"); const runSql_1 = require("../internal/runSql"); /** * Sets the weight factor for some shard schema. */ async function factor({ dsn, schema, factor, }) { await (0, runSql_1.runSql)(dsn, (0, quote_1.sql) `COMMENT ON SCHEMA ${(0, quote_1.ident)(schema)} IS ${(0, names_1.shardFactorToComment)(factor)}`); } //# sourceMappingURL=factor.js.map