-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathQuestDBErrors.java
More file actions
56 lines (41 loc) · 1.53 KB
/
QuestDBErrors.java
File metadata and controls
56 lines (41 loc) · 1.53 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
44
45
46
47
48
49
50
51
52
53
54
55
56
package sqlancer.questdb;
import java.util.ArrayList;
import java.util.List;
import sqlancer.common.query.ExpectedErrors;
public final class QuestDBErrors {
private QuestDBErrors() {
}
public static List<String> getExpressionErrors() {
ArrayList<String> errors = new ArrayList<>();
// TODO (anxing)
errors.add("unexpected argument for function: ");
errors.add("unexpected token:"); // SELECT FROM multiple tables without WHERE/ JOIN clause
errors.add("boolean expression expected");
errors.add("Column name expected");
errors.add("too few arguments for 'in'");
errors.add("cannot compare TIMESTAMP with type"); // WHERE column IN with nonTIMESTAMP arg
errors.add("constant expected");
return errors;
}
public static void addExpressionErrors(ExpectedErrors errors) {
errors.addAll(getExpressionErrors());
}
public static List<String> getGroupByErrors() {
// TODO (anxing)
return new ArrayList<>();
}
public static void addGroupByErrors(ExpectedErrors errors) {
errors.addAll(getGroupByErrors());
}
public static List<String> getInsertErrors() {
ArrayList<String> errors = new ArrayList<>();
// TODO (anxing)
errors.add("Invalid column");
errors.add("inconvertible types:");
errors.add("inconvertible value:");
return errors;
}
public static void addInsertErrors(ExpectedErrors errors) {
errors.addAll(getInsertErrors());
}
}