Drizzled Public API Documentation

domains.cc
00001 /* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2010 Brian Aker
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 #include <config.h>
00022 
00023 #include <plugin/information_schema_dictionary/dictionary.h>
00024 
00025 using namespace std;
00026 using namespace drizzled;
00027 
00028 Domains::Domains() :
00029   InformationSchema("DOMAINS")
00030 {
00031   add_field("DOMAIN_CATALOG");
00032   add_field("DOMAIN_SCHEMA");
00033   add_field("DOMAIN_NAME");
00034   add_field("DATA_TYPE");
00035   add_field("CHARACTER_MAXIMUM_LENGTH");
00036   add_field("CHARACTER_OCTET_LENGTH");
00037   add_field("COLLATION_CATALOG");
00038   add_field("COLLATION_SCHEMA");
00039   add_field("COLLATION_NAME");
00040   add_field("CHARACTER_SET_CATALOG");
00041   add_field("CHARACTER_SET_SCHEMA");
00042   add_field("CHARACTER_SET_NAME");
00043   add_field("NUMERIC_PRECISION");
00044   add_field("NUMERIC_PRECISION_RADIX");
00045   add_field("NUMERIC_SCALE");
00046   add_field("DATETIME_PRECISION");
00047   add_field("DOMAIN_DEFAULT");
00048 }
00049 
00050 void Domains::Generator::fill()
00051 {
00052 }
00053 
00054 bool Domains::Generator::nextCore()
00055 {
00056   return false;
00057 }
00058 
00059 bool Domains::Generator::next()
00060 {
00061   while (not nextCore())
00062   {
00063     return false;
00064   }
00065 
00066   return true;
00067 }
00068 
00069 Domains::Generator::Generator(drizzled::Field **arg) :
00070   InformationSchema::Generator(arg),
00071   is_primed(false)
00072 {
00073 }
00074 
00075 bool Domains::Generator::populate()
00076 {
00077   if (not next())
00078     return false;
00079 
00080   fill();
00081 
00082   return true;
00083 }