public Object visit(TextsearchQueryNode node, Object data) { StringBuffer sb = (StringBuffer) data; // escape quote String query = node.getQuery().replaceAll("'", "''"); sb.append("CONTAINS("); if (node.getRelativePath() == null) { sb.append("*"); } else { if (node.getRelativePath().getLength() > 1 || !node.getReferencesProperty()) { exceptions.add(new InvalidQueryException("Child axis not supported in SQL")); } else { try { appendName(node.getRelativePath().getName(), resolver, sb); } catch (NamespaceException e) { exceptions.add(e); } } } sb.append(", '"); sb.append(query).append("')"); return sb; }
public Object visit(TextsearchQueryNode node, Object data) { StringBuffer buffer = (StringBuffer) data; buffer.append(PADDING, 0, indent); buffer.append("+ TextsearchQueryNode: "); buffer.append(" Path="); Path relPath = node.getRelativePath(); if (relPath == null) { buffer.append("."); } else { Path.Element[] elements = relPath.getElements(); String slash = ""; for (int i = 0; i < elements.length; i++) { buffer.append(slash); slash = "/"; if (node.getReferencesProperty() && i == elements.length - 1) { buffer.append("@"); } buffer.append(elements[i]); } } buffer.append(" Query=").append(node.getQuery()); buffer.append("\n"); return buffer; }
public Object visit(TextsearchQueryNode node, Object data) { StringBuffer sb = (StringBuffer) data; // escape quote String query = node.getQuery().replaceAll("'", "''"); sb.append("CONTAINS("); if (node.getRelativePath() == null) { sb.append("*"); } else { if (node.getRelativePath().getLength() > 1 || !node.getReferencesProperty()) { exceptions.add(new InvalidQueryException("Child axis not supported in SQL")); } else { try { appendName(node.getRelativePath().getName(), resolver, sb); } catch (NamespaceException e) { exceptions.add(e); } } } sb.append(", '"); sb.append(query).append("')"); return sb; }
public Object visit(TextsearchQueryNode node, Object data) { StringBuffer buffer = (StringBuffer) data; buffer.append(PADDING, 0, indent); buffer.append("+ TextsearchQueryNode: "); buffer.append(" Path="); Path relPath = node.getRelativePath(); if (relPath == null) { buffer.append("."); } else { Path.Element[] elements = relPath.getElements(); String slash = ""; for (int i = 0; i < elements.length; i++) { buffer.append(slash); slash = "/"; if (node.getReferencesProperty() && i == elements.length - 1) { buffer.append("@"); } buffer.append(elements[i]); } } buffer.append(" Query=").append(node.getQuery()); buffer.append("\n"); return buffer; }
sb.append(resolver.getJCRName(XPathQueryBuilder.JCR_CONTAINS)); sb.append("("); Path relPath = node.getRelativePath(); if (relPath == null) { sb.append(".");
sb.append(resolver.getJCRName(XPathQueryBuilder.JCR_CONTAINS)); sb.append("("); Path relPath = node.getRelativePath(); if (relPath == null) { sb.append(".");
public Object visit(TextsearchQueryNode node, Object data) { try { Path relPath = node.getRelativePath(); String fieldname; if (relPath == null || !node.getReferencesProperty()) {
public Object visit(TextsearchQueryNode node, Object data) { try { Path relPath = node.getRelativePath(); String fieldname; if (relPath == null || !node.getReferencesProperty()) {