全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 ページ
公開メンバ関数 | 静的公開メンバ関数 | 全メンバ一覧
groupQuery クラス

グルーピング条件を指定するクラス [詳解]

#include <groupQuery.h>

公開メンバ関数

 groupQuery ()
 
 groupQuery (const groupQuery &r)
 
 ~groupQuery ()
 
groupQueryaddFunction (groupFuncBase *func)
 
int functionCount () const
 
const groupFuncBasegetFunction (int index) const
 
const fieldNamesgetKeyFields () const
 
groupQuerykeyField (const _TCHAR *name, const _TCHAR *name1=NULL, const _TCHAR *name2=NULL, const _TCHAR *name3=NULL, const _TCHAR *name4=NULL, const _TCHAR *name5=NULL, const _TCHAR *name6=NULL, const _TCHAR *name7=NULL, const _TCHAR *name8=NULL, const _TCHAR *name9=NULL, const _TCHAR *name10=NULL)
 
groupQueryoperator= (const groupQuery &r)
 
void release ()
 
groupQueryreset ()
 

静的公開メンバ関数

static groupQuerycreate ()
 

詳解

グルーピング条件を指定するクラス

このクラスにグルーピング条件を設定し、 recordset の groupBy() 関数に渡します。
このクラスにセットするのは、グルーピングのキーと計算関数です。

参照
recordset

構築子と解体子

コンストラクタ。

groupQuery ( const groupQuery r)

コピーコンストラクタ。

~groupQuery ( )

デストラクタ。

関数詳解

groupQuery & addFunction ( groupFuncBase func)

グルーピングを実行する際に、各レコードを受け取って計算を行う計算クラスをセットします。
計算クラスには count sum avg max min の5つが定義されています。
また、groupFuncBase を継承したオリジナルクラスを渡すこともできます。
複数の計算を行う場合は、この関数を繰り返し呼び出して複数登録できます。

注意
ここで渡した計算クラスは、グルーピングの実行が完了するまで生存していなければなりません。
static groupQuery * create ( )
static

groupQueryオブジェクトを生成して返します。 new演算子の代わりにこの関数にて生成するようにしてください。 DLL内で実装されたnew演算子が使用されるようになります。 また破棄は delete の代わりに release() を呼び出してください。

int functionCount ( ) const

addFunction() で追加された計算関数の数を返します。

const groupFuncBase * getFunction ( int  index) const

indexで指定された順番の計算関数を返します。

const fieldNames & getKeyFields ( ) const

keyField() で追加されたフィールドの数を返します。

groupQuery & keyField ( const _TCHAR *  name,
const _TCHAR *  name1 = NULL,
const _TCHAR *  name2 = NULL,
const _TCHAR *  name3 = NULL,
const _TCHAR *  name4 = NULL,
const _TCHAR *  name5 = NULL,
const _TCHAR *  name6 = NULL,
const _TCHAR *  name7 = NULL,
const _TCHAR *  name8 = NULL,
const _TCHAR *  name9 = NULL,
const _TCHAR *  name10 = NULL 
)

グルーピングのキーになるフィード名を指定します。最大11個まで指定できます。

groupQuery & operator= ( const groupQuery r)

rで指定されたgroupQueryオブジェクトの内容をこのオブジェクトにコピーします。

void release ( )

このオブジェクトを破棄します。 create() で生成したオブジェクトは必ずこの関数で破棄してください。

groupQuery & reset ( )

keyField()addFunction()で指定された値をクリアします。

Transactd SDK 2018年07月31日(火) 19時40分35秒 doxygen