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 |
|
| |
| Function | Description |
| Intersect(Select& s1, Select& s2) | constructor |
| int Row() | execute query - return number of rows fetched |
|
| |
| Function | Description |
| Minus(Select& s1, Select& s2) | constructor |
| int Row() | execute query - return number of rows fetched |
|
| |
| 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) |
|
| |
| 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 |
|
| |
| 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 |
|
| |
| 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 |
|
| |
| 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 |
|
| |
| 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 |
|
| |
| Function | Description |
| TRowid() | constructor |
| char* GetValue() | get string value of the object |
| void SetValue(char *n) | set string value of the object |
|
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
| |
| Function | Description |
| void Show() | display error message |
| int Err() | return error number |