Package com.datastax.driver.core

Examples of com.datastax.driver.core.ResultSet$FetchingState


    Cluster cluster = Cluster.builder()
        .addContactPoints("127.0.0.1")
            .withPort(9142)
        .build();
    Session session = cluster.connect("cassandra_unit_keyspace");
    ResultSet result = session.execute("select * from testCQLTable WHERE id=1690e8da-5bf8-49e8-9583-4dff8a570737");
    String val = result.iterator().next().getString("value");
    assertEquals("Cql loaded string", val);
  }
View Full Code Here


    public void should_work_twice() {
        test();
    }

    private void test() {
        ResultSet result = dummyCassandraConnector.getSession().execute("select * from testCQLTable1 WHERE id=1690e8da-5bf8-49e8-9583-4dff8a570717");
        String val = result.iterator().next().getString("value");
        assertEquals("1- Cql loaded string", val);
    }
View Full Code Here

                "keyspaceCreation=" + dataSet.isKeyspaceCreation() +
                ";keyspaceName=" + keyspaceName);

        if (dataSet.isKeyspaceDeletion()) {
            String selectQuery = "SELECT keyspace_name FROM system.schema_keyspaces where keyspace_name='" + keyspaceName + "'";
            ResultSet keyspaceQueryResult = session.execute(selectQuery);
            if (keyspaceQueryResult.iterator().hasNext()) {
                String dropQuery = "DROP KEYSPACE " + keyspaceName;
                log.debug("executing : " + dropQuery);
                session.execute(dropQuery);
            }
        }
View Full Code Here

    public CassandraCQLUnit cassandraCQLUnit = new CassandraCQLUnit(new ClassPathCQLDataSet("cql/statementsWithBlankEndings.cql", "mykeyspace"));


    @Test
  public void testCQLDataAreInPlace() throws Exception {
        ResultSet result = cassandraCQLUnit.session.execute("select * from testCQLTable WHERE id=1690e8da-5bf8-49e8-9583-4dff8a570737");

        String val = result.iterator().next().getString("value");
        assertEquals("Cql loaded string",val);
  }
View Full Code Here

        test();

    }

    private void test() {
        ResultSet result = getSession().execute("select * from testCQLTable WHERE id=1690e8da-5bf8-49e8-9583-4dff8a570737");

        String val = result.iterator().next().getString("value");
        assertEquals("Cql loaded string",val);
    }
View Full Code Here

        com.datastax.driver.core.Cluster cluster =
                new com.datastax.driver.core.Cluster.Builder().addContactPoints(host).withPort(Integer.parseInt(port)).build();
        Session session = cluster.connect();

        ResultSet result = session.execute("select * from mykeyspace.testCQLTable WHERE id=1690e8da-5bf8-49e8-9583-4dff8a570737");
        String val = result.iterator().next().getString("value");
        Assert.assertThat("Cql loaded string",is(val));

        EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
    }
View Full Code Here

        test();

    }

    private void test() {
        ResultSet result = cassandraCQLUnit.session.execute("select * from testCQLTable WHERE id=1690e8da-5bf8-49e8-9583-4dff8a570737");

        String val = result.iterator().next().getString("value");
        assertEquals("Cql loaded string",val);
    }
View Full Code Here

        test();

    }

    private void test() {
        ResultSet result = cassandraCQLUnit.session.execute("SELECT * FROM testCQLTable WHERE id=1690e8da-5bf8-49e8-9583-4dff8a570737");

        String val = result.iterator().next().getString("value");
        assertEquals("Cql loaded string",val);
    }
View Full Code Here

        test();

    }

    private void test() {
        ResultSet result = cassandraCQLUnit.session.execute("select * from testCQLTable WHERE id=1690e8da-5bf8-49e8-9583-4dff8a570737");

        String val = result.iterator().next().getString("value");
        assertEquals("Cql loaded string",val);
    }
View Full Code Here

    assertNotNull(definition2);
    cm.buildKeyspace(definition2, false);

    //Select from the newly created table
    ObjectMapper om = cm.getObjectMapper(definition2);
    ResultSet rs = om.getCqlExecutor().executeSync(CQLStatement.make("SELECT * FROM testtype3cb23c7ffc4256283064bd5eae1886b4", "testtype"));
    assertEquals(0, rs.all().size());

    cm.teardown();
  }
View Full Code Here

TOP

Related Classes of com.datastax.driver.core.ResultSet$FetchingState

Copyright © 2018 www.massapicom. 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.