MCPcopy Create free account
hub / github.com/damms005/devdb-vscode / sanitizeIdentifier

Function sanitizeIdentifier

src/services/sql.ts:6–9  ·  view source on GitHub ↗
(identifier: string, openDelimiter: string, closeDelimiter: string)

Source from the content-addressed store, hash-verified

4import { SqliteEngine } from "../database-engines/sqlite-engine";
5
6export function sanitizeIdentifier(identifier: string, openDelimiter: string, closeDelimiter: string): string {
7 const escaped = identifier.replace(new RegExp(`\\${closeDelimiter}`, 'g'), `${closeDelimiter}${closeDelimiter}`);
8 return `${openDelimiter}${escaped}${closeDelimiter}`;
9}
10
11export const SqlService = {
12

Callers 2

commitChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected