This commit is contained in:
2025-11-13 06:52:52 +01:00
parent 57e67f5c51
commit d2fe98b4b8
7 changed files with 11 additions and 6 deletions
+1 -2
View File
@@ -33,8 +33,7 @@ function grabDbNames(params) {
throw new Error(`No Db Name Provided!`);
const dbFullName = (0, grab_db_full_name_1.default)({
dbName: dbSlug,
user: params === null || params === void 0 ? void 0 : params.user,
userId: params === null || params === void 0 ? void 0 : params.userId,
userId: finalUserId,
});
if (!dbFullName)
throw new Error(`Couldn't grab DB full name!`);
@@ -14,6 +14,7 @@ function grabDSQLConnectionConfig(param) {
const dbNames = (param === null || param === void 0 ? void 0 : param.noDb)
? undefined
: (0, grab_db_names_1.default)({ dbName: param === null || param === void 0 ? void 0 : param.database });
console.log("dbNames", dbNames);
const config = Object.assign({ host: process.env.DSQL_DB_HOST, user: process.env.DSQL_DB_USERNAME, password: process.env.DSQL_DB_PASSWORD, database: dbNames === null || dbNames === void 0 ? void 0 : dbNames.dbFullName, port: process.env.DSQL_DB_PORT
? Number(process.env.DSQL_DB_PORT)
: undefined, charset: "utf8mb4", ssl: (0, grabDbSSL_1.default)(), bigIntAsNumber: true, supportBigNumbers: true, bigNumberStrings: false, dateStrings: true, metaAsArray: true, socketTimeout: CONN_TIMEOUT, connectTimeout: CONN_TIMEOUT, compress: true }, param === null || param === void 0 ? void 0 : param.config);
+1
View File
@@ -21,6 +21,7 @@ const grab_dsql_connection_config_1 = __importDefault(require("./grab-dsql-conne
function grabDSQLConnection(param) {
return __awaiter(this, void 0, void 0, function* () {
const config = (0, grab_dsql_connection_config_1.default)(param);
console.log("config", config);
try {
return yield mariadb_1.default.createConnection(config);
}