| 1165 | } |
| 1166 | |
| 1167 | JSONCONS_VISITOR_RETURN_TYPE visit_uint64(uint64_t val, |
| 1168 | semantic_tag, |
| 1169 | const ser_context&, |
| 1170 | std::error_code&) override |
| 1171 | { |
| 1172 | JSONCONS_ASSERT(!stack_.empty()); |
| 1173 | switch (stack_.back().item_kind_) |
| 1174 | { |
| 1175 | case stack_item_kind::flat_object: |
| 1176 | case stack_item_kind::object: |
| 1177 | { |
| 1178 | if (stack_[0].count_ == 0) |
| 1179 | { |
| 1180 | if (!has_column_mapping_) |
| 1181 | { |
| 1182 | string_type str = stack_.back().column_path_; |
| 1183 | column_paths_.emplace_back(str); |
| 1184 | column_path_value_map_.emplace(std::move(str), string_type{alloc_}); |
| 1185 | } |
| 1186 | } |
| 1187 | auto it = column_path_value_map_.find(stack_.back().column_path_); |
| 1188 | if (it != column_path_value_map_.end()) |
| 1189 | { |
| 1190 | write_uint64_value(val, it->second); |
| 1191 | } |
| 1192 | break; |
| 1193 | } |
| 1194 | case stack_item_kind::flat_row: |
| 1195 | case stack_item_kind::row: |
| 1196 | { |
| 1197 | append_array_path_component(); |
| 1198 | auto it = column_path_value_map_.find(stack_.back().column_path_); |
| 1199 | if (it != column_path_value_map_.end()) |
| 1200 | { |
| 1201 | write_uint64_value(val, it->second); |
| 1202 | } |
| 1203 | break; |
| 1204 | } |
| 1205 | case stack_item_kind::stream_flat_row: |
| 1206 | { |
| 1207 | if (stack_.back().count_ > 0) |
| 1208 | { |
| 1209 | sink_.push_back(field_delimiter_); |
| 1210 | } |
| 1211 | value_buffer_.clear(); |
| 1212 | write_uint64_value(val, value_buffer_); |
| 1213 | sink_.append(value_buffer_.data(), value_buffer_.size()); |
| 1214 | break; |
| 1215 | } |
| 1216 | case stack_item_kind::multivalued_field: |
| 1217 | case stack_item_kind::column_multivalued_field: |
| 1218 | case stack_item_kind::stream_multivalued_field: |
| 1219 | { |
| 1220 | if (!value_buffer_.empty()) |
| 1221 | { |
| 1222 | value_buffer_.push_back(subfield_delimiter_); |
| 1223 | } |
| 1224 | write_uint64_value(val, value_buffer_); |
nothing calls this directly
no test coverage detected