Function
makeCompiler
(transform?: (_: string) => string)
Source from the content-addressed store, hash-verified
| 305 | * @since 1.0.0 |
| 306 | */ |
| 307 | export 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 | |
| 326 | const escape = Statement.defaultEscape("`") |
| 327 | |
Tested by
no test coverage detected