Examples of prepareQuery()


Examples of com.esri.sde.sdk.client.SeQuery.prepareQuery()

        @Override
        public SeQuery execute(final ISession session, final SeConnection connection)
                throws SeException, IOException {
            SeQuery query = new SeQuery(connection, propertyNames, sql);
            query.prepareQuery();
            query.execute();
            return query;
        }

    }
View Full Code Here

Examples of com.netflix.astyanax.Keyspace.prepareQuery()

            mutation.withRow(cf, "mykey").putColumn(makeStringComposite("fzz", "baz"), "It is snowing");

            mutation.execute();

            // simple column fetch
            ColumnFamilyQuery<String, Composite> query = ks.prepareQuery(cf);
            Column<Composite> result = query.getKey("mykey").getColumn(makeStringComposite("foo", "bar")).execute()
                    .getResult();
            LOG.debug(result.getStringValue());

            // build up a composite range query
View Full Code Here

Examples of com.netflix.astyanax.Keyspace.prepareQuery()

            Composite start = makeStringEqualityComposite(new String[] { "a", "a", "a"}, new ComponentEquality[] {
                    ComponentEquality.EQUAL,ComponentEquality.EQUAL, ComponentEquality.EQUAL });
            Composite end = makeStringEqualityComposite(new String[] { "a", "a", "b"}, new ComponentEquality[] {
                    ComponentEquality.EQUAL,ComponentEquality.EQUAL, ComponentEquality.EQUAL });

            ColumnFamilyQuery<String, Composite> query = ks.prepareQuery(cf);
            ColumnList<Composite> results = query.getKey(rowkey)
                    .withColumnRange(start.serialize(), end.serialize(), false, 100).execute().getResult();
            LOG.debug("Query matched {} results.", results.size());
            for (Composite columnKey : results.getColumnNames()) {
//                LOG.debug("Component(0): {}", columnKey.getComponent(0).getValue(StringSerializer.get()));
View Full Code Here

Examples of com.netflix.astyanax.Keyspace.prepareQuery()

        Thread.sleep(250);

        AstyanaxContext<Keyspace> astyContext = newContext("localhost:9160", KEYSPACE);
        Keyspace ks = astyContext.getEntity();

        Column<String> result = ks
                .prepareQuery(new ColumnFamily<String, String>("users", StringSerializer.get(), StringSerializer.get()))
                .getKey("42").getColumn("VALUE").execute().getResult();
        assertEquals("42", result.getStringValue());

    }
View Full Code Here

Examples of com.netflix.astyanax.Keyspace.prepareQuery()

        Thread.sleep(250);

        AstyanaxContext<Keyspace> astyContext = newContext("localhost:9160", KEYSPACE);
        Keyspace ks = astyContext.getEntity();

        Column<String> result = ks
                .prepareQuery(
                        new ColumnFamily<String, String>("Counts", StringSerializer.get(), StringSerializer.get()))
                .getKey("1").getColumn("MyCountColumn").execute().getResult();
        assertEquals(1L, result.getLongValue());
    }
View Full Code Here

Examples of com.netflix.astyanax.Keyspace.prepareQuery()

        client.writeTuple(tuple, tupleMapper);

        AstyanaxContext<Keyspace> context = newContext("localhost:9160", KEYSPACE);
        Keyspace ks = context.getEntity();

        Column<String> result = ks
                .prepareQuery(
                        new ColumnFamily<SimpleComposite, String>("simple",
                                new AnnotatedCompositeSerializer<SimpleComposite>(SimpleComposite.class),
                                StringSerializer.get())).getKey(new SimpleComposite("key1val", "key2val"))
                .getColumn("foo").execute().getResult();
View Full Code Here

Examples of com.netflix.astyanax.Keyspace.prepareQuery()

 
  private RowQuery createBasicRowQuery(byte[] rowKey, Info info1, ByteBufferRange range) {
    ColumnFamily cf = info1.getColumnFamilyObj();
   
    Keyspace keyspace = columnFamilies.getKeyspace();
    ColumnFamilyQuery query = keyspace.prepareQuery(cf);
    //ColumnFamilyQuery query = query1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
    RowQuery rowQuery = query.getKey(rowKey)
              .autoPaginate(true)
              .withColumnRange(range);
    return rowQuery;
View Full Code Here

Examples of com.netflix.astyanax.Keyspace.prepareQuery()

                                                    try {
                                                        ColumnList<Long> srcData = srcKeyspace.prepareQuery(columnFamily).getKey(locatorCapture)
                                                                .withColumnRange(range)
                                                                .execute()
                                                                .getResult();
                                                        ColumnList<Long> dstData = dstKeyspace.prepareQuery(columnFamily).getKey(locatorCapture)
                                                                .withColumnRange(range)
                                                                .execute()
                                                                .getResult();
                                                       
                                                        checkSameResults(srcData, dstData);
View Full Code Here

Examples of com.netflix.astyanax.Keyspace.prepareQuery()

 
  private RowQuery createBasicRowQuery(byte[] rowKey, Info info1, ByteBufferRange range) {
    ColumnFamily cf = info1.getColumnFamilyObj();
   
    Keyspace keyspace = columnFamilies.getKeyspace();
    ColumnFamilyQuery query = keyspace.prepareQuery(cf);
    //ColumnFamilyQuery query = query1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
    RowQuery rowQuery = query.getKey(rowKey)
              .autoPaginate(true)
              .withColumnRange(range);
    return rowQuery;
View Full Code Here

Examples of com.netflix.astyanax.Keyspace.prepareQuery()

 
  private RowQuery createBasicRowQuery(byte[] rowKey, Info info1, ByteBufferRange range) {
    ColumnFamily cf = info1.getColumnFamilyObj();
   
    Keyspace keyspace = columnFamilies.getKeyspace();
    ColumnFamilyQuery query = keyspace.prepareQuery(cf);
    //ColumnFamilyQuery query = query1.setConsistencyLevel(ConsistencyLevel.CL_QUORUM);
    RowQuery rowQuery = query.getKey(rowKey)
              .autoPaginate(true)
              .withColumnRange(range);
    return rowQuery;
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.