@Test void testVisitComparisonNodeAllFieldsSearchQuery() { ComparisonOperator searchQuery = new ComparisonOperator("=sq="); ComparisonNode node = new ComparisonNode(searchQuery, "*", List.of("8.3.*")); Query actual = visitor.visit(node); Query expected = new QueryImpl().searchQuery("8.3.*"); assertEquals(expected, actual); }
@Override public Query<Entity> visit(AndNode node) { initQuery(); boolean nested = node.getChildren().size() > 1; if (nested) { q.nest(); } for (Iterator<Node> it = node.iterator(); it.hasNext(); ) { Node child = it.next(); child.accept(this); if (it.hasNext()) { q.and(); } } if (nested) { q.unnest(); } return q; }
MolgenisRSQLVisitor extends NoArgRSQLVisitorAdapter<Query<Entity>> { @Override public Query<Entity> visit(AndNode node) { initQuery(); boolean nested = node.getChildren().size() > 1; if (nested) { q.nest(); } for (Iterator<Node> it = node.iterator(); it.hasNext(); ) { Node child = it.next(); child.accept(this); if (it.hasNext()) { q.and(); } } if (nested) { q.unnest(); } return q; } }
MolgenisRSQLVisitor extends NoArgRSQLVisitorAdapter<Query<Entity>> { @Override public Query<Entity> visit(AndNode node) { initQuery(); boolean nested = node.getChildren().size() > 1; if (nested) { q.nest(); } for (Iterator<Node> it = node.iterator(); it.hasNext(); ) { Node child = it.next(); child.accept(this); if (it.hasNext()) { q.and(); } } if (nested) { q.unnest(); } return q; } MolgenisRSQLVisitor(Repository<Entity> repository);  MolgenisRSQLVisitor(Repository<Entity> repository, RSQLValueParser rsqlValueParser); }
MolgenisRSQLVisitor extends NoArgRSQLVisitorAdapter<Query<Entity>> { @Override public Query<Entity> visit(AndNode node) { initQuery(); boolean nested = node.getChildren().size() > 1; if (nested) { q.nest(); } for (Iterator<Node> it = node.iterator(); it.hasNext(); ) { Node child = it.next(); child.accept(this); if (it.hasNext()) { q.and(); } } if (nested) { q.unnest(); } return q; } MolgenisRSQLVisitor(Repository<Entity> repository);  MolgenisRSQLVisitor(Repository<Entity> repository, RSQLValueParser rsqlValueParser); @Override Query<Entity> visit(AndNode node); @Override Query<Entity> visit(OrNode node); @Override Query<Entity> visit(ComparisonNode node); }
MolgenisRSQLVisitor extends NoArgRSQLVisitorAdapter<Query<Entity>> { @Override public Query<Entity> visit(AndNode node) { initQuery(); boolean nested = node.getChildren().size() > 1; if (nested) { q.nest(); } for (Iterator<Node> it = node.iterator(); it.hasNext(); ) { Node child = it.next(); child.accept(this); if (it.hasNext()) { q.and(); } } if (nested) { q.unnest(); } return q; } MolgenisRSQLVisitor(Repository<Entity> repository);  MolgenisRSQLVisitor(Repository<Entity> repository, RSQLValueParser rsqlValueParser); @Override Query<Entity> visit(AndNode node); @Override Query<Entity> visit(OrNode node); @Override Query<Entity> visit(ComparisonNode node);  }