DbInterface

A class that acts an interface to a database.

[ verification_docs | Source | Implementation | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION
AUTHOR

Class Summary

class DbInterface

{

public:
DbInterface(const string & host , const string & user , const string & password , const string & db );
DbInterface(const DbInterface& dbi);
~DbInterface();
DbInterface& operator=(const DbInterface& rhs);
int fetchGrids(vector<Grid>& grids, const Date & beginDate, const Date & endDate, const string & gridType, const string & dataType );
int fetchGrid( Grid& grid, const Date & beginDate, const Date & endDate, const string & gridType, const string & dataType );
protected:
private:
string _host;
string _user;
string _password;
string _db;
MYSQL _mysql;
void _connect();
}; // DbInterface


DESCRIPTION

A class that acts an interface to a database.


AUTHOR

Mike Smoot


DbInterface(const string & host , const string & user , const string & password , const string & db );

Constructor.

		DbInterface(const string & host = "localhost",
					const string & user = "vtest",
					const string & password = "vtest",
					const string & db = "verify2");

DbInterface(const DbInterface& dbi);

Copy constructor.

		DbInterface(const DbInterface& dbi);

~DbInterface();

Destructor.

		~DbInterface();

DbInterface& operator=(const DbInterface& rhs);

Operator =

		DbInterface& operator=(const DbInterface& rhs);

int fetchGrids(vector<Grid>& grids, const Date & beginDate, const Date & endDate, const string & gridType, const string & dataType );

Fetches a *vector* of grids. Returns number of grids found.

		int fetchGrids(vector<Grid>& grids, 
						const Date & beginDate,
						const Date & endDate,
						const string & gridType,
						const string & dataType );

int fetchGrid( Grid& grid, const Date & beginDate, const Date & endDate, const string & gridType, const string & dataType );

Fetches a *single* grid. Returns number of grids found (1 or 0).

		int fetchGrid( Grid& grid, 
					   const Date & beginDate,
					   const Date & endDate,
					   const string & gridType,
					   const string & dataType );

string _host;

Host name (as MySql would know it).

		string _host;

string _user;

Database user name.

		string _user;

string _password;

Database user password.

		string _password;

string _db;

Database name.

		string _db;

MYSQL _mysql;

MySql struct

		MYSQL _mysql;

void _connect();

Connects to specified database on host with name and password.

		void _connect();

All Members

public:
DbInterface& operator=(const DbInterface& rhs);
int fetchGrids(vector<Grid>& grids, const Date & beginDate, const Date & endDate, const string & gridType, const string & dataType );
int fetchGrid( Grid& grid, const Date & beginDate, const Date & endDate, const string & gridType, const string & dataType );
protected:

Ancestors

Class does not inherit from any other class.


Descendants

Class is not inherited by any others.


Generated from source by the Cocoon utilities on Wed Aug 30 12:53:30 2000 .

Report problems to jkotula@stratasys.com