MySQL 8.0.39
Source Code Documentation
table_function.h File Reference
#include <assert.h>
#include <sys/types.h>
#include <array>
#include "my_inttypes.h"
#include "my_table_map.h"
#include "sql-common/json_dom.h"
#include "sql-common/json_path.h"
#include "sql/create_field.h"
#include "sql/enum_query_type.h"
#include "sql/mem_root_array.h"
#include "sql/psi_memory_key.h"
#include "sql/sql_const.h"
#include "sql/sql_list.h"
#include "sql/table.h"

Go to the source code of this file.

Classes

class  Table_function
 Class representing a table function. More...
 
class  JT_data_source
 JT_data_source is used as a data source. More...
 
class  Json_table_column
 Column description for JSON_TABLE function. More...
 
class  Table_function_json
 

Macros

#define MAX_NESTED_PATH   16
 

Enumerations

enum class  enum_jt_column { JTC_ORDINALITY , JTC_PATH , JTC_EXISTS , JTC_NESTED_PATH }
 Type of columns for JSON_TABLE function. More...
 
enum class  Json_on_response_type : uint16 { ERROR , NULL_VALUE , DEFAULT , IMPLICIT }
 Types of ON EMPTY/ON ERROR clauses for JSON_TABLE and JSON_VALUE. More...
 
enum  jt_skip_reason { JTS_NONE = 0 , JTS_EOD , JTS_SIBLING }
 Reason for skipping a NESTED PATH. More...
 

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...
 

Macro Definition Documentation

◆ MAX_NESTED_PATH

#define MAX_NESTED_PATH   16

Enumeration Type Documentation

◆ enum_jt_column

enum class enum_jt_column
strong

Type of columns for JSON_TABLE function.

Enumerator
JTC_ORDINALITY 
JTC_PATH 
JTC_EXISTS 
JTC_NESTED_PATH 

◆ Json_on_response_type

enum class Json_on_response_type : uint16
strong

Types of ON EMPTY/ON ERROR clauses for JSON_TABLE and JSON_VALUE.

Note
uint16 enum base limitation is necessary for YYSTYPE.
Enumerator
ERROR 
NULL_VALUE 
DEFAULT 
IMPLICIT 

◆ jt_skip_reason

Reason for skipping a NESTED PATH.

Enumerator
JTS_NONE 
JTS_EOD 
JTS_SIBLING 

Function Documentation

◆ 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