'use strict';
import { postgresql } from '../../../base-repo/app-constants/internal-system-constants.js';
import { tsBasicTypes } from '../../../base-repo/constants/basic-types.js';
import { dbTypes } from '../../../base-repo/constants/tools-constants.js';
import { first } from '../../../fd-toolbox/server/collections/single-funcs.js';
import { commonLowerCaseWords } from '../../../base-repo/constants/internal-common-strings.js';

var __defProp=Object['defineProperty'],__name=(_0x7a79cf,_0x868b28)=>__defProp(_0x7a79cf,'name',{'value':_0x868b28,'configurable':!![]});const drizzleDialects={'postgresql':postgresql,'sqlite':dbTypes['sqlite']};function getDrizzleDialectString(_0x47d044){const _0x474450=Object['entries'](drizzleDialects)['find'](([,_0x4cff83])=>_0x4cff83===_0x47d044);return _0x474450?first(_0x474450):tsBasicTypes['unknown'];}__name(getDrizzleDialectString,'getDrizzleDialectString');const dbErrorMessages={'migrationErrorWithCode':'Migration\x20command\x20failed\x20with\x20exit\x20code\x20{0}','migrationErrorWithMessage':'Migration\x20command\x20failed\x20with\x20message:\x20{0}','tableNotFound':'Table\x20with\x20name:\x20{0}\x20not\x20found','dbNotInitialized':'Database\x20not\x20initialized.\x20Call\x20initializeDb(schema)\x20first.','dbClientNotInitialized':'Database\x20client\x20not\x20initialized.\x20Call\x20initializeDb(schema)\x20first.','drizzleUnexpectedObject':'Drizzle\x20returned\x20unexpected\x20query\x20object','invalidObject':'Invalid\x20query\x20object:\x20config\x20definition\x20is\x20missing','dbConnectionStringNotProvided':'Database\x20connection\x20string\x20is\x20not\x20provided.\x20Cannot\x20perform\x20DB\x20operations.'};const dbTransactions={'rollback':'ROLLBACK','beginTransaction':'BEGIN\x20TRANSACTION'};const dbPragmas={'enableForeignKeys':'PRAGMA\x20foreign_keys\x20=\x20ON;','disableForeignKeys':'PRAGMA\x20foreign_keys\x20=\x20OFF;'};function isSupportedDbType(_0xba9f5f){return Object['values'](dbTypes)['some'](_0x56e781=>_0x56e781===_0xba9f5f);}__name(isSupportedDbType,'isSupportedDbType');const dbUrlSearchParams={'require':commonLowerCaseWords['require']};

export { dbErrorMessages, dbPragmas, dbTransactions, dbUrlSearchParams, drizzleDialects, getDrizzleDialectString, isSupportedDbType };
