23#include <plugin/session_dictionary/dictionary.h>
24#include <drizzled/user_var_entry.h>
26#define LARGEST_USER_VARIABLE_NAME 128
28namespace session_dictionary {
30Variables::Variables() :
31 drizzled::plugin::TableFunction(
"DATA_DICTIONARY",
"USER_DEFINED_VARIABLES")
33 add_field(
"VARIABLE_NAME", drizzled::plugin::TableFunction::STRING, LARGEST_USER_VARIABLE_NAME,
false);
34 add_field(
"VARIABLE_VALUE", drizzled::plugin::TableFunction::STRING, LARGEST_USER_VARIABLE_NAME,
true);
38 drizzled::plugin::TableFunction::Generator(arg),
39 user_vars(getSession().getUserVariables()),
40 iter(user_vars.begin())
44Variables::Generator::~Generator()
48bool Variables::Generator::populate()
50 while (iter != user_vars.end())
52 char buff[LARGEST_USER_VARIABLE_NAME];
57 iter->second->val_str(&null_value, &tmp, decimals);
TODO: Rename this file - func.h is stupid.