Beispiel #1
0
 /**
  * 获取SQL类型
  *
  * @param sql
  * @return
  */
 private int getSqlType(String sql) {
   int sqlType = ServerParse.parse(sql);
   return sqlType & 0xFF;
 }
Beispiel #2
0
 @Override
 public void execute(String sql) {
   int sqlType = ServerParse.parse(sql);
   MysqlResponseCallback cb = new MysqlResponseCallback() {};
   org.opencloudb.mysql.client.MysqlClient.query(dataNode, sqlType, sql, 1, TimeUnit.SECONDS, cb);
 }