MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeCompilerSqlite

Function makeCompilerSqlite

packages/effect/src/sql/Statement.ts:1218–1235  ·  view source on GitHub ↗
(transform?: ((_: string) => string) | undefined)

Source from the content-addressed store, hash-verified

1216 * @since 4.0.0
1217 */
1218export const makeCompilerSqlite = (transform?: ((_: string) => string) | undefined): Compiler =>
1219 makeCompiler({
1220 dialect: "sqlite",
1221 placeholder(_) {
1222 return "?"
1223 },
1224 onIdentifier: transform ?
1225 function(value, withoutTransform) {
1226 return withoutTransform ? escapeSqlite(value) : escapeSqlite(transform(value))
1227 } :
1228 escapeSqlite,
1229 onRecordUpdate() {
1230 return ["", []]
1231 },
1232 onCustom() {
1233 return ["", []]
1234 }
1235 })
1236
1237/**
1238 * Creates an identifier escaping function that wraps names in the given

Callers

nothing calls this directly

Calls 2

makeCompilerFunction · 0.70
transformFunction · 0.50

Tested by

no test coverage detected