-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathCnosDBSelectQuery.java
More file actions
39 lines (32 loc) · 1.16 KB
/
CnosDBSelectQuery.java
File metadata and controls
39 lines (32 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package sqlancer.cnosdb.query;
import sqlancer.GlobalState;
import sqlancer.cnosdb.client.CnosDBConnection;
import sqlancer.cnosdb.client.CnosDBResultSet;
import sqlancer.common.query.ExpectedErrors;
import sqlancer.common.query.SQLancerResultSet;
public class CnosDBSelectQuery extends CnosDBQueryAdapter {
private static final long serialVersionUID = 1L;
CnosDBResultSet resultSet;
public CnosDBSelectQuery(String query, ExpectedErrors errors) {
super(query, errors);
}
@Override
public boolean couldAffectSchema() {
return false;
}
@Override
public <G extends GlobalState<?, ?, CnosDBConnection>> boolean execute(G globalState, String... fills)
throws Exception {
globalState.getConnection().getClient().execute(query);
return false;
}
@Override
public <G extends GlobalState<?, ?, CnosDBConnection>> SQLancerResultSet executeAndGet(G globalState,
String... fills) throws Exception {
resultSet = globalState.getConnection().getClient().executeQuery(query);
return null;
}
public CnosDBResultSet getResultSet() {
return resultSet;
}
}