mirror of
https://github.com/github/codeql.git
synced 2026-02-28 21:03:50 +01:00
Java: Add missing SQL query APIs.
* executeLargeUpdate * prepareCall
This commit is contained in:
@@ -34,6 +34,14 @@ class ConnectionPrepareStatement extends Method {
|
||||
}
|
||||
}
|
||||
|
||||
/** A method with the name `prepareCall` declared in `java.sql.Connection`. */
|
||||
class ConnectionPrepareCall extends Method {
|
||||
ConnectionPrepareCall() {
|
||||
getDeclaringType() instanceof TypeConnection and
|
||||
hasName("prepareCall")
|
||||
}
|
||||
}
|
||||
|
||||
/** A method with the name `executeQuery` declared in `java.sql.Statement`. */
|
||||
class StatementExecuteQuery extends Method {
|
||||
StatementExecuteQuery() {
|
||||
@@ -58,6 +66,14 @@ class MethodStatementExecuteUpdate extends Method {
|
||||
}
|
||||
}
|
||||
|
||||
/** A method with the name `executeLargeUpdate` declared in `java.sql.Statement`. */
|
||||
class MethodStatementExecuteLargeUpdate extends Method {
|
||||
MethodStatementExecuteLargeUpdate() {
|
||||
getDeclaringType() instanceof TypeStatement and
|
||||
hasName("executeLargeUpdate")
|
||||
}
|
||||
}
|
||||
|
||||
/** A method with the name `addBatch` declared in `java.sql.Statement`. */
|
||||
class MethodStatementAddBatch extends Method {
|
||||
MethodStatementAddBatch() {
|
||||
@@ -87,9 +103,11 @@ class SqlExpr extends Expr {
|
||||
method = call.getMethod() and
|
||||
(
|
||||
method instanceof ConnectionPrepareStatement or
|
||||
method instanceof ConnectionPrepareCall or
|
||||
method instanceof StatementExecuteQuery or
|
||||
method instanceof MethodStatementExecute or
|
||||
method instanceof MethodStatementExecuteUpdate or
|
||||
method instanceof MethodStatementExecuteLargeUpdate or
|
||||
method instanceof MethodStatementAddBatch
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user