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

Function makeCompilerSqlite

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

Source from the content-addressed store, hash-verified

1058 * @since 4.0.0
1059 */
1060export const makeCompilerSqlite = (transform?: ((_: string) => string) | undefined): Compiler =>
1061 makeCompiler({
1062 dialect: "sqlite",
1063 placeholder(_) {
1064 return "?"
1065 },
1066 onIdentifier: transform ?
1067 function(value, withoutTransform) {
1068 return withoutTransform ? escapeSqlite(value) : escapeSqlite(transform(value))
1069 } :
1070 escapeSqlite,
1071 onRecordUpdate() {
1072 return ["", []]
1073 },
1074 onCustom() {
1075 return ["", []]
1076 }
1077 })
1078
1079/**
1080 * 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