forked from sqlancer/sqlancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPostgresColumnValue.java
More file actions
34 lines (25 loc) · 872 Bytes
/
PostgresColumnValue.java
File metadata and controls
34 lines (25 loc) · 872 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
33
34
package sqlancer.postgres.ast;
import sqlancer.postgres.PostgresSchema.PostgresColumn;
import sqlancer.postgres.PostgresSchema.PostgresDataType;
public class PostgresColumnValue implements PostgresExpression {
private final PostgresColumn c;
private final PostgresConstant expectedValue;
public PostgresColumnValue(PostgresColumn c, PostgresConstant expectedValue) {
this.c = c;
this.expectedValue = expectedValue;
}
@Override
public PostgresDataType getExpressionType() {
return c.getType();
}
@Override
public PostgresConstant getExpectedValue() {
return expectedValue;
}
public static PostgresColumnValue create(PostgresColumn c, PostgresConstant expected) {
return new PostgresColumnValue(c, expected);
}
public PostgresColumn getColumn() {
return c;
}
}