public static class RolapStar.Column extends Object
Modifier and Type | Field and Description |
---|---|
static Comparator<RolapStar.Column> |
COMPARATOR |
Modifier | Constructor and Description |
---|---|
protected |
Column(Dialect.Datatype datatype)
Fake column.
|
Modifier and Type | Method and Description |
---|---|
static String |
createInExpr(String expr,
StarColumnPredicate predicate,
Dialect.Datatype datatype,
SqlQuery sqlQuery)
Generates a predicate that a column matches one of a list of values.
|
boolean |
equals(Object obj) |
String |
generateExprString(SqlQuery query)
Generates a SQL expression, which typically this looks like
this:
tableName.columnName . |
int |
getBitPosition() |
long |
getCardinality()
Get column cardinality from the schema cache if possible;
otherwise issue a select count(distinct) query to retrieve
the cardinality and stores it in the cache.
|
Dialect.Datatype |
getDatatype() |
String |
getDatatypeString(Dialect dialect)
Returns a string representation of the datatype of this column, in
the dialect specified.
|
MondrianDef.Expression |
getExpression() |
SqlStatement.Type |
getInternalType() |
String |
getName() |
RolapStar.Column |
getNameColumn() |
RolapStar.Column |
getParentColumn() |
SqlQuery |
getSqlQuery() |
RolapStar |
getStar() |
RolapStar.Table |
getTable() |
String |
getUsagePrefix() |
int |
hashCode() |
boolean |
isNameColumn() |
void |
print(PrintWriter pw,
String prefix)
Prints this column.
|
String |
toString() |
public static final Comparator<RolapStar.Column> COMPARATOR
protected Column(Dialect.Datatype datatype)
datatype
- Datatypepublic String getName()
public int getBitPosition()
public RolapStar getStar()
public RolapStar.Table getTable()
public SqlQuery getSqlQuery()
public RolapStar.Column getNameColumn()
public RolapStar.Column getParentColumn()
public String getUsagePrefix()
public boolean isNameColumn()
public MondrianDef.Expression getExpression()
public String generateExprString(SqlQuery query)
tableName.columnName
.public long getCardinality()
public static String createInExpr(String expr, StarColumnPredicate predicate, Dialect.Datatype datatype, SqlQuery sqlQuery)
Several possible outputs, depending upon whether the there are nulls:
foo.bar = 1
foo.bar in (1, 2, 3)
(foo.bar is null or foo.bar in (1, 2))
foo.bar is null
foo.bar in ('a', 'b', 'c')
public void print(PrintWriter pw, String prefix)
pw
- Print writerprefix
- Prefix to print first, such as spaces for indentationpublic Dialect.Datatype getDatatype()
public String getDatatypeString(Dialect dialect)
dialect
- Dialectpublic SqlStatement.Type getInternalType()
Copyright © 2019 Hitachi Vantara. All rights reserved.