@@ -111,7 +111,8 @@ module SQL {
111
111
exists ( Method meth , string base , string m , int n |
112
112
(
113
113
meth .hasQualifiedName ( "database/sql" , "DB" , m ) or
114
- meth .hasQualifiedName ( "database/sql" , "Tx" , m )
114
+ meth .hasQualifiedName ( "database/sql" , "Tx" , m ) or
115
+ meth .hasQualifiedName ( "database/sql" , "Conn" , m )
115
116
) and
116
117
this = meth .getACall ( ) .getArgument ( n )
117
118
|
@@ -125,6 +126,29 @@ module SQL {
125
126
}
126
127
}
127
128
129
+ /** A query string used in an API function of the standard `database/sql/driver` package. */
130
+ private class DriverQueryString extends Range {
131
+ DriverQueryString ( ) {
132
+ exists ( Method meth , int n |
133
+ (
134
+ meth .hasQualifiedName ( "database/sql/driver" , "Execer" , "Exec" ) and n = 0
135
+ or
136
+ meth .hasQualifiedName ( "database/sql/driver" , "ExecerContext" , "ExecContext" ) and n = 1
137
+ or
138
+ meth .hasQualifiedName ( "database/sql/driver" , "Conn" , "Prepare" ) and n = 0
139
+ or
140
+ meth .hasQualifiedName ( "database/sql/driver" , "ConnPrepareContext" , "PrepareContext" ) and
141
+ n = 1
142
+ or
143
+ meth .hasQualifiedName ( "database/sql/driver" , "Queryer" , "Query" ) and n = 0
144
+ or
145
+ meth .hasQualifiedName ( "database/sql/driver" , "QueryerContext" , "QueryContext" ) and n = 1
146
+ ) and
147
+ this = meth .getACall ( ) .getArgument ( n )
148
+ )
149
+ }
150
+ }
151
+
128
152
/**
129
153
* An argument to an API of the squirrel library that is directly interpreted as SQL without
130
154
* taking syntactic structure into account.
0 commit comments