Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(QueryBuilder): Support alias renaming using
withAlias
The `withAlias` function will attempt to rename any currently aliased columns to the new alias in `columns`, `wheres`, `joins`, `groupBys`, and `orders`. This means if you currently have an aliased table like `users AS "u"` and an aliased column like `"u.name"`, when you call `qb.withAlias( "u2" )` not only will the table be aliased correctly, but the column will be aliased correctly as well: `SELECT "u2"."name" FROM "users" AS "u2"`. Any unaliased columns will be left as-is.
- Loading branch information
Showing
3 changed files
with
451 additions
and
3 deletions.
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
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
Oops, something went wrong.