| 1092 | } |
| 1093 | |
| 1094 | JSONCONS_VISITOR_RETURN_TYPE visit_int64(int64_t val, |
| 1095 | semantic_tag, |
| 1096 | const ser_context&, |
| 1097 | std::error_code&) override |
| 1098 | { |
| 1099 | JSONCONS_ASSERT(!stack_.empty()); |
| 1100 | switch (stack_.back().item_kind_) |
| 1101 | { |
| 1102 | case stack_item_kind::flat_object: |
| 1103 | case stack_item_kind::object: |
| 1104 | { |
| 1105 | if (stack_[0].count_ == 0) |
| 1106 | { |
| 1107 | if (!has_column_mapping_) |
| 1108 | { |
| 1109 | string_type str = stack_.back().column_path_; |
| 1110 | column_paths_.emplace_back(str); |
| 1111 | column_path_value_map_.emplace(std::move(str), string_type{alloc_}); |
| 1112 | } |
| 1113 | } |
| 1114 | auto it = column_path_value_map_.find(stack_.back().column_path_); |
| 1115 | if (it != column_path_value_map_.end()) |
| 1116 | { |
| 1117 | write_int64_value(val, it->second); |
| 1118 | } |
| 1119 | break; |
| 1120 | } |
| 1121 | case stack_item_kind::flat_row: |
| 1122 | case stack_item_kind::row: |
| 1123 | { |
| 1124 | append_array_path_component(); |
| 1125 | auto it = column_path_value_map_.find(stack_.back().column_path_); |
| 1126 | if (it != column_path_value_map_.end()) |
| 1127 | { |
| 1128 | write_int64_value(val, it->second); |
| 1129 | } |
| 1130 | break; |
| 1131 | } |
| 1132 | case stack_item_kind::stream_flat_row: |
| 1133 | { |
| 1134 | if (stack_.back().count_ > 0) |
| 1135 | { |
| 1136 | sink_.push_back(field_delimiter_); |
| 1137 | } |
| 1138 | value_buffer_.clear(); |
| 1139 | write_int64_value(val, value_buffer_); |
| 1140 | sink_.append(value_buffer_.data(), value_buffer_.size()); |
| 1141 | break; |
| 1142 | } |
| 1143 | case stack_item_kind::column_multivalued_field: |
| 1144 | case stack_item_kind::multivalued_field: |
| 1145 | case stack_item_kind::stream_multivalued_field: |
| 1146 | { |
| 1147 | if (!value_buffer_.empty()) |
| 1148 | { |
| 1149 | value_buffer_.push_back(subfield_delimiter_); |
| 1150 | } |
| 1151 | write_int64_value(val, value_buffer_); |
nothing calls this directly
no test coverage detected