MCPcopy Index your code
hub / github.com/Effect-TS/effect / makeCompiler

Function makeCompiler

packages/sql-clickhouse/src/ClickhouseClient.ts:387–404  ·  view source on GitHub ↗
(transform?: (_: string) => string)

Source from the content-addressed store, hash-verified

385 * @since 1.0.0
386 */
387export const makeCompiler = (transform?: (_: string) => string) =>
388 Statement.makeCompiler<ClickhouseCustom>({
389 dialect: "sqlite",
390 placeholder(i, u) {
391 return `{p${i}: ${typeFromUnknown(u)}}`
392 },
393 onIdentifier: transform ?
394 function(value, withoutTransform) {
395 return withoutTransform ? escape(value) : escape(transform(value))
396 } :
397 escape,
398 onRecordUpdate() {
399 return ["", []]
400 },
401 onCustom(type, placeholder) {
402 return [placeholder(type), [type.i1]]
403 }
404 })
405
406// compiler helpers
407

Callers 1

makeFunction · 0.70

Calls 2

escapeFunction · 0.50
transformInterface · 0.50

Tested by

no test coverage detected