本文整理匯總了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);
}