Examples of toCQL()


Examples of org.springframework.cassandra.core.cql.CqlIdentifier.toCql()

    String[] ids = new String[] { "foo", "Foo", "FOO", "a_", "a1" };

    for (String id : ids) {
      CqlIdentifier cqlId = cqlId(id);
      assertFalse(cqlId.isQuoted());
      assertEquals(id.toLowerCase(), cqlId.toCql());
    }
  }

  @Test
  public void testForceQuotedIdentifiers() {
View Full Code Here

Examples of org.springframework.cassandra.core.cql.CqlIdentifier.toCql()

    String[] ids = new String[] { "foo", "Foo", "FOO", "a_", "a1" };

    for (String id : ids) {
      CqlIdentifier cqlId = quotedCqlId(id);
      assertTrue(cqlId.isQuoted());
      assertEquals("\"" + id + "\"", cqlId.toCql());
    }
  }

  @Test
  public void testReservedWordsEndUpQuoted() {
View Full Code Here

Examples of org.springframework.cassandra.core.cql.CqlIdentifier.toCql()

  public void testReservedWordsEndUpQuoted() {

    for (ReservedKeyword id : ReservedKeyword.values()) {
      CqlIdentifier cqlId = cqlId(id.name());
      assertTrue(cqlId.isQuoted());
      assertEquals("\"" + id.name() + "\"", cqlId.toCql());

      cqlId = cqlId(id.name().toLowerCase());
      assertTrue(cqlId.isQuoted());
      assertEquals("\"" + id.name().toLowerCase() + "\"", cqlId.toCql());
    }
View Full Code Here

Examples of org.springframework.cassandra.core.cql.CqlIdentifier.toCql()

      assertTrue(cqlId.isQuoted());
      assertEquals("\"" + id.name() + "\"", cqlId.toCql());

      cqlId = cqlId(id.name().toLowerCase());
      assertTrue(cqlId.isQuoted());
      assertEquals("\"" + id.name().toLowerCase() + "\"", cqlId.toCql());
    }
  }

  @Test
  public void testIllegals() {
View Full Code Here

Examples of org.z3950.zing.cql.CQLNode.toCQL()

        ret = (DocumentImpl) adapter.getDocument();

          } else if (output.equals(OutputTypeString)) {
        ret = new StringValue(query_cql.toString());
          } else {
        ret = new StringValue(query_cql.toCQL());
          }
          return ret;
          }
    catch (CQLParseException e) {
        throw new XPathException(this, "An error occurred while parsing the query expression (CQLParseException): " + e.getMessage(), e);         
View Full Code Here

Examples of org.z3950.zing.cql.CQLNode.toCQL()

      if ( null != request.getParameter("query") ) {     
        String query = request.getParameter("query");           
        if ( ! TreebaseUtil.isEmpty(query) ) {
          CQLParser parser = new CQLParser();
          CQLNode root = parser.parse(query);     
          request.getSession().setAttribute("normalizedCQLQuery", URLEncoder.encode(root.toCQL(),"UTF-8"));
        }
      }
    }
    return new ModelAndView("searchResultsAsRDF");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.