⭐️ If you like MikroORM, give it a star on GitHub and consider sponsoring its development! ⭐️
This is documentation for version 5.9. For the latest API, see version 6.3.
Version: 5.9
expr
Callable
expr<T>(sql: (keyof T & string) | (keyof T & string)[] | (alias: string) => string): string
Helper for escaping string types, e.g. keyof T -> string.
We can also pass array of strings to allow tuple comparison in SQL drivers.
Another alternative is to use callback signature, which will give us the current alias in its parameter.
Type parameters
T = unknown
Parameters
sql: (keyof T & string) | (keyof T & string)[] | (alias: string) => string
Helper for escaping string types, e.g.
keyof T -> string
. We can also pass array of strings to allow tuple comparison in SQL drivers. Another alternative is to use callback signature, which will give us the current alias in its parameter.