godcrm/backend/services/monitoring/db-helpers.js
GOD CRM Release f89e074dd1
Some checks failed
CI / Lint / Typecheck / Test / Build (push) Has been cancelled
CI / PostgreSQL Integration Tests (push) Has been cancelled
GOD CRM — public scrubbed snapshot
Governed substrate for autonomous agents: scoped identity (passports),
audited actions, MCP workspace. Infra IPs and secrets redacted for public release.
2026-08-10 04:01:45 +03:00

24 lines
476 B
JavaScript

/**
* monitoring/db-helpers.js
* Database helpers and SQL compatibility layer for MonitoringService
*/
// SQL syntax helpers for PostgreSQL
export const SQL = {
autoIncrement: 'SERIAL PRIMARY KEY',
datetime: 'TIMESTAMP',
currentTimestamp: 'CURRENT_TIMESTAMP'
};
/**
* Safely parse JSON
*/
export function tryParseJSON(str) {
if (!str) return null;
if (typeof str !== 'string') return str;
try {
return JSON.parse(str);
} catch {
return str;
}
}