本文整理了Java中net.sf.jsqlparser.statement.select.Limit.getOffset()
方法的一些代码示例,展示了Limit.getOffset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Limit.getOffset()
方法的具体详情如下:
包路径:net.sf.jsqlparser.statement.select.Limit
类名称:Limit
方法名:getOffset
暂无
代码示例来源:origin: JSQLParser/JSqlParser
public void deParse(Limit limit) {
buffer.append(" LIMIT ");
if (limit.isLimitNull()) {
buffer.append("NULL");
} else {
if (null != limit.getOffset()) {
buffer.append(limit.getOffset()).append(", ");
}
if (null != limit.getRowCount()) {
buffer.append(limit.getRowCount());
}
}
}
}
代码示例来源:origin: alibaba/mdrill
public void deparseLimit(Limit limit) {
// LIMIT n OFFSET skip
buffer.append(" LIMIT ");
if (limit.isRowCountJdbcParameter()) {
buffer.append("?");
} else if (limit.getRowCount() != 0) {
buffer.append(limit.getRowCount());
} else {
/*
from mysql docs:
For compatibility with PostgreSQL, MySQL also supports the LIMIT row_count OFFSET offset syntax.
To retrieve all rows from a certain offset up to the end of the result set, you can use some large number
for the second parameter.
*/
buffer.append("18446744073709551615");
}
if (limit.isOffsetJdbcParameter()) {
buffer.append(" OFFSET ?");
} else if (limit.getOffset() != 0) {
buffer.append(" OFFSET " + limit.getOffset());
}
}
代码示例来源:origin: JSQLParser/JSqlParser
if (jj_2_45(2)) {
token = jj_consume_token(S_IDENTIFIER);
((JdbcNamedParameter)limit.getOffset()).setName(token.image);
} else {
代码示例来源:origin: com.github.jsqlparser/jsqlparser
public void deParse(Limit limit) {
buffer.append(" LIMIT ");
if (limit.isLimitNull()) {
buffer.append("NULL");
} else {
if (null != limit.getOffset()) {
buffer.append(limit.getOffset()).append(", ");
}
if (null != limit.getRowCount()) {
buffer.append(limit.getRowCount());
}
}
}
}
代码示例来源:origin: org.opencadc/cadc-jsqlparser-compat
public void deparseLimit(Limit limit) {
// LIMIT n OFFSET skip
buffer.append(" LIMIT ");
if (limit.isRowCountJdbcParameter()) {
buffer.append("?");
} else if (limit.getRowCount() != 0) {
buffer.append(limit.getRowCount());
} else {
/*
from mysql docs:
For compatibility with PostgreSQL, MySQL also supports the LIMIT row_count OFFSET offset syntax.
To retrieve all rows from a certain offset up to the end of the result set, you can use some large number
for the second parameter.
*/
buffer.append("18446744073709551615");
}
if (limit.isOffsetJdbcParameter()) {
buffer.append(" OFFSET ?");
} else if (limit.getOffset() != 0) {
buffer.append(" OFFSET " + limit.getOffset());
}
}
代码示例来源:origin: diennea/herddb
private void visitLimit(Limit limit) {
if (limit.getOffset() != null) {
if (limit.getOffset() instanceof JdbcParameter) {
limit.setOffset(ImmutableExpressionsCache.internOrFixJdbcParameterExpression((JdbcParameter) limit.getOffset()));
}
limit.getOffset().accept(this);
}
if (limit.getRowCount() != null) {
if (limit.getRowCount() instanceof JdbcParameter) {
limit.setRowCount(ImmutableExpressionsCache.internOrFixJdbcParameterExpression((JdbcParameter) limit.getRowCount()));
}
limit.getRowCount().accept(this);
}
}
代码示例来源:origin: org.opencadc/cadc-adql
public PgLimit(Limit limit)
{
this.offset = limit.getOffset();
this.rowCount = limit.getRowCount();
this.rowCountJdbcParameter = limit.isRowCountJdbcParameter();
this.offsetJdbcParameter = limit.isOffsetJdbcParameter();
this.limitAll = limit.isLimitAll();
}
代码示例来源:origin: com.eas.platypus/platypus-js-sql-parser
if (limit.isOffsetJdbcParameter()) {
buffer.append("?");
} else if (limit.getOffset() != 0) {
buffer.append(limit.getOffset());
buffer.append(limit.getCommentOffset() != null ? " " + limit.getCommentOffset() + ExpressionDeParser.LINE_SEPARATOR : "").append(" Offset")
.append(limit.getCommentOffsetValue() != null ? " " + limit.getCommentOffsetValue() + ExpressionDeParser.LINE_SEPARATOR : "").append(" ?");
} else if (limit.getOffset() != 0) {
buffer.append(limit.getCommentOffset() != null ? " " + limit.getCommentOffset() + ExpressionDeParser.LINE_SEPARATOR : "").append(" Offset ")
.append(limit.getCommentOffsetValue() != null ? " " + limit.getCommentOffsetValue() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(limit.getOffset());
代码示例来源:origin: com.github.jsqlparser/jsqlparser
if (jj_2_44(2)) {
token = jj_consume_token(S_IDENTIFIER);
((JdbcNamedParameter)limit.getOffset()).setName(token.image);
} else {
内容来源于网络,如有侵权,请联系作者删除!