00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <malloc.h>
00017
00018
00019 #include <lTrace.h>
00020 #include <lDefs.h>
00021
00022
00023 #include <cComplexQuery.h>
00024
00025 ComplexQuery::ComplexQuery(
00026 const QueRefProto &X
00027 ): Query(X)
00028 {
00029 _select = X._Select();
00030 _from = X._From();
00031 };
00032
00033 ComplexQuery::ComplexQuery()
00034 : Query()
00035 {
00036 _select = NULL;
00037 _from = NULL;
00038 };
00039
00040 ComplexQuery::ComplexQuery(
00041 const char *const a_where
00042 )
00043 : Query(a_where)
00044 {
00045 _select = NULL;
00046 _from = NULL;
00047 };
00048
00049 ComplexQuery::ComplexQuery(
00050 const char *const a_where,
00051 const char *const a_order_by
00052 )
00053 : Query(a_where,a_order_by)
00054 {
00055 _select = NULL;
00056 _from = NULL;
00057 };
00058
00059 ComplexQuery::ComplexQuery(
00060 const char *const a_where,
00061 const char *const a_order_by,
00062 const char *const a_select,
00063 const char *const a_from
00064 )
00065 : Query(a_where,a_order_by)
00066 {
00067 StrCpy(_select = NULL,a_select);
00068 StrCpy(_from = NULL,a_from);
00069 };
00070
00071 ComplexQuery::~ComplexQuery()
00072 {
00073 StrFree(_select);
00074 StrFree(_from);
00075 };
00076
00077 ComplexQuery &ComplexQuery::operator =(const ComplexQuery &X)
00078 {
00079 if (&X != this) {
00080 StrCpy(_where,X._where);
00081 StrCpy(_order_by,X._order_by);
00082 StrCpy(_select = NULL,X._select);
00083 StrCpy(_from = NULL,X._from);
00084 };
00085 return *this;
00086 };
00087
00088 char *ComplexQuery::_Select() const
00089
00090 {
00091 char *_retval = NULL;
00092 return StrCpy(_retval,_select);
00093 };
00094
00095 char *ComplexQuery::_From() const
00096
00097 {
00098 char *_retval = NULL;
00099 return StrCpy(_retval,_from);
00100 };