forked from sqlancer/sqlancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPostgresJoin.java
More file actions
50 lines (37 loc) · 1.15 KB
/
PostgresJoin.java
File metadata and controls
50 lines (37 loc) · 1.15 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
package sqlancer.postgres.ast;
import sqlancer.Randomly;
import sqlancer.postgres.PostgresSchema.PostgresDataType;
import sqlancer.postgres.PostgresSchema.PostgresTable;
public class PostgresJoin implements PostgresExpression {
public enum PostgresJoinType {
INNER, LEFT, RIGHT, FULL, CROSS;
public static PostgresJoinType getRandom() {
return Randomly.fromOptions(values());
}
}
private final PostgresTable table;
private final PostgresExpression onClause;
private final PostgresJoinType type;
public PostgresJoin(PostgresTable table, PostgresExpression onClause, PostgresJoinType type) {
this.table = table;
this.onClause = onClause;
this.type = type;
}
public PostgresTable getTable() {
return table;
}
public PostgresExpression getOnClause() {
return onClause;
}
public PostgresJoinType getType() {
return type;
}
@Override
public PostgresDataType getExpressionType() {
throw new AssertionError();
}
@Override
public PostgresConstant getExpectedValue() {
throw new AssertionError();
}
}