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

Function makeCompiler

packages/sql-mysql2/src/MysqlClient.ts:307–324  ·  view source on GitHub ↗
(transform?: (_: string) => string)

Source from the content-addressed store, hash-verified

305 * @since 1.0.0
306 */
307export const makeCompiler = (transform?: (_: string) => string) =>
308 Statement.makeCompiler({
309 dialect: "mysql",
310 placeholder(_) {
311 return `?`
312 },
313 onIdentifier: transform ?
314 function(value, withoutTransform) {
315 return withoutTransform ? escape(value) : escape(transform(value))
316 } :
317 escape,
318 onCustom() {
319 return ["", []]
320 },
321 onRecordUpdate() {
322 return ["", []]
323 }
324 })
325
326const escape = Statement.defaultEscape("`")
327

Callers 1

makeFunction · 0.70

Calls 2

escapeFunction · 0.50
transformInterface · 0.50

Tested by

no test coverage detected