本文整理汇总了Java中net.sf.jsqlparser.expression.operators.relational.ExpressionList.setExpressions方法的典型用法代码示例。如果您正苦于以下问题:Java ExpressionList.setExpressions方法的具体用法?Java ExpressionList.setExpressions怎么用?Java ExpressionList.setExpressions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jsqlparser.expression.operators.relational.ExpressionList
的用法示例。
在下文中一共展示了ExpressionList.setExpressions方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: countSelectItem
import net.sf.jsqlparser.expression.operators.relational.ExpressionList; //导入方法依赖的package包/类
/**
* 获取jsqlparser中count的SelectItem
*
* @return
*/
private static List<SelectItem> countSelectItem() {
if (CollectionUtils.isNotEmpty(countSelectItem)) {
return countSelectItem;
}
Function function = new Function();
function.setName("COUNT");
List<Expression> expressions = new ArrayList<>();
LongValue longValue = new LongValue(1);
ExpressionList expressionList = new ExpressionList();
expressions.add(longValue);
expressionList.setExpressions(expressions);
function.setParameters(expressionList);
countSelectItem = new ArrayList<>();
SelectExpressionItem selectExpressionItem = new SelectExpressionItem(function);
countSelectItem.add(selectExpressionItem);
return countSelectItem;
}
示例2: ExpressionList
import net.sf.jsqlparser.expression.operators.relational.ExpressionList; //导入方法依赖的package包/类
final public ExpressionList ExpressionList() throws ParseException {
ExpressionList retval = new ExpressionList();
List expressions = new ArrayList();
Expression expr = null;
expr = Expression();
expressions.add(expr);
label_18:
while (true) {
if (jj_2_22(2147483647)) {
;
} else {
break label_18;
}
jj_consume_token(79);
expr = Expression();
expressions.add(expr);
}
retval.setExpressions(expressions);
{if (true) return retval;}
throw new Error("Missing return statement in function");
}
示例3: countSelectItem
import net.sf.jsqlparser.expression.operators.relational.ExpressionList; //导入方法依赖的package包/类
/**
* <p>
* 获取jsqlparser中count的SelectItem
* </p>
*/
private static List<SelectItem> countSelectItem() {
Function function = new Function();
function.setName("COUNT");
List<Expression> expressions = new ArrayList<>();
LongValue longValue = new LongValue(1);
ExpressionList expressionList = new ExpressionList();
expressions.add(longValue);
expressionList.setExpressions(expressions);
function.setParameters(expressionList);
List<SelectItem> selectItems = new ArrayList<>();
SelectExpressionItem selectExpressionItem = new SelectExpressionItem(function);
selectItems.add(selectExpressionItem);
return selectItems;
}
示例4: countSelectItem
import net.sf.jsqlparser.expression.operators.relational.ExpressionList; //导入方法依赖的package包/类
/**
* 获取jsqlparser中count的SelectItem
*
* @return
*/
private static List<SelectItem> countSelectItem() {
if (CollectionUtils.isNotEmpty(countSelectItem)) {
return countSelectItem;
}
Function function = new Function();
function.setName("COUNT");
List<Expression> expressions = new ArrayList<Expression>();
LongValue longValue = new LongValue(0);
ExpressionList expressionList = new ExpressionList();
expressions.add(longValue);
expressionList.setExpressions(expressions);
function.setParameters(expressionList);
countSelectItem = new ArrayList<SelectItem>();
SelectExpressionItem selectExpressionItem = new SelectExpressionItem(function);
countSelectItem.add(selectExpressionItem);
return countSelectItem;
}
示例5: SQLExpressionList
import net.sf.jsqlparser.expression.operators.relational.ExpressionList; //导入方法依赖的package包/类
final public ExpressionList SQLExpressionList() throws ParseException {ExpressionList retval = new ExpressionList();
List expressions = new ArrayList();
List comments = new ArrayList();
Expression expr = null;
Token tk = null;
expr = Expression();
expressions.add(expr);
label_18:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA:{
;
break;
}
default:
jj_la1[107] = jj_gen;
break label_18;
}
tk = jj_consume_token(COMMA);
if (tk.specialToken != null) {
comments.add(tk.specialToken.image);
} else {comments.add("");}
expr = Expression();
expressions.add(expr);
}
retval.setExpressions(expressions);
retval.setCommentsComma(comments);
{if ("" != null) return retval;}
throw new Error("Missing return statement in function");
}
示例6: SimpleExpressionList
import net.sf.jsqlparser.expression.operators.relational.ExpressionList; //导入方法依赖的package包/类
final public ExpressionList SimpleExpressionList() throws ParseException {ExpressionList retval = new ExpressionList();
List expressions = new ArrayList();
List comments = new ArrayList();
Expression expr = null;
Token tk = null;
expr = SimpleExpression();
expressions.add(expr);
label_19:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA:{
;
break;
}
default:
jj_la1[108] = jj_gen;
break label_19;
}
tk = jj_consume_token(COMMA);
if (tk.specialToken != null) {
comments.add(tk.specialToken.image);
} else {comments.add("");}
expr = SimpleExpression();
expressions.add(expr);
}
retval.setExpressions(expressions);
retval.setCommentsComma(comments);
{if ("" != null) return retval;}
throw new Error("Missing return statement in function");
}
示例7: SQLExpressionList
import net.sf.jsqlparser.expression.operators.relational.ExpressionList; //导入方法依赖的package包/类
final public ExpressionList SQLExpressionList() throws ParseException {
/* @bgen(jjtree) SQLExpressionList */
SimpleNode jjtn000 = new SimpleNode(JJTSQLEXPRESSIONLIST);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
ExpressionList retval = new ExpressionList();
List<Expression> expressions = new ArrayList<Expression>();
Expression expr = null;
try {
expr = Expression();
expressions.add(expr);
label_38:
while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 165:
;
break;
default:
jj_la1[185] = jj_gen;
break label_38;
}
jj_consume_token(165);
expr = Expression();
expressions.add(expr);
}
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
retval.setExpressions(expressions);
{
if (true)
return retval;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{
if (true)
throw (RuntimeException) jjte000;
}
}
if (jjte000 instanceof ParseException) {
{
if (true)
throw (ParseException) jjte000;
}
}
{
if (true)
throw (Error) jjte000;
}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
throw new Error("Missing return statement in function");
}
示例8: SimpleExpressionList
import net.sf.jsqlparser.expression.operators.relational.ExpressionList; //导入方法依赖的package包/类
final public ExpressionList SimpleExpressionList() throws ParseException {
/* @bgen(jjtree) SimpleExpressionList */
SimpleNode jjtn000 = new SimpleNode(JJTSIMPLEEXPRESSIONLIST);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
ExpressionList retval = new ExpressionList();
List<Expression> expressions = new ArrayList<Expression>();
Expression expr = null;
try {
expr = SimpleExpression();
expressions.add(expr);
label_39:
while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 165:
;
break;
default:
jj_la1[186] = jj_gen;
break label_39;
}
jj_consume_token(165);
expr = SimpleExpression();
expressions.add(expr);
}
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
retval.setExpressions(expressions);
{
if (true)
return retval;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{
if (true)
throw (RuntimeException) jjte000;
}
}
if (jjte000 instanceof ParseException) {
{
if (true)
throw (ParseException) jjte000;
}
}
{
if (true)
throw (Error) jjte000;
}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
throw new Error("Missing return statement in function");
}
示例9: SimpleExpressionListAtLeastTwoItems
import net.sf.jsqlparser.expression.operators.relational.ExpressionList; //导入方法依赖的package包/类
final public ExpressionList SimpleExpressionListAtLeastTwoItems()
throws ParseException {
/* @bgen(jjtree) SimpleExpressionListAtLeastTwoItems */
SimpleNode jjtn000 = new SimpleNode(
JJTSIMPLEEXPRESSIONLISTATLEASTTWOITEMS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
ExpressionList retval = new ExpressionList();
List<Expression> expressions = new ArrayList<Expression>();
Expression expr = null;
try {
expr = SimpleExpression();
expressions.add(expr);
label_40:
while (true) {
jj_consume_token(165);
expr = SimpleExpression();
expressions.add(expr);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case 165:
;
break;
default:
jj_la1[187] = jj_gen;
break label_40;
}
}
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
retval.setExpressions(expressions);
{
if (true)
return retval;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{
if (true)
throw (RuntimeException) jjte000;
}
}
if (jjte000 instanceof ParseException) {
{
if (true)
throw (ParseException) jjte000;
}
}
{
if (true)
throw (Error) jjte000;
}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
throw new Error("Missing return statement in function");
}