forked from sqlancer/sqlancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHSQLDBErrors.java
More file actions
43 lines (30 loc) · 1.11 KB
/
HSQLDBErrors.java
File metadata and controls
43 lines (30 loc) · 1.11 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
40
41
42
43
package sqlancer.hsqldb;
import java.util.ArrayList;
import java.util.List;
import sqlancer.common.query.ExpectedErrors;
public final class HSQLDBErrors {
private HSQLDBErrors() {
}
public static List<String> getExpressionErrors() {
ArrayList<String> errors = new ArrayList<>();
errors.add("invalid datetime format");
errors.add("invalid character value for cast");
errors.add("invalid ORDER BY expression");
errors.add("data type of expression is not boolean");
errors.add("numeric value out of range");
errors.add("incompatible data types in combination");
errors.add("string data, right truncation");
return errors;
}
public static void addExpressionErrors(ExpectedErrors errors) {
errors.addAll(getExpressionErrors());
}
public static List<String> getInsertErrors() {
ArrayList<String> errors = new ArrayList<>();
errors.addAll(getExpressionErrors());
return errors;
}
public static void addInsertErrors(ExpectedErrors errors) {
errors.addAll(getInsertErrors());
}
}