本文整理汇总了Java中org.voltdb.types.ExpressionType.VALUE_TUPLE属性的典型用法代码示例。如果您正苦于以下问题:Java ExpressionType.VALUE_TUPLE属性的具体用法?Java ExpressionType.VALUE_TUPLE怎么用?Java ExpressionType.VALUE_TUPLE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.voltdb.types.ExpressionType
的用法示例。
在下文中一共展示了ExpressionType.VALUE_TUPLE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTablesForExpression
/**
*
* @param db
* @param expr
* @param tables
*/
void getTablesForExpression(Database db, AbstractExpression expr, HashSet<Table> tables) {
if (expr.getLeft() != null)
getTablesForExpression(db, expr.getLeft(), tables);
if (expr.getRight() != null)
getTablesForExpression(db, expr.getRight(), tables);
if (expr.getExpressionType() == ExpressionType.VALUE_TUPLE) {
TupleValueExpression tupleExpr = (TupleValueExpression)expr;
String tableName = tupleExpr.getTableName();
Table table = db.getTables().getIgnoreCase(tableName);
tables.add(table);
}
}
示例2: getColumnForFilterExpressionRecursive
protected Column
getColumnForFilterExpressionRecursive(Table table, AbstractExpression expr) {
// stopping steps:
//
if (expr == null)
return null;
if (expr.getExpressionType() == ExpressionType.VALUE_TUPLE) {
TupleValueExpression tve = (TupleValueExpression)expr;
return getTableColumn(table, tve.getColumnName());
}
// recursive step
//
Column leftCol = getColumnForFilterExpressionRecursive(table, expr.getLeft());
Column rightCol = getColumnForFilterExpressionRecursive(table, expr.getRight());
assert(leftCol == null ||
getTableColumn(table, leftCol.getTypeName()) != null);
assert(rightCol == null ||
getTableColumn(table, rightCol.getTypeName()) != null);
// Left and right columns must not be from the same table,
// e.g. where t.a = t.b is really a self join.
if (leftCol != null && rightCol != null) {
return null;
}
if (leftCol != null)
return leftCol;
if (rightCol != null)
return rightCol;
return null;
}
示例3: TupleValueExpression
public TupleValueExpression() {
super(ExpressionType.VALUE_TUPLE);
}