verifyUnsupportedSqlConstruct(errors, select.getInto()); verifyUnsupportedSqlConstruct(errors, select.getJoins()); verifyUnsupportedSqlConstruct(errors, select.getLimit()); if (errors.size() > 0) { throw new UnsupportedOperationException(
private void navigateOthers() { if (this.plainSelect.getLimit() != null) handleLimit(this.plainSelect.getLimit()); if (this.plainSelect.getDistinct() != null) handleDistinct(this.plainSelect.getDistinct()); if (this.plainSelect.getInto() != null) handleInto(this.plainSelect.getInto()); if (this.plainSelect.getTop() != null) handleTop(this.plainSelect.getTop()); }
verifyUnsupportedSqlConstruct(errors, select.getInto()); verifyUnsupportedSqlConstruct(errors, select.getJoins()); verifyUnsupportedSqlConstruct(errors, select.getLimit()); if (errors.size() > 0) { throw new UnsupportedOperationException("The following constructs are not supported: "
Limit limit = plainSelect.getLimit(); log.debug("LIMIT: " + limit); if (limit != null)
throw new UnsupportedSelectQueryRuntimeException("GROUP BY / HAVING are not supported", selectBody); if (plainSelect.getLimit() != null || plainSelect.getTop() != null || plainSelect.getOffset()!= null) throw new UnsupportedSelectQueryRuntimeException("LIMIT / OFFSET / TOP are not supported", selectBody);
throw new UnsupportedSelectQueryRuntimeException("GROUP BY / HAVING are not supported", selectBody); if (plainSelect.getLimit() != null || plainSelect.getTop() != null || plainSelect.getOffset()!= null) throw new UnsupportedSelectQueryRuntimeException("LIMIT / OFFSET / TOP are not supported", selectBody);
public Builder setJSqlParser(CCJSqlParser jSqlParser) throws com.github.vincentrussell.query.mongodb.sql.converter.ParseException, ParseException { final Statement statement = jSqlParser.Statement(); if (Select.class.isAssignableFrom(statement.getClass())) { sqlCommandType = SQLCommandType.SELECT; final PlainSelect plainSelect = (PlainSelect)(((Select)statement).getSelectBody()); SqlUtils.isTrue(plainSelect != null, "could not parseNaturalLanguageDate SELECT statement from query"); SqlUtils.isTrue(plainSelect.getFromItem()!=null,"could not find table to query. Only one simple table name is supported."); whereClause = plainSelect.getWhere(); isDistinct = (plainSelect.getDistinct() != null); isCountAll = SqlUtils.isCountAll(plainSelect.getSelectItems()); SqlUtils.isTrue(plainSelect.getFromItem() != null, "could not find table to query. Only one simple table name is supported."); table = plainSelect.getFromItem().toString(); limit = SqlUtils.getLimit(plainSelect.getLimit()); orderByElements1 = plainSelect.getOrderByElements(); selectItems = plainSelect.getSelectItems(); joins = plainSelect.getJoins(); groupBys = SqlUtils.getGroupByColumnReferences(plainSelect); SqlUtils.isTrue(plainSelect.getFromItem() != null, "could not find table to query. Only one simple table name is supported."); } else if (Delete.class.isAssignableFrom(statement.getClass())) { sqlCommandType = SQLCommandType.DELETE; Delete delete = (Delete)statement; SqlUtils.isTrue(delete.getTables().size() == 0, "there should only be on table specified for deletes"); table = delete.getTable().toString(); whereClause = delete.getWhere(); } return this; }
plainSelect.setLimit(null); } else if (rowLimit > 0) { Limit limit = plainSelect.getLimit(); if (limit == null) { limit = new Limit();