YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
class Json_table_nested_path : public Sql_alloc
{ public:
json_path_t m_path; /* The JSON Path to get the rows from */ bool m_null; // TRUE <=> producing a NULL-complemented row.
/*** Methods for performing a scan ***/ void scan_start(CHARSET_INFO *i_cs, const uchar *str, const uchar *end); int scan_next(); void init_json_engine(); bool check_error(constchar *str);
/*** Members for getting the values we've scanned to ***/ const uchar *get_value() { return m_engine.value_begin; } const uchar *get_value_end() { return m_engine.s.str_end; }
/* Counts the rows produced. Used by FOR ORDINALITY columns */
longlong m_ordinality_counter;
int print(THD *thd, Field ***f, String *str,
List_iterator_fast<Json_table_column> &it,
Json_table_column **last_column); private: /* The head of the list of nested NESTED PATH statements. */
Json_table_nested_path *m_nested;
/* in the above list items are linked with the */
Json_table_nested_path *m_next_nested;
/*** Members describing NESTED PATH structure ***/ /* Parent nested path. The "root" path has this NULL */
Json_table_nested_path *m_parent;
/*** Members describing current JSON Path scan state ***/ /* The JSON Parser and JSON Path evaluator */
json_engine_t m_engine;
/* The path the parser is currently pointing to */
json_path_t m_cur_path;
/* The child NESTED PATH we're currently scanning */
Json_table_nested_path *m_cur_nested;
class Table_function_json_table : public Sql_alloc
{ public: /*** Basic properties of the original JSON_TABLE(...) ***/
Item *m_json; /* The JSON value to be parsed. */
/* The COLUMNS(...) part representation. */
Json_table_nested_path m_nested_path;
/* The list of table column definitions. */
List<Json_table_column> m_columns;
int print(THD *thd, TABLE_LIST *sql_table,
String *str, enum_query_type query_type);
/*** Construction interface to be used from the parser ***/
Table_function_json_table(Item *json):
m_json(json),
m_context_setup_done(false)
{
cur_parent= &m_nested_path;
last_sibling_hook= &m_nested_path.m_nested;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.