Class Union
This class is used to create and execute SQL union statement. Initially Union is created for two Select objects. After Union has been created a new Select object can be added using overloaded Union operator +. Member functions of this class are:

Function                                                        
Description
Union(Select& s1, Select& s2)
constructor
int Row()
execute query - return number of rows fetched
void SetAll(int all_ind)
set 'union all' if all_ind is not 0
Union& operator+=(Select& s)
add Select object to Union
Union& operator>>(char *i)
set order by condition in query

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class Intersect : public Union
This class is used to create and execute SQL intersect statement. Intersect is created for two Select objects. Member functions of this class are:

Function                                                        
Description
Intersect(Select& s1, Select& s2)
constructor
int Row()
execute query - return number of rows fetched

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class Minus : public Union
This class is used to create and execute SQL minus statement. Minus is created for two Select objects. Member functions of this class are:

Function                                                        
Description
Minus(Select& s1, Select& s2)
constructor
int Row()
execute query - return number of rows fetched

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class TDate
This class is used for a date column. Member functions of the class are:

Function                                                        
Description
TDate()        
default constructor
TDate(char *column)        
constructor with column name
SetFormat(char *fmt)                
set display format to fmt
ShowDefault()
set display format DD-MON-YY
ShowTime()
set format DD-MON-YYYY HH24:MI:SS
TDate& operator=(const char* t)        
set date value from t (use curr format)
char* GetValue()
retrieve full date value (including time)

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class TClob
This class is used for a  CLOB column. Member functions of the class are:

Function                                                        
Description
TClob()
default constructor
TClob(char *column)
constructor with column name
unsigned long  GetSize()
get size of CLOB data
int Next()
check if more data in CLOB, 0 if not
void SetFetchSize(int size)        
set FetchSize (chunk of data)
int  GetFetchSize()        
get FetchSize (chunk of data)
TClob& operator<<(char *i)
to fill output buffer from CLOB data
TClob& operator>>(char *i)
to load data into CLOB from buffer

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class TBlob
This class is used for a  BLOB column. Member functions of the class are:

Function
Description
TBlob()
default constructor
TBlob(char *column)
constructor with column name
unsigned long  GetSize()
get size of BLOB data
int Next()
check if more data in BLOB, 0 if not
void SetFetchSize(int size)        
set FetchSize (chunk of data)
int  GetFetchSize()        
get FetchSize (chunk of data)
TBlob& operator<<(unsigned char *i)
to fill output buffer from BLOB data
TBlob& operator>>(unsigned char *i)
to load data into BLOB from buffer

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class TInt
This class is used for a column of type number(n). Member functions of the class are:

Function                                                
Description
TInt()
default constructor
int GetValue()        
retrieve value (integer) from the class object
void SetValue(int n, short d)
set value and null indicator in the object
int IsNull()        
check if null value in the object
TInt& operator=(const int& i)
load TInt object from integer
TInt& operator<<(int &i)
load integer variable from TInt object

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class TFloat
This class is used for a column of type number(n, p) with decimal point. Member functions of the class are:

Function                                                
Description
TFloat()
default constructor
double GetValue()        
retrieve value (double) from the class object
void SetValue(double n, short d)
set value and null indicator in the object
int IsNull()        
check if null value in the object
TFloat& operator=(const double& i)
load TFloat object from double
TFloat& operator<<(double& i)
load double variable from TFloat object

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class TStr
This class is used for a column of type varchar2(n). Member functions of the class are:

Function                                                        
Description
TStr()
default constructor
TStr(int size)
constructor with string size
char* GetValue()        
retrieve value (char*) from the class object
void SetValue(char*  n, short d)
set value and null indicator in the object
int IsNull()        
check if null value in the object
TStr& operator=(const char* i)
load TStr object from char string
TStr& operator<<(char*& i)
load char* variable from TStr object

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class TRowid
This class is used for a pseudo-column of type TRowid. Member functions of the class are:

Function                                        
Description
TRowid()
constructor
char* GetValue()
get string value of the object
void SetValue(char *n)
set string value of the object

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class Aggregate
This class is used to process a sql statement producing aggregate data.
Member functions of the class are:

Function                                                        
Description
Aggregate(short type)
constructor
Aggregate(short type, char *column)
constructor based on column name
Aggregate(TDate& d)
constructor based on TDate object
Aggregate(short type, TDate& d)
constructor based on TDate object
Aggregate& operator=(char *column)
load column name into object
Aggregate& operator=(short type)
load type into object
Aggregate& operator<<(long& i)
load long variable from fetched data
Aggregate& operator<<(double& i)
load double variable
Aggregate& operator<<(char* i)
load char* variable
long AsLong()
return fetched data as long variable
int AsInt()
return fetched data as int variable
double AsFloat()
return fetched data as float variable
string& AsString()
return fetched data as string variable
int IsNull()
return 1 if null
Valid Types are:
corresponding sql statement
MAXVAL
max
MINVAL
min
SUM
sum
COUNT
count
STD
stddev
AVG
avg
VAR
variance
GROUP
group

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class Mem
This class is used to load selected rows to memory.  Member functions of the class are:

Function                                                        
Description
Mem(Select& s)
constructor
int Next()
get next row from doubly linked list
int Prev()
get previous row from doubly linked list
void Begin()
go to top of doubly linked list
void End()
go to bottom of doubly linked list
void Close()
free data memory
Mem& operator<<(TInt& i)
load TInt variable from fetched data
Mem& operator<<(TFloat& i)
load TFloat variable from fetched data
Mem& operator<<(TStr& i)
load TStr variable from fetched data
Mem& operator==(const int& i)
setup query condition
Mem& operator==(const float& i)
setup query condition
Mem& operator==(const char* i)
setup query condition
Mem& operator>>(const char* i)
define memory query column

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class Sql
This class is used to process user entered sql statement.  Member functions of the class are:

Function                                                        
Description
Sql(char *sql_statement)
constructor
Execute()
to execute sql statement
Sql& operator<<(int& i)
load integer variable from fetched data
Sql& operator<<(double& i)
load double variable from fetched data
Sql& operator<<(TInt& i)
load TInt variable from fetched data
Sql& operator<<(TFloat& i)
load TFloat variable from fetched data
Sql& operator<<(TStr& i)
load TStr variable from fetched data
Sql& operator>>(const int& i)
load bind data
Sql& operator>>(const float& i)
load bind data
Sql& operator>>(const char* i)
load bind data
Sql& operator>>(const TInt& i)
load bind data
Sql& operator>>(const TFloat& i)
load bind data
Sql& operator>>(const TStr& i)
load bind data

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Class OException
This class is used to report on error condition within program. Member functions of the class are:

Function                        
Description
void Show()
display error message
int Err()
return error number