drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzled::sys_var Class Referenceabstract

#include <sys_var.h>

Inheritance diagram for drizzled::sys_var:
[legend]
Collaboration diagram for drizzled::sys_var:
[legend]

Public Member Functions

 sys_var (const std::string &name_arg, sys_after_update_func func=NULL, sys_check_func check_func_arg=NULL)
void setName (const std::string &name_in)
const std::string & getName () const
const std::vector< std::string > & getAliases () const
struct option * getOptionLimits () const
void setOptionLimits (struct option *in_option_limits)
sys_after_update_func getAfterUpdateTrigger () const
virtual bool check (Session *session, set_var *var)
bool check_enum (Session *session, set_var *var, const TYPELIB *enum_names)
virtual bool update (Session *session, set_var *var)=0
virtual void set_default (Session *, sql_var_t)
virtual SHOW_TYPE show_type ()
virtual unsigned char * value_ptr (Session *, sql_var_t)=0
virtual bool check_type (sql_var_t type)
virtual bool check_update_type (Item_result type)
virtual bool check_default (sql_var_t)
Item * item (Session *, sql_var_t)
virtual bool is_readonly () const

Protected Attributes

std::string name
sys_check_func check_func
sys_after_update_func after_update
struct option * option_limits
bool m_allow_empty_value

Detailed Description

A class which represents a variable, either global or session-local.

Definition at line 78 of file sys_var.h.

Constructor & Destructor Documentation

◆ sys_var()

drizzled::sys_var::sys_var ( const std::string & name_arg,
sys_after_update_func func = NULL,
sys_check_func check_func_arg = NULL )
inline

Definition at line 87 of file sys_var.h.

◆ ~sys_var()

virtual drizzled::sys_var::~sys_var ( )
inlinevirtual

Definition at line 97 of file sys_var.h.

Member Function Documentation

◆ check()

bool drizzled::sys_var::check ( Session * session,
set_var * var )
virtual

Definition at line 247 of file sys_var.cc.

◆ check_default()

virtual bool drizzled::sys_var::check_default ( sql_var_t )
inlinevirtual

Definition at line 164 of file sys_var.h.

◆ check_enum()

bool drizzled::sys_var::check_enum ( Session * session,
set_var * var,
const TYPELIB * enum_names )

Definition at line 742 of file sys_var.cc.

◆ check_type()

virtual bool drizzled::sys_var::check_type ( sql_var_t type)
inlinevirtual

Definition at line 156 of file sys_var.h.

◆ check_update_type()

virtual bool drizzled::sys_var::check_update_type ( Item_result type)
inlinevirtual

Definition at line 160 of file sys_var.h.

◆ getAfterUpdateTrigger()

sys_after_update_func drizzled::sys_var::getAfterUpdateTrigger ( ) const
inline

Returns the function pointer for after update trigger, or NULL if none.

Definition at line 142 of file sys_var.h.

◆ getAliases()

const std::vector< std::string > & drizzled::sys_var::getAliases ( ) const
inline

Returns a vector of strings representing aliases for this variable's name.

Definition at line 119 of file sys_var.h.

◆ getName()

const std::string & drizzled::sys_var::getName ( ) const
inline

Returns the name of the variable.

Note

So that we can exist in a Registry. We really need to formalize that

Definition at line 111 of file sys_var.h.

◆ getOptionLimits()

struct option * drizzled::sys_var::getOptionLimits ( ) const
inline

Returns a pointer to the variable's option limits

Definition at line 126 of file sys_var.h.

◆ is_readonly()

virtual bool drizzled::sys_var::is_readonly ( void ) const
inlinevirtual

Definition at line 169 of file sys_var.h.

◆ item()

Item * drizzled::sys_var::item ( Session * session,
sql_var_t var_type )

Return an Item for a variable.

Used with @[global.]variable_name.

If type is not given, return local value if exists, else global.

Definition at line 792 of file sys_var.cc.

◆ set_default()

virtual void drizzled::sys_var::set_default ( Session * ,
sql_var_t  )
inlinevirtual

Definition at line 149 of file sys_var.h.

◆ setName()

void drizzled::sys_var::setName ( const std::string & name_in)
inline

Definition at line 99 of file sys_var.h.

◆ setOptionLimits()

void drizzled::sys_var::setOptionLimits ( struct option * in_option_limits)
inline

Sets the pointer to the variable's option limits

Parameters
Pointerto the option limits option variable

Definition at line 135 of file sys_var.h.

◆ show_type()

virtual SHOW_TYPE drizzled::sys_var::show_type ( void )
inlinevirtual

Definition at line 151 of file sys_var.h.

Member Data Documentation

◆ after_update

sys_after_update_func drizzled::sys_var::after_update
protected

Function pointer triggered after the variable's value is updated

Definition at line 83 of file sys_var.h.

◆ check_func

sys_check_func drizzled::sys_var::check_func
protected

Definition at line 82 of file sys_var.h.

◆ m_allow_empty_value

bool drizzled::sys_var::m_allow_empty_value
protected

Does variable allow an empty value?

Definition at line 85 of file sys_var.h.

◆ name

std::string drizzled::sys_var::name
protected

The name of the variable

Definition at line 81 of file sys_var.h.

◆ option_limits

struct option* drizzled::sys_var::option_limits
protected

Updated by by sys_var_init()

Definition at line 84 of file sys_var.h.


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