Add Join aliases as well, query format

This commit is contained in:
Luke Young 2022-02-07 11:07:29 -08:00
Родитель 141e9c69c9
Коммит d3a9540f80
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -88,14 +88,14 @@ module SQL {
// first argument to `squirrel.Expr`
fn.hasQualifiedName(sq, "Expr")
or
// first argument to the `Prefix`, `Suffix` or `Where` method of one of the `*Builder` classes
// first argument `pred`, `sql`, `from` to most methods of one of the `*Builder` classes
exists(string builder | builder.matches("%Builder") |
fn.(Method).hasQualifiedName(sq, builder, "Prefix") or
fn.(Method).hasQualifiedName(sq, builder, "Suffix") or
fn.(Method).hasQualifiedName(sq, builder, "Where") or
fn.(Method).hasQualifiedName(sq, builder, "Having") or
fn.(Method).hasQualifiedName(sq, builder, "JoinClause") or
fn.(Method).hasQualifiedName(sq, builder, "OrderByClause")
fn.(Method)
.hasQualifiedName(sq, builder,
[
"Prefix", "Column", "From", "JoinClause", "Join", "LeftJoin", "RightJoin",
"InnerJoin", "CrossJoin", "Where", "Having", "OrderByClause", "Suffix"
])
)
) and
this = fn.getACall().getArgument(0) and