Function
makeCompiler
(transform?: (_: string) => string)
Source from the content-addressed store, hash-verified
| 513 | * @since 4.0.0 |
| 514 | */ |
| 515 | export const makeCompiler = (transform?: (_: string) => string) => |
| 516 | Statement.makeCompiler({ |
| 517 | dialect: "mysql", |
| 518 | placeholder(_) { |
| 519 | return `?` |
| 520 | }, |
| 521 | onIdentifier: transform ? |
| 522 | function(value, withoutTransform) { |
| 523 | return withoutTransform ? escape(value) : escape(transform(value)) |
| 524 | } : |
| 525 | escape, |
| 526 | onCustom() { |
| 527 | return ["", []] |
| 528 | }, |
| 529 | onRecordUpdate() { |
| 530 | return ["", []] |
| 531 | } |
| 532 | }) |
| 533 | |
| 534 | const escape = Statement.defaultEscape("`") |
| 535 | |
Tested by
no test coverage detected