Package com.youtube.vitess.vtgate

Examples of com.youtube.vitess.vtgate.VtGate.execute()


    // Check 20 rows exist per shard
    for (String shardName : testEnv.shardKidMap.keySet()) {
      Query shardRows = new QueryBuilder(selectSql, testEnv.keyspace, "master").setKeyspaceIds(
          testEnv.getKeyspaceIds(shardName)).build();
      cursor = vtgate.execute(shardRows);
      Assert.assertEquals(count, cursor.getRowsAffected());
    }

    vtgate.close();
  }
View Full Code Here


        .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);
    List<Cursor> cursors = vtgate.execute(query);
    List<Long> actual = new ArrayList<>();
    for (Cursor cursor : cursors) {
      for (Row row : cursor) {
        actual.add(row.getULong("id").longValue());
      }
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.