MCPcopy Create free account
hub / github.com/TanStack/db / quoteIdentifier

Function quoteIdentifier

packages/powersync-db-collection/src/sqlite-compiler.ts:73–77  ·  view source on GitHub ↗

* Quote SQLite identifiers to handle column names correctly. * SQLite uses double quotes for identifiers.

(name: string)

Source from the content-addressed store, hash-verified

71 * SQLite uses double quotes for identifiers.
72 */
73function quoteIdentifier(name: string): string {
74 // Escape any double quotes in the name by doubling them
75 const escaped = name.replace(/"/g, `""`)
76 return `"${escaped}"`
77}
78
79/**
80 * Compiles a BasicExpression to a SQL string, mutating the params array.

Callers 1

compileExpressionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected