Package com.youtube.vitess.vtgate.BatchQuery

Examples of com.youtube.vitess.vtgate.BatchQuery.BatchQueryBuilder


    int rowsPerShard = 5;
    for (String shardName : testEnv.shardKidMap.keySet()) {
      Util.insertRowsInShard(testEnv, shardName, rowsPerShard);
    }
    VtGate vtgate = VtGate.connect("localhost:" + testEnv.port, 0);
    BatchQuery query = new BatchQueryBuilder(testEnv.keyspace, "master")
        .addSqlAndBindVars("select * from vtgate_test where id = 3", null).addSqlAndBindVars(
            "select * from vtgate_test where id = :id",
            Lists.newArrayList(BindVariable.forULong("id", UnsignedLong.valueOf("4"))))
        .withKeyspaceIds(testEnv.getAllKeyspaceIds()).build();
    List<Long> expected = Lists.newArrayList(3L, 3L, 4L, 4L);
View Full Code Here

TOP

Related Classes of com.youtube.vitess.vtgate.BatchQuery.BatchQueryBuilder

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.