Skip to content

Commit

Permalink
Add dummy version
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbuda committed Aug 9, 2024
1 parent 4469f6a commit 39c3f8b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <cstdint>
#include <ios>
#include <iostream>
#include <ostream>
#include <string>
#include <string_view>
#include <type_traits>
Expand Down Expand Up @@ -336,6 +337,14 @@ void PrintValue(std::ostream &os, const mg_duration *duration) {
os << "S";
}

// TODO(gitbuda): Align with whatever is Memgraph outputting.
void PrintValue(std::ostream &os, const mg_point_2d *value) {
os << "SRID: " << mg_point_2d_srid(value) << " X: " << mg_point_2d_x(value) << " Y: " << mg_point_2d_y(value);
}
void PrintValue(std::ostream &os, const mg_point_3d *value) {
os << "SRID: " << mg_point_3d_srid(value) << " X: " << mg_point_3d_x(value) << " Y: " << mg_point_3d_y(value) << " Z: " << mg_point_3d_z(value);
}

void PrintValue(std::ostream &os, const mg_value *value) {
switch (mg_value_get_type(value)) {
case MG_VALUE_TYPE_NULL:
Expand Down Expand Up @@ -383,6 +392,12 @@ void PrintValue(std::ostream &os, const mg_value *value) {
case MG_VALUE_TYPE_DURATION:
PrintValue(os, mg_value_duration(value));
return;
case MG_VALUE_TYPE_POINT_2D:
PrintValue(os, mg_value_point_2d(value));
return;
case MG_VALUE_TYPE_POINT_3D:
PrintValue(os, mg_value_point_3d(value));
return;
default:
os << "{unknown value}";
break;
Expand Down

0 comments on commit 39c3f8b

Please sign in to comment.