Function
makeCompiler
(transform?: (_: string) => string)
Source from the content-addressed store, hash-verified
| 459 | * @since 4.0.0 |
| 460 | */ |
| 461 | export const makeCompiler = (transform?: (_: string) => string) => |
| 462 | Statement.makeCompiler({ |
| 463 | dialect: "mysql", |
| 464 | placeholder(_) { |
| 465 | return `?` |
| 466 | }, |
| 467 | onIdentifier: transform ? |
| 468 | function(value, withoutTransform) { |
| 469 | return withoutTransform ? escape(value) : escape(transform(value)) |
| 470 | } : |
| 471 | escape, |
| 472 | onCustom() { |
| 473 | return ["", []] |
| 474 | }, |
| 475 | onRecordUpdate() { |
| 476 | return ["", []] |
| 477 | } |
| 478 | }) |
| 479 | |
| 480 | const escape = Statement.defaultEscape("`") |
| 481 | |
Tested by
no test coverage detected