| 134 | } |
| 135 | |
| 136 | bool RowBuilder::Check(uint32_t index, ::fedb::type::DataType type) { |
| 137 | if ((int32_t)index >= schema_.size()) { |
| 138 | return false; |
| 139 | } |
| 140 | const ::fedb::common::ColumnDesc& column = schema_.Get(index); |
| 141 | if (column.data_type() != type) { |
| 142 | return false; |
| 143 | } |
| 144 | if (TYPE_SET.find(column.data_type()) == TYPE_SET.end()) { |
| 145 | return false; |
| 146 | } |
| 147 | return true; |
| 148 | } |
| 149 | |
| 150 | bool RowBuilder::AppendDate(int32_t date) { |
| 151 | if (!SetDate(cnt_, date)) return false; |