1#ifndef SQL_GIS_GEOMETRY_EXTRACTION_H_INCLUDED
2#define SQL_GIS_GEOMETRY_EXTRACTION_H_INCLUDED
84template <
typename FieldOrItem>
86 const char *func_name) {
92 if (fieldOrItem->is_null()) {
95 String *arg_wkb = fieldOrItem->val_str(&backing_arg_wkb);
99 if (
nullptr == arg_wkb) {
104 std::unique_ptr<dd::cache::Dictionary_client::Auto_releaser> releaser(
108 std::unique_ptr<gis::Geometry> geo;
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
dd::cache::Dictionary_client * dd_client() const
Definition: sql_class.h:982
bool is_error() const
true if there is an error in the error stack.
Definition: sql_class.h:3227
a nullable SQL value.
Definition: sql_value.h:40
virtual Object_id id() const =0
The unique dictionary object id.
Definition: spatial_reference_system.h:53
Class to help releasing and deleting objects.
Definition: dictionary_client.h:177
thread_local THD * current_thd
Definition: current_thd.cc:26
This file declares the geometry class hierarchy used by the server as the internal representation of ...
void my_error(int nr, myf MyFlags,...)
Fill in and print a previously registered error message.
Definition: my_error.cc:216
#define MYF(v)
Definition: my_inttypes.h:97
Common header for many mysys elements.
bool parse_geometry(THD *thd, const char *func_name, const String *str, const dd::Spatial_reference_system **srs, std::unique_ptr< Geometry > *geometry, bool treat_unknown_srid_as_cartesian)
Parses a little-endian geometry string (SRID + WKB).
Definition: wkb.cc:437
std::uint32_t srid_t
A spatial reference system ID (SRID).
Definition: srid.h:33
Definition: gcs_xcom_synode.h:64
@ STRING_RESULT
not valid for UDFs
Definition: udf_registration_types.h:41