Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit d3a9540

Browse files
Add Join aliases as well, query format
1 parent 141e9c6 commit d3a9540

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

ql/lib/semmle/go/frameworks/SQL.qll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ module SQL {
8888
// first argument to `squirrel.Expr`
8989
fn.hasQualifiedName(sq, "Expr")
9090
or
91-
// first argument to the `Prefix`, `Suffix` or `Where` method of one of the `*Builder` classes
91+
// first argument `pred`, `sql`, `from` to most methods of one of the `*Builder` classes
9292
exists(string builder | builder.matches("%Builder") |
93-
fn.(Method).hasQualifiedName(sq, builder, "Prefix") or
94-
fn.(Method).hasQualifiedName(sq, builder, "Suffix") or
95-
fn.(Method).hasQualifiedName(sq, builder, "Where") or
96-
fn.(Method).hasQualifiedName(sq, builder, "Having") or
97-
fn.(Method).hasQualifiedName(sq, builder, "JoinClause") or
98-
fn.(Method).hasQualifiedName(sq, builder, "OrderByClause")
93+
fn.(Method)
94+
.hasQualifiedName(sq, builder,
95+
[
96+
"Prefix", "Column", "From", "JoinClause", "Join", "LeftJoin", "RightJoin",
97+
"InnerJoin", "CrossJoin", "Where", "Having", "OrderByClause", "Suffix"
98+
])
9999
)
100100
) and
101101
this = fn.getACall().getArgument(0) and

0 commit comments

Comments
 (0)