MySQL 8.4.2
Source Code Documentation
typelib.h File Reference
#include "my_inttypes.h"

Go to the source code of this file.

Classes

struct  TYPELIB
 

Macros

#define FIND_TYPE_BASIC   0
 
#define FIND_TYPE_NO_PREFIX   (1 << 0)
 makes find_type() require the whole name, no prefix More...
 
#define FIND_TYPE_NO_OVERWRITE   (1 << 1)
 always implicitly on, so unused, but old code may pass it More...
 
#define FIND_TYPE_ALLOW_NUMBER   (1 << 2)
 makes find_type() accept a number More...
 
#define FIND_TYPE_COMMA_TERM   (1 << 3)
 makes find_type() treat ',' as terminator More...
 

Functions

uint64_t find_typeset (const char *x, TYPELIB *typelib, int *error_position)
 Create an integer value to represent the supplied comma-separated string where each string in the TYPELIB denotes a bit position. More...
 
int find_type_or_exit (const char *x, TYPELIB *typelib, const char *option)
 
int find_type (const char *x, const TYPELIB *typelib, unsigned int flags)
 
const char * get_type (TYPELIB *typelib, unsigned int nr)
 
TYPELIBcopy_typelib (MEM_ROOT *root, TYPELIB *from)
 Create a copy of a specified TYPELIB structure. More...
 
uint64_t find_set_from_flags (const TYPELIB *lib, int default_name, uint64_t cur_set, uint64_t default_set, const char *str, unsigned int length, const char **err_pos, unsigned int *err_len)
 

Variables

TYPELIB sql_protocol_typelib
 

Macro Definition Documentation

◆ FIND_TYPE_ALLOW_NUMBER

#define FIND_TYPE_ALLOW_NUMBER   (1 << 2)

makes find_type() accept a number

◆ FIND_TYPE_BASIC

#define FIND_TYPE_BASIC   0

◆ FIND_TYPE_COMMA_TERM

#define FIND_TYPE_COMMA_TERM   (1 << 3)

makes find_type() treat ',' as terminator

◆ FIND_TYPE_NO_OVERWRITE

#define FIND_TYPE_NO_OVERWRITE   (1 << 1)

always implicitly on, so unused, but old code may pass it

◆ FIND_TYPE_NO_PREFIX

#define FIND_TYPE_NO_PREFIX   (1 << 0)

makes find_type() require the whole name, no prefix

Function Documentation

◆ copy_typelib()

TYPELIB * copy_typelib ( MEM_ROOT root,
TYPELIB from 
)

Create a copy of a specified TYPELIB structure.

Parameters
rootpointer to a MEM_ROOT object for allocations
frompointer to a source TYPELIB structure
Return values
pointerto the new TYPELIB structure on successful copy
NULLotherwise

◆ find_set_from_flags()

uint64_t find_set_from_flags ( const TYPELIB lib,
int  default_name,
uint64_t  cur_set,
uint64_t  default_set,
const char *  str,
unsigned int  length,
const char **  err_pos,
unsigned int *  err_len 
)

◆ find_type()

int find_type ( const char *  x,
const TYPELIB typelib,
unsigned int  flags 
)

◆ find_type_or_exit()

int find_type_or_exit ( const char *  x,
TYPELIB typelib,
const char *  option 
)

◆ find_typeset()

uint64_t find_typeset ( const char *  x,
TYPELIB lib,
int *  err 
)

Create an integer value to represent the supplied comma-separated string where each string in the TYPELIB denotes a bit position.

Parameters
xstring to decompose
libTYPELIB (struct of pointer to values + count)
errindex (not char position) of string element which was not found or 0 if there was no error
Return values
ainteger representation of the supplied string

◆ get_type()

const char * get_type ( TYPELIB typelib,
unsigned int  nr 
)

Variable Documentation

◆ sql_protocol_typelib

TYPELIB sql_protocol_typelib
extern