Package com.youtube.vitess.vtgate

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


          .addBindVar(BindVariable.forTime("time_col", dateTime))
          .addKeyspaceId(kid)
          .build();
      vtgate.execute(query);
    }
    vtgate.commit();
    vtgate.close();
  }

  /**
   * Insert rows to a specific shard using ExecuteKeyspaceIds
View Full Code Here


          .addBindVar(BindVariable.forULong("keyspace_id", (UnsignedLong) kid.getId()))
          .addKeyspaceId(kid)
          .build();
      vtgate.execute(query);
    }
    vtgate.commit();
    vtgate.close();
  }

  public static void createTable(TestEnv testEnv) throws Exception {
    VtGate vtgate = VtGate.connect("localhost:" + testEnv.port, 0);
View Full Code Here

        + " keyspace_id bigint(20) unsigned NOT NULL, datetime_col DATETIME,"
        + " timestamp_col TIMESTAMP,  date_col DATE, time_col TIME, primary key (id))"
        + " Engine=InnoDB";
    vtgate.execute(new QueryBuilder(createTable, testEnv.keyspace, "master").setKeyspaceIds(
        testEnv.getAllKeyspaceIds()).build());
    vtgate.commit();
    vtgate.close();
  }

  /**
   * Wait until the specified tablet type has received at least rowCount rows in vtgate_test from
View Full Code Here

            .addKeyRange(kr)
            .build();
        vtgate.execute(query);
      }
    }
    vtgate.commit();
    vtgate.close();

    // Check 40 rows exist in total
    vtgate = VtGate.connect("localhost:" + testEnv.port, 0);
    String selectSql = "select * from vtgate_test";
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.