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` // first argument to `squirrel.Expr`
fn.hasQualifiedName(sq, "Expr") fn.hasQualifiedName(sq, "Expr")
or 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") | exists(string builder | builder.matches("%Builder") |
fn.(Method).hasQualifiedName(sq, builder, "Prefix") or fn.(Method)
fn.(Method).hasQualifiedName(sq, builder, "Suffix") or .hasQualifiedName(sq, builder,
fn.(Method).hasQualifiedName(sq, builder, "Where") or [
fn.(Method).hasQualifiedName(sq, builder, "Having") or "Prefix", "Column", "From", "JoinClause", "Join", "LeftJoin", "RightJoin",
fn.(Method).hasQualifiedName(sq, builder, "JoinClause") or "InnerJoin", "CrossJoin", "Where", "Having", "OrderByClause", "Suffix"
fn.(Method).hasQualifiedName(sq, builder, "OrderByClause") ])
) )
) and ) and
this = fn.getACall().getArgument(0) and this = fn.getACall().getArgument(0) and