UNPKG

@clickup/ent-framework

Version:

A PostgreSQL graph-database-alike library with microsharding and row-level security

14 lines 532 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.escapeString = escapeString; /** * Escapes a string as PG string literal. */ function escapeString(v) { return v === null || v === undefined ? "NULL" : // Postgres doesn't like ASCII NUL character (error message is "unterminated // quoted string" or "invalid message format"), so we remove it too. "'" + ("" + v).replace(/\0/g, "").replace(/'/g, "''") + "'"; } //# sourceMappingURL=escapeString.js.map