MCPcopy Create free account
hub / github.com/outerbase/studio / unescapeIdentity

Function unescapeIdentity

src/drivers/sqlite/sql-helper.ts:9–14  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

7}
8
9export function unescapeIdentity(str: string) {
10 let r = str.replace(/^["`[]/g, "");
11 r = r.replace(/["`\]]$/g, "");
12 r = r.replace(/""/g, `"`);
13 return r;
14}
15
16export function escapeSqlString(str: string) {
17 return `'${str.replace(/'/g, `''`)}'`;

Callers 3

consumeIdentifierMethod · 0.90
parseFTS5Function · 0.90
sql-helper.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected