Examples of CQLStatement


Examples of com.pardot.rhombus.cobject.statement.CQLStatement

    public void testMakeWideTableCreate() throws CObjectParseException, IOException {
      String json = TestHelpers.readFileToString(this.getClass(), "CObjectCQLGeneratorTestData.js");
      CDefinition def = CDefinition.fromJsonString(json);
      Subject subject = new Subject(1000);
      CQLStatement cql1 = subject.makeWideTableCreate(def, def.getIndexes().get("foreignid"));
      CQLStatement expected1 = CQLStatement.make(
          "CREATE TABLE \"testspace\".\"testtype7f9bb4e56d3cae5b11c553547cfe5897\" (id timeuuid, shardid bigint, filtered int,data1 varchar,data2 varchar,data3 varchar,instance bigint,type int,foreignid bigint, PRIMARY KEY ((shardid, foreignid),id) );",
          TABLE_NAME
      );
      assertEquals(expected1, cql1);

      CQLStatement cql2 = subject.makeWideTableCreate(def, def.getIndexes().get("instance:type"));
      CQLStatement expected2 = CQLStatement.make(
          "CREATE TABLE \"testspace\".\"testtype6671808f3f51bcc53ddc76d2419c9060\" (id timeuuid, shardid bigint, filtered int,data1 varchar,data2 varchar,data3 varchar,instance bigint,type int,foreignid bigint, PRIMARY KEY ((shardid, instance, type),id) );",
          TABLE_NAME
      );
      assertEquals(expected2, cql2);

      CQLStatement cql3 = subject.makeWideTableCreate(def, def.getIndexes().get("foreignid:instance:type"));
      CQLStatement expected3 =  CQLStatement.make(
          "CREATE TABLE \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" (id timeuuid, shardid bigint, filtered int,data1 varchar,data2 varchar,data3 varchar,instance bigint,type int,foreignid bigint, PRIMARY KEY ((shardid, foreignid, instance, type),id) );",
          TABLE_NAME
      );
      assertEquals(expected3, cql3);
    }
View Full Code Here

Examples of com.pardot.rhombus.cobject.statement.CQLStatement

      Map<String, Object> data = TestHelpers.getTestObject(0);
      UUID uuid = UUID.fromString("ada375b0-a2d9-11e2-99a3-3f36d3955e43");
      CQLStatementIterator result = Subject.makeCQLforInsert(KEYSPACE_NAME, def,data,uuid,Long.valueOf(1),null);
      List<CQLStatement> actual = toList(result);

      CQLStatement expected;
      assertEquals("Should generate CQL statements for the static table plus all indexes including the filtered index", 6, actual.size());
      //static table
      expected = CQLStatement.make(
          "INSERT INTO \"testspace\".\"testtype\" (id, filtered, data1, data2, data3, instance, type, foreignid) VALUES (?, ?, ?, ?, ?, ?, ?, ?);",
          TABLE_NAME,
View Full Code Here

Examples of com.pardot.rhombus.cobject.statement.CQLStatement

      indexkeys.put("type", "5");
      indexkeys.put("instance", "222222");

      // creating a iterator that has both start and end and both are inclusive
      BoundedLazyCQLStatementIterator boundedLazyIterator = (BoundedLazyCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, def, indexkeys, CObjectOrdering.DESCENDING, null, stop, 10l, true, false, false);
      CQLStatement actual = boundedLazyIterator.next();
      CQLStatement expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id <= ? ORDER BY id DESC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(1),"777","222222","5", stop)
      );

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(expected.getValues()[4], actual.getValues()[4]);


      // testing if next start uuid is correctly applied
      UUID nextUuid = UUID.fromString("ada375b1-a2d9-11e2-99a3-3f36d3955e43");
      boundedLazyIterator.setNextUuid(nextUuid);

      assertTrue(boundedLazyIterator.hasNext());
      actual = boundedLazyIterator.next();

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(nextUuid, actual.getValues()[4]);

      // testing iterator that has both start and end , non inclusive
      boundedLazyIterator = (BoundedLazyCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, def, indexkeys, CObjectOrdering.DESCENDING, null, stop, 10l, false, false, false);
      actual = boundedLazyIterator.next();
      expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id < ? ORDER BY id DESC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(1),"777","222222","5", stop)
      );

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(expected.getValues()[4], actual.getValues()[4]);

      // testing if next start uuid is correctly applied
      nextUuid = UUID.fromString("ada375b1-a2d9-11e2-99a3-3f36d3955e43");
      boundedLazyIterator.setNextUuid(nextUuid);

      assertTrue(boundedLazyIterator.hasNext());
      actual = boundedLazyIterator.next();

      expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id <= ? ORDER BY id DESC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(1),"777","222222","5", nextUuid)
      );

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(nextUuid, actual.getValues()[4]);

    }
View Full Code Here

Examples of com.pardot.rhombus.cobject.statement.CQLStatement

      indexkeys.put("type", "5");
      indexkeys.put("instance", "222222");

      // creating a iterator that has both start and end and both are inclusive
      UnboundableCQLStatementIterator unBoundedIterator = (UnboundableCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, def, indexkeys, CObjectOrdering.DESCENDING, start, stop, 10l, true, false, false);
      CQLStatement actual = unBoundedIterator.next();
      CQLStatement expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id >= ? AND id <= ? ORDER BY id DESC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(160),"777","222222","5", start, stop)
      );

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(expected.getValues()[4], actual.getValues()[4]);
      assertEquals(expected.getValues()[5], actual.getValues()[5]);

      // testing if next start uuid is correctly applied
      UUID nextUuid = UUID.fromString("ada375b1-a2d9-11e2-99a3-3f36d3955e43");
      unBoundedIterator.setNextUuid(nextUuid);

      // should not contain next shard
      assertFalse(unBoundedIterator.hasNext());
      actual = unBoundedIterator.next();

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(expected.getValues()[4], actual.getValues()[4]);
      assertEquals(nextUuid, actual.getValues()[5]);

      // testing iterator that has both start and end , non inclusive
      unBoundedIterator = (UnboundableCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, def, indexkeys, CObjectOrdering.DESCENDING, start, stop, 10l, false, false, false);
      actual = unBoundedIterator.next();
      expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id > ? AND id < ? ORDER BY id DESC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(160),"777","222222","5", start, stop)
      );

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(expected.getValues()[4], actual.getValues()[4]);
      assertEquals(expected.getValues()[5], actual.getValues()[5]);

      // testing if next start uuid is correctly applied
      nextUuid = UUID.fromString("ada375b1-a2d9-11e2-99a3-3f36d3955e43");
      unBoundedIterator.setNextUuid(nextUuid);

      // should not contain next shard
      assertFalse(unBoundedIterator.hasNext());
      actual = unBoundedIterator.next();

      expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id >= ? AND id <= ? ORDER BY id DESC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(160),"777","222222","5", start, nextUuid)
      );

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(expected.getValues()[4], actual.getValues()[4]);
      assertEquals(expected.getValues()[5], actual.getValues()[5]);


      // Repeating the above tests for ascending
      unBoundedIterator = (UnboundableCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, def, indexkeys, CObjectOrdering.ASCENDING, start, stop, 10l, true, false, false);
      actual = unBoundedIterator.next();
      expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id >= ? AND id <= ? ORDER BY id ASC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(160),"777","222222","5", start, stop)
      );

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(expected.getValues()[4], actual.getValues()[4]);
      assertEquals(expected.getValues()[5], actual.getValues()[5]);

      // testing if next start uuid is correctly applied
      nextUuid = UUID.fromString("ada375b1-a2d9-11e2-99a3-3f36d3955e43");
      unBoundedIterator.setNextUuid(nextUuid);

      // should not contain next shard
      assertFalse(unBoundedIterator.hasNext());
      actual = unBoundedIterator.next();

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(nextUuid, actual.getValues()[4]);
      assertEquals(expected.getValues()[5], actual.getValues()[5]);

      // testing iterator that has both start and end , non inclusive
      unBoundedIterator = (UnboundableCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, def, indexkeys, CObjectOrdering.ASCENDING, start, stop, 10l, false, false, false);
      actual = unBoundedIterator.next();
      expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id > ? AND id < ? ORDER BY id ASC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(160),"777","222222","5", start, stop)
      );

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(expected.getValues()[4], actual.getValues()[4]);
      assertEquals(expected.getValues()[5], actual.getValues()[5]);

      // testing if next start uuid is correctly applied
      nextUuid = UUID.fromString("ada375b1-a2d9-11e2-99a3-3f36d3955e43");
      unBoundedIterator.setNextUuid(nextUuid);

      // should not contain next shard
      assertFalse(unBoundedIterator.hasNext());
      actual = unBoundedIterator.next();

      expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id >= ? AND id <= ? ORDER BY id ASC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(160),"777","222222","5", nextUuid, stop)
      );

      assertEquals(expected.getQuery(), actual.getQuery());
      assertEquals(expected.getValues()[0], actual.getValues()[0]);
      assertEquals(expected.getValues()[1], actual.getValues()[1]);
      assertEquals(expected.getValues()[2], actual.getValues()[2]);
      assertEquals(expected.getValues()[3], actual.getValues()[3]);
      assertEquals(expected.getValues()[4], actual.getValues()[4]);
      assertEquals(expected.getValues()[5], actual.getValues()[5]);

    }
View Full Code Here

Examples of com.pardot.rhombus.cobject.statement.CQLStatement

      UUID uuid = UUID.fromString("ada375b0-a2d9-11e2-99a3-3f36d3955e43");
      CQLStatementIterator actual = Subject.makeCQLforGet(KEYSPACE_NAME, def, uuid);
      assertEquals("Static gets should return bounded query iterator", true,actual.isBounded());
      assertEquals("Static gets should return an iterator with 1 statement", 1,actual.size());
      Object[] expectedValues = {uuid};
      CQLStatement expected = CQLStatement.make("SELECT * FROM \"testspace\".\"testtype\" WHERE id = ?;", TABLE_NAME, expectedValues);
      assertEquals("Should generate proper CQL for static table get by ID", expected, toList(actual).get(0));

      CObjectShardList shardIdLists = new ShardListMock(Arrays.asList(1L,2L,3L,4L,5L));
      UUID start = UUID.fromString("a8a2abe0-a251-11e2-bcbb-adf1a79a327f");
      UUID stop = UUID.fromString("ada375b0-a2d9-11e2-99a3-3f36d3955e43");
      //Wide table using shardIdList and therefore bounded
      TreeMap<String,Object> indexkeys = Maps.newTreeMap();
      indexkeys.put("foreignid","777");
      indexkeys.put("type", "5");
      indexkeys.put("instance", "222222");
      actual = CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, def, indexkeys, CObjectOrdering.DESCENDING, null, UUIDs.startOf(DateTime.now().getMillis()), 10l, false, false, false);
      expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id < ? ORDER BY id DESC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(1),"777","222222","5", stop)
      );
      CQLStatement result = actual.next();
      assertEquals(expected.getQuery(), result.getQuery());
      assertEquals(expected.getValues()[0], result.getValues()[0]);
      assertEquals(expected.getValues()[1], result.getValues()[1]);
      assertEquals(expected.getValues()[2], result.getValues()[2]);
      assertEquals(expected.getValues()[3], result.getValues()[3]);

      //expected = "SELECT * FROM \"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = 2 AND foreignid = 777 AND instance = 222222 AND type = 5 AND id <";
      expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id < ? ORDER BY id DESC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          Arrays.asList(Long.valueOf(2),"777","222222","5", stop).toArray()
      );

      actual.nextShard();
      result = actual.next();
      assertEquals(expected.getQuery(), result.getQuery());
      assertEquals(expected.getValues()[0], result.getValues()[0]);
      assertEquals(expected.getValues()[1], result.getValues()[1]);
      assertEquals(expected.getValues()[2], result.getValues()[2]);
      assertEquals(expected.getValues()[3], result.getValues()[3]);
      assertEquals("Should be bounded query list", true, actual.isBounded());


      //Wide table exclusive slice bounded query should not use shard list
      indexkeys = Maps.newTreeMap();
      indexkeys.put("foreignid","777");
      indexkeys.put("type", "5");
      indexkeys.put("instance", "222222");
      actual = CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, def, indexkeys, CObjectOrdering.DESCENDING, start, stop, 10l, false, false, false);
      expected = CQLStatement.make(
          "SELECT * FROM \"testspace\".\"testtypef9bf3332bb4ec879849ec43c67776131\" WHERE shardid = ? AND foreignid = ? AND instance = ? AND type = ? AND id > ? AND id < ? ORDER BY id DESC LIMIT 10 ALLOW FILTERING;",
          TABLE_NAME,
          arrayFromValues(Long.valueOf(160),"777","222222","5", start, stop)
      );
      //"Should generate proper CQL for wide table get by index values"
      CQLStatement actualStatement = actual.next();
      assertEquals(expected, actualStatement);
      assertTrue("Should be bounded query iterator", actual.isBounded());
      assertTrue("Should be none remaining in the iterator", !actual.hasNext());


View Full Code Here

Examples of org.apache.cassandra.cql.CQLStatement

        if (logger.isDebugEnabled()) logger.debug("execute_prepared_cql_query");

        ClientState cState = state();
        if (cState.getCQLVersion().major == 2)
        {
            CQLStatement statement = cState.getPrepared().get(itemId);

            if (statement == null)
                throw new InvalidRequestException(String.format("Prepared query with ID %d not found", itemId));
            logger.trace("Retrieved prepared statement #{} with {} bind markers", itemId, statement.boundTerms);

            return QueryProcessor.processPrepared(statement, cState, bindVariables);
        }
        else
        {
            org.apache.cassandra.cql3.CQLStatement statement = cState.getCQL3Prepared().get(itemId);

            if (statement == null)
                throw new InvalidRequestException(String.format("Prepared query with ID %d not found", itemId));
            logger.trace("Retrieved prepared statement #{} with {} bind markers", itemId, statement.getBoundsTerms());

            return org.apache.cassandra.cql3.QueryProcessor.processPrepared(statement, cState, bindVariables);
        }
    }
View Full Code Here

Examples of org.apache.cassandra.cql.CQLStatement

        }

        try
        {
            ThriftClientState cState = state();
            CQLStatement statement = cState.getPrepared().get(itemId);

            if (statement == null)
                throw new InvalidRequestException(String.format("Prepared query with ID %d not found", itemId));
            logger.trace("Retrieved prepared statement #{} with {} bind markers", itemId, statement.boundTerms);
View Full Code Here

Examples of org.apache.cassandra.cql.CQLStatement

        if (logger.isDebugEnabled()) logger.debug("execute_prepared_cql_query");

        ClientState cState = state();
        if (cState.getCQLVersion().major == 2)
        {
            CQLStatement statement = cState.getPrepared().get(itemId);

            if (statement == null)
                throw new InvalidRequestException(String.format("Prepared query with ID %d not found", itemId));
            logger.trace("Retrieved prepared statement #{} with {} bind markers", itemId, statement.boundTerms);

            return QueryProcessor.processPrepared(statement, cState, bindVariables);
        }
        else
        {
            org.apache.cassandra.cql3.CQLStatement statement = cState.getCQL3Prepared().get(itemId);

            if (statement == null)
                throw new InvalidRequestException(String.format("Prepared query with ID %d not found", itemId));
            logger.trace("Retrieved prepared statement #{} with {} bind markers", itemId, statement.getBoundsTerms());

            return org.apache.cassandra.cql3.QueryProcessor.processPrepared(statement, cState, bindVariables);
        }
    }
View Full Code Here

Examples of org.apache.cassandra.cql.CQLStatement

        if (logger.isDebugEnabled()) logger.debug("execute_prepared_cql_query");

        ClientState cState = state();
        if (cState.getCQLVersion().major == 2)
        {
            CQLStatement statement = cState.getPrepared().get(itemId);

            if (statement == null)
                throw new InvalidRequestException(String.format("Prepared query with ID %d not found", itemId));
            logger.trace("Retrieved prepared statement #{} with {} bind markers", itemId, statement.boundTerms);

            return QueryProcessor.processPrepared(statement, cState, bindVariables);
        }
        else
        {
            org.apache.cassandra.cql3.CQLStatement statement = cState.getCQL3Prepared().get(itemId);

            if (statement == null)
                throw new InvalidRequestException(String.format("Prepared query with ID %d not found", itemId));
            logger.trace("Retrieved prepared statement #{} with {} bind markers", itemId, statement.getBoundsTerms());

            return org.apache.cassandra.cql3.QueryProcessor.processPrepared(statement, cState, bindVariables);
        }
    }
View Full Code Here

Examples of org.apache.cassandra.cql.CQLStatement

        }

        try
        {
            ThriftClientState cState = state();
            CQLStatement statement = cState.getPrepared().get(itemId);

            if (statement == null)
                throw new InvalidRequestException(String.format("Prepared query with ID %d not found", itemId));
            logger.trace("Retrieved prepared statement #{} with {} bind markers", itemId, statement.boundTerms);
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.