/*
* Copyright (c) 1995 Gunther Schadow. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef BOOTSTRAP_H_
#define BOOTSTRAP_H_
#include
class All_Tab_Columns : public Table // read only;
{
public:
const size_t S_table_name = 30;
const size_t S_column_name = 30;
const size_t S_data_type = 9;
private:
char table_name[S_table_name + 1];
char column_name[S_column_name + 1];
char data_type[S_data_type + 1];
size_t data_length;
u_int data_precision;
// INDICATORS
short I_table_name;
short I_column_name;
short I_data_type;
short I_data_length;
short I_data_precision;
public:
const char *get_column_name() { return column_name; }
const char *get_data_type() { return data_type; }
size_t get_data_length() { return data_length; }
u_int get_data_precision() { return data_precision; }
bool column_name_is_null() { return I_IS_NULL(I_column_name); }
bool data_type_is_null() { return I_IS_NULL(I_data_type); }
bool data_precision_is_null() { return I_IS_NULL(I_data_precision); }
bool data_length_is_null() { return I_IS_NULL(I_data_length); }
public:
All_Tab_Columns();
virtual ~All_Tab_Columns();
result retrieve(const char * clause = "");
result next();
void insert();
void update();
void update(const char *);
void remove();
};
class All_Objects : public Table // read only;
{
public:
const size_t S_owner = 30;
const size_t S_object_name = 128;
const size_t S_object_type = 13;
private:
char owner[S_owner + 1];
char object_name[S_object_name + 1];
char object_type[S_object_type + 1];
// INDICATORS
short I_owner;
short I_object_name;
short I_object_type;
public:
const char *get_owner() { return owner; }
const char *get_object_name() { return object_name; }
const char *get_object_type() { return object_type; }
bool owner_is_null() { return I_IS_NULL(I_owner); }
bool object_name_is_null() { return I_IS_NULL(I_object_name); }
bool object_type_is_null() { return I_IS_NULL(I_object_type); }
public:
All_Objects();
virtual ~All_Objects();
result retrieve(const char *clause = "");
result next();
void insert();
void update();
void update(const char *);
void remove();
};
#endif /* ! BOOTSTRAP_H_ */