MCPcopy
hub / github.com/drizzle-team/drizzle-orm / escapeSingleQuotes

Function escapeSingleQuotes

drizzle-kit/src/utils.ts:364–366  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

362}
363
364export function escapeSingleQuotes(str: string) {
365 return str.replace(/'/g, "''");
366}
367
368export function unescapeSingleQuotes(str: string, ignoreFirstAndLastChar: boolean) {
369 const regex = ignoreFirstAndLastChar ? /(?<!^)'(?!$)/g : /'/g;

Callers 8

convertMethod · 0.90
generateSqliteSnapshotFunction · 0.90
generatePgSnapshotFunction · 0.90
generateGelSnapshotFunction · 0.90
handleEnumTypeFunction · 0.90
generateMySqlSnapshotFunction · 0.90
clearDefaultsFunction · 0.90
fromDatabaseFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected