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