Package org.springframework.cassandra.core.cql

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


    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

  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

      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

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.