Package com.github.youtube.vitess.jdbc.vtocc.QueryService

Examples of com.github.youtube.vitess.jdbc.vtocc.QueryService.Query


   * Called by Acolyte when it's time to do a query.
   */
  @Override
  public QueryResult whenSQLQuery(String sql, List<Parameter> parameters) throws SQLException {
    try {
      Query query = vtoccQueryFactory.create(sql, parameters);
      // TODO(timofeyb): provide rpc controller
      QueryService.QueryResult response = sqlQueryBlockingInterface
          .execute(rpcControllerProvider.get(), query);
      return acolyteRowListFactory.create(response).asResult();
    } catch (ServiceException e) {
View Full Code Here


   * Called by Acolyte when it's time to do a DML query.
   */
  @Override
  public UpdateResult whenSQLUpdate(String sql, List<Parameter> parameters) throws SQLException {
    try {
      Query query = vtoccQueryFactory.create(sql, parameters);

      // TODO(timofeyb): provide rpc controller
      QueryService.QueryResult response = sqlQueryBlockingInterface
          .execute(rpcControllerProvider.get(), query);
      return new UpdateResult((int) response.getRowsAffected());
View Full Code Here

TOP

Related Classes of com.github.youtube.vitess.jdbc.vtocc.QueryService.Query

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.