本文整理匯總了Java中com.foundationdb.sql.parser.CursorNode.init方法的典型用法代碼示例。如果您正苦於以下問題:Java CursorNode.init方法的具體用法?Java CursorNode.init怎麽用?Java CursorNode.init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.foundationdb.sql.parser.CursorNode
的用法示例。
在下文中一共展示了CursorNode.init方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addLimitCondtionForSelectSQL
import com.foundationdb.sql.parser.CursorNode; //導入方法依賴的package包/類
public static String addLimitCondtionForSelectSQL(RouteResultset rrs,
CursorNode cursNode, int defaultMaxLimit)
throws SQLSyntaxErrorException {
NumericConstantNode offCountNode = new NumericConstantNode();
offCountNode.setNodeType(NodeTypes.INT_CONSTANT_NODE);
offCountNode.setValue(defaultMaxLimit);
cursNode.init(cursNode.statementToString(),
cursNode.getResultSetNode(), cursNode.getName(),
cursNode.getOrderByList(), cursNode.getOffsetClause(),
offCountNode, cursNode.getUpdateMode(),
cursNode.getUpdatableColumns());
rrs.setLimitSize(defaultMaxLimit);
try {
return new NodeToString().toString(cursNode);
} catch (StandardException e) {
throw new SQLSyntaxErrorException(e);
}
}
示例2: addLimitCondtionForSelectSQL
import com.foundationdb.sql.parser.CursorNode; //導入方法依賴的package包/類
public static String addLimitCondtionForSelectSQL(RouteResultset rrs,
CursorNode cursNode, int defaultMaxLimit) throws SQLSyntaxErrorException {
NumericConstantNode offCountNode = new NumericConstantNode();
offCountNode.setNodeType(NodeTypes.INT_CONSTANT_NODE);
offCountNode.setValue(defaultMaxLimit);
cursNode.init(cursNode.statementToString(),
cursNode.getResultSetNode(), cursNode.getName(),
cursNode.getOrderByList(), cursNode.getOffsetClause(),
offCountNode, cursNode.getUpdateMode(),
cursNode.getUpdatableColumns());
rrs.setLimitSize(defaultMaxLimit);
try {
return new NodeToString().toString(cursNode);
} catch (StandardException e) {
throw new SQLSyntaxErrorException(e);
}
}
示例3: findAndSetTypes
import com.foundationdb.sql.parser.CursorNode; //導入方法依賴的package包/類
/** Run just enough rules to get to TypeResolver, then set types. */
protected void findAndSetTypes(AISViewDefinition view) {
FromSubquery fromSubquery = view.getSubquery();
// put the SELECT in a cursorNode to enable bindAndTransform/statementLoader/etc on it.
CursorNode cursorNode = new CursorNode();
cursorNode.init("SELECT",
fromSubquery.getSubquery(),
view.getName().getFullTableName(),
fromSubquery.getOrderByList(),
fromSubquery.getOffset(),
fromSubquery.getFetchFirst(),
UpdateMode.UNSPECIFIED,
null);
cursorNode.setNodeType(NodeTypes.CURSOR_NODE);
bindAndTransform(cursorNode);
copyExposedNames(fromSubquery.getResultColumns(), fromSubquery.getSubquery().getResultColumns());
fromSubquery.setResultColumns(fromSubquery.getSubquery().getResultColumns());
PlanContext plan = new PlanContext(this);
plan.setPlan(new AST(cursorNode, null));
// can't user OperatorCompiler.compile, because it expects to return BasePlannable
ASTStatementLoader stmtLoader = new ASTStatementLoader();
stmtLoader.apply(plan);
TypeResolver typeResolver = new TypeResolver();
typeResolver.apply(plan);
copyTypes((ResultSet) ((SelectQuery)plan.getPlan()).getInput(), fromSubquery.getResultColumns());
}