MySQL 9.1.0
Source Code Documentation
table_function.cc File Reference
#include "sql/table_function.h"
#include <string.h>
#include <memory>
#include <new>
#include <utility>
#include "field_types.h"
#include "my_sys.h"
#include "mysql/components/services/bits/psi_bits.h"
#include "mysql/strings/m_ctype.h"
#include "mysql_com.h"
#include "mysqld_error.h"
#include "prealloced_array.h"
#include "sql-common/json_dom.h"
#include "sql-common/json_error_handler.h"
#include "sql-common/json_path.h"
#include "sql/current_thd.h"
#include "sql/error_handler.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/item.h"
#include "sql/item_json_func.h"
#include "sql/psi_memory_key.h"
#include "sql/sql_class.h"
#include "sql/sql_exception_handler.h"
#include "sql/sql_list.h"
#include "sql/sql_show.h"
#include "sql/sql_table.h"
#include "sql/sql_tmp_table.h"
#include "sql/table.h"
#include "sql/thd_raii.h"
#include "sql_string.h"
#include "string_with_len.h"

Functions

void print_on_empty_or_error (const THD *thd, String *str, enum_query_type query_type, bool on_empty, Json_on_response_type response_type, const Item *default_string)
 Print ON EMPTY or ON ERROR clauses. More...
 
static bool print_json_table_column_type (const Field *field, String *str)
 Prints the type of a column in a JSON_TABLE expression. More...
 
static bool print_nested_path (const THD *thd, const TABLE *table, const Json_table_column *col, enum_query_type query_type, String *str)
 Helper function to print a single NESTED PATH column. More...
 

Function Documentation

◆ print_json_table_column_type()

static bool print_json_table_column_type ( const Field field,
String str 
)
static

Prints the type of a column in a JSON_TABLE expression.

◆ print_nested_path()

static bool print_nested_path ( const THD thd,
const TABLE table,
const Json_table_column col,
enum_query_type  query_type,
String str 
)
static

Helper function to print a single NESTED PATH column.

Parameters
thdthe current session
tablethe TABLE object representing the JSON_TABLE expression
colthe column to print
query_typethe type of the query
strthe string to print to
Returns
true on error, false on success

◆ print_on_empty_or_error()

void print_on_empty_or_error ( const THD thd,
String str,
enum_query_type  query_type,
bool  on_empty,
Json_on_response_type  response_type,
const Item default_string 
)

Print ON EMPTY or ON ERROR clauses.

Parameters
thdthread handler
strthe string to print to
query_typeformatting options
on_emptytrue for ON EMPTY, false for ON ERROR
response_typethe type of the ON ERROR/ON EMPTY response
default_stringthe default string in case of DEFAULT type