Package com.taobao.tdhs.client.request

Examples of com.taobao.tdhs.client.request.Get


    private final String[] fields = {"id", "name", "level"};

    @Test
    public void testTenThousand() throws TDHSException {
        TableInfo tableInfo = new TableInfo(db, table, null, fields);
        Get get = new Get(tableInfo, new String[][]{{"-1"}},
                TDHSCommon.FindFlag.TDHS_GE, 0, 10000);
        TDHSResponse r = client.count(get);
        Assert.assertEquals(TDHSResponseEnum.ClientStatus.OK, r.getStatus());
        Assert.assertEquals(1, r.getFieldData().size());
        Assert.assertEquals("10000", r.getFieldData().get(0).get(0));
View Full Code Here


    @Test
    public void testHundredThousand() throws TDHSException {
        TableInfo tableInfo = new TableInfo(db, table, null,
                new String[]{fields[0]});
        Get get = new Get(tableInfo, new String[][]{{"-1"}},
                TDHSCommon.FindFlag.TDHS_GE, 0, 100000);
        TDHSResponse r = client.count(get);
        Assert.assertEquals(TDHSResponseEnum.ClientStatus.OK, r.getStatus());
        Assert.assertEquals(1, r.getFieldData().size());
        Assert.assertEquals("100000", r.getFieldData().get(0).get(0));
View Full Code Here

    private final String[] fields = {"id", "name", "level"};

    @Test
    public void testTenThousand() throws TDHSException {
        TableInfo tableInfo = new TableInfo(db, table, null, fields);
        Get get = new Get(tableInfo, new String[][]{{"-1"}},
                FindFlag.TDHS_GE, 0, 10000);
        TDHSResponse r = client.get(get);
        Assert.assertEquals(ClientStatus.OK, r.getStatus());
        Assert.assertEquals(10000, r.getFieldData().size());
    }
View Full Code Here

    @Test
    public void testHundredThousand() throws TDHSException {
        TableInfo tableInfo = new TableInfo(db, table, null,
                new String[]{fields[0]});
        Get get = new Get(tableInfo, new String[][]{{"-1"}},
                FindFlag.TDHS_GE, 0, 100000);
        TDHSResponse r = client.get(get);
        Assert.assertEquals(ClientStatus.OK, r.getStatus());
        Assert.assertEquals(100000, r.getFieldData().size());
    }
View Full Code Here

    private final Statement statement;

    public QueryImpl(Statement statement) {
        this.statement = statement;
        this.get = new Get(new TableInfo());
        this.update = new Update(this.get);
        this.where = new WhereImpl(get, this);
        this.and = new AndImpl(get, this);
        this.set = new SetImpl(get, update, this);
    }
View Full Code Here

TOP

Related Classes of com.taobao.tdhs.client.request.Get

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.