Package com.amazonaws.services.dynamodbv2.document

Examples of com.amazonaws.services.dynamodbv2.document.Table.query()


    }

    @Test
    public void simpleQuery() {
        Table table = dynamo.getTable(TABLE_NAME);
        ItemCollection<?> col = table.query(HASH_KEY_NAME, "foo",
            new RangeKeyCondition(RANGE_KEY_NAME).between(1, 10));
        int count = 0;
        for (Item item: col) {
            System.out.println(item);
            count++;
View Full Code Here


    }

    @Test
    public void howToUseQueryFilters() {
        Table table = dynamo.getTable(TABLE_NAME);
        ItemCollection<QueryOutcome> col = table.query(HASH_KEY_NAME, "foo",
            new RangeKeyCondition(RANGE_KEY_NAME).between(1, 10),
            new QueryFilter("intAttr").gt(1238));
        int count = 0;
        QueryOutcome lastOutcome = null;
        for (Item item: col) {
View Full Code Here

    }

    @Test
    public void howToUseFilterExpression() {
        Table table = dynamo.getTable(TABLE_NAME);
        ItemCollection<QueryOutcome> col = table.query(
            HASH_KEY_NAME, "foo",
            new RangeKeyCondition(RANGE_KEY_NAME).between(1, 10),
            // filter expression
            "intAttr > :intAttr",
            // no attribute name substitution
View Full Code Here

    }

    @Test
    public void howToUseFilterExpression_AttrNameSubstitution() {
        Table table = dynamo.getTable(TABLE_NAME);
        ItemCollection<?> col = table.query(
            HASH_KEY_NAME, "foo",
            new RangeKeyCondition(RANGE_KEY_NAME).between(1, 10),
            // filter expression with name substitution
            "#intAttr > :intAttr",
            // attribute name substitution
View Full Code Here

    }

    @Test
    public void howToUseProjectionExpression() {
        Table table = dynamo.getTable(TABLE_NAME);
        ItemCollection<?> col = table.query(
            HASH_KEY_NAME, "foo",
            new RangeKeyCondition(RANGE_KEY_NAME).between(1, 10),
            // filter expression
            "#intAttr > :intAttr",
            // projection expression
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.