1#ifndef SQL_GIS_GEOMETRY_EXTRACTION_H_INCLUDED
2#define SQL_GIS_GEOMETRY_EXTRACTION_H_INCLUDED
85template <
typename FieldOrItem>
87 const char *func_name) {
93 if (fieldOrItem->is_null()) {
96 String *arg_wkb = fieldOrItem->val_str(&backing_arg_wkb);
100 if (
nullptr == arg_wkb) {
105 std::unique_ptr<dd::cache::Dictionary_client::Auto_releaser> releaser(
109 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:167
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
dd::cache::Dictionary_client * dd_client() const
Definition: sql_class.h:1002
bool is_error() const
true if there is an error in the error stack.
Definition: sql_class.h:3281
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
Definition: gcs_xcom_synode.h:64
@ STRING_RESULT
not valid for UDFs
Definition: udf_registration_types.h:41
This file declares the interface of the WKB parser for geometries and the parser for the internal geo...