MySQL 8.4.3
Source Code Documentation
File_parser Class Reference

#include <parse_file.h>

Public Member Functions

 File_parser ()
 
bool ok ()
 
const LEX_CSTRINGtype () const
 
bool parse (uchar *base, MEM_ROOT *mem_root, struct File_option *parameters, uint required, Unknown_key_hook *hook) const
 parse parameters. More...
 

Private Attributes

const char * start
 
const char * end
 
LEX_CSTRING file_type
 
bool content_ok
 

Friends

File_parsersql_parse_prepare (const LEX_STRING *file_name, MEM_ROOT *mem_root, bool bad_format_errors)
 Prepare frm to parse (read to memory). More...
 

Constructor & Destructor Documentation

◆ File_parser()

File_parser::File_parser ( )
inline

Member Function Documentation

◆ ok()

bool File_parser::ok ( )
inline

◆ parse()

bool File_parser::parse ( uchar base,
MEM_ROOT mem_root,
struct File_option parameters,
uint  required,
Unknown_key_hook hook 
) const

parse parameters.

Parameters
basebase address for parameter writing (structure like TABLE)
mem_rootMEM_ROOT for parameters allocation
parametersparameters description
requirednumber of required parameters in above list. If the file contains more parameters than "required", they will be ignored. If the file contains less parameters then "required", non-existing parameters will remain their values.
hookhook called for unknown keys
Return values
falseOK
trueerror

◆ type()

const LEX_CSTRING & File_parser::type ( ) const
inline

Friends And Related Function Documentation

◆ sql_parse_prepare

File_parser * sql_parse_prepare ( const LEX_STRING file_name,
MEM_ROOT mem_root,
bool  bad_format_errors 
)
friend

Prepare frm to parse (read to memory).

Parameters
file_namepath & filename to .frm file
mem_rootMEM_ROOT for buffer allocation
bad_format_errorssend errors on bad content
Note
returned pointer + 1 will be type of .frm
Returns
0 - error
parser object

Member Data Documentation

◆ content_ok

bool File_parser::content_ok
private

◆ end

const char * File_parser::end
private

◆ file_type

LEX_CSTRING File_parser::file_type
private

◆ start

const char* File_parser::start
private

The documentation for this class was generated from the following files: