From f8f8b32cf5f07c12cc5b0c620c9fef19d060c2bb Mon Sep 17 00:00:00 2001 From: prabatuty Date: Mon, 16 Jun 2008 03:12:25 +0000 Subject: [PATCH] Handling no group on Aggregates --- include/AggTableImpl.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/AggTableImpl.h b/include/AggTableImpl.h index ed2f43c6..7064a022 100644 --- a/include/AggTableImpl.h +++ b/include/AggTableImpl.h @@ -31,7 +31,8 @@ enum AggType AGG_MAX, AGG_SUM, AGG_AVG, - AGG_COUNT + AGG_COUNT, + AGG_UNKNOWN }; class AggFldDef { @@ -43,6 +44,16 @@ class AggFldDef void *appBuf; AggType atype; bool alreadyBinded; + AggFldDef() + { + strcpy(fldName, ""); + type=typeUnknown; + length=0; + bindBuf=NULL; + appBuf=NULL; + atype=AGG_UNKNOWN; + alreadyBinded=false; + } }; @@ -67,7 +78,12 @@ class AggTableImpl:public Table DbRetVal getFieldInfo(const char *fieldName, FieldInfo *&info) { return ErrBadCall; } + bool isGroupSet() + { + if (groupFld.type == typeUnknown) return false; else return true; + } void* insertOrGet(); + void setTable(Table *impl){ tableHdl = impl;} void closeScan(); -- 2.11.4.GIT