MCPcopy Create free account
hub / github.com/MariaDB/server / append_json_points

Function append_json_points

sql/spatial.cc:994–1011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

992*/
993
994static const char *append_json_points(String *txt, uint max_dec,
995 uint32 n_points, const char *data, uint32 offset)
996{
997 bool any_points= false;
998 txt->qs_append('[');
999 while (n_points--)
1000 {
1001 any_points= true;
1002 data+= offset;
1003 append_json_point(txt, max_dec, data);
1004 data+= POINT_DATA_SIZE;
1005 txt->qs_append(", ", 2);
1006 }
1007 if (any_points)
1008 txt->length(txt->length() - 2);// Remove ending ', '
1009 txt->qs_append(']');
1010 return data;
1011}
1012/*
1013 Get most bounding rectangle (mbr) for X points
1014

Callers 1

get_data_as_jsonMethod · 0.85

Calls 3

append_json_pointFunction · 0.85
qs_appendMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected