-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathCnosDBOtherQuery.java
More file actions
32 lines (27 loc) · 919 Bytes
/
CnosDBOtherQuery.java
File metadata and controls
32 lines (27 loc) · 919 Bytes
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
package sqlancer.cnosdb.query;
import sqlancer.GlobalState;
import sqlancer.IgnoreMeException;
import sqlancer.cnosdb.client.CnosDBConnection;
import sqlancer.common.query.ExpectedErrors;
public class CnosDBOtherQuery extends CnosDBQueryAdapter {
private static final long serialVersionUID = 1L;
public CnosDBOtherQuery(String query, ExpectedErrors errors) {
super(query, errors);
}
@Override
public boolean couldAffectSchema() {
return true;
}
@Override
public <G extends GlobalState<?, ?, CnosDBConnection>> boolean execute(G globalState, String... fills)
throws Exception {
try {
globalState.getConnection().getClient().execute(query);
} catch (Exception e) {
if (this.errors.errorIsExpected(e.getMessage())) {
throw new IgnoreMeException();
}
}
return true;
}
}