Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add
expr
helper to allow custom expressions in EM API
Allows to get around strict `FilterQuery` typing when we need to use some SQL functions or expressions. ```ts em.find(Book2, { [expr('upper(title)')]: ['B1', 'B2'] }); // no TS errors ``` Related: #802
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,3 +199,5 @@ export class QueryHelper { | |
} | ||
|
||
} | ||
|
||
export const expr = (sql: string) => sql; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters