コード例 #1
0
ファイル: Count.java プロジェクト: xieyuan1988/tddl5
 @Override
 public void serverReduce(Object[] args, ExecutionContext ec) {
   DataType type = this.getReturnType();
   Object o = args[0];
   if (o != null) {
     count += (Long) type.convertFrom(o);
   }
 }
コード例 #2
0
ファイル: TResultSetMetaData.java プロジェクト: ninqing/tddl
  @Override
  public int getColumnType(int column) throws SQLException {
    column--;
    ColumnMeta c = this.columnMetas.get(column);

    DataType type = c.getDataType();

    if (type == null) {
      throw new SQLException("data type is null, column is: " + c);
    }

    return type.getSqlType();
  }