@clickup/pg-microsharding
Version:
Microshards support for PostgreSQL
16 lines • 659 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.enableSubscription = enableSubscription;
const names_1 = require("./names");
const quote_1 = require("./quote");
const runSql_1 = require("./runSql");
/**
* Resumes the previously paused subscription.
*/
async function enableSubscription({ toDsn, tables, schema, }) {
if (tables.length === 0) {
return;
}
await (0, runSql_1.runSql)(toDsn, (0, quote_1.sql) `ALTER SUBSCRIPTION ${(0, quote_1.ident)((0, names_1.subName)(schema))} ENABLE`, "Resuming the destination subscription from the paused position");
}
//# sourceMappingURL=enableSubscription.js.map