全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド ページ
table.h
1 #ifndef BZS_DB_PROTOCOL_TDAP_CLIENT_TABLE_H
2 #define BZS_DB_PROTOCOL_TDAP_CLIENT_TABLE_H
3 /* =================================================================
4  Copyright (C) 2000-2013 BizStation Corp All rights reserved.
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19  02111-1307, USA.
20  ================================================================= */
21 #include "nsTable.h"
22 #include <vector>
23 #include <stdio.h>
24 #include <boost/shared_ptr.hpp>
25 
26 namespace bzs
27 {
28 
29 namespace db
30 {
31 struct blobHeader;
32 struct blob;
33 namespace protocol
34 {
35 namespace tdap
36 {
37 namespace client
38 {
39 
40 /** @cond INTERNAL */
41 class database;
42 class queryBase;
43 class fields;
44 class table;
45 /** @endcond */
46 
47 #if (defined(__BORLANDC__) && !defined(__clang__))
48 typedef void __stdcall(* recordCountFn)(table* tb, int count, bool& complate);
49 #else
50 /** @cond INTERNAL */
51 /** Callback function on a record was record count. */
52 typedef void(__STDCALL* recordCountFn)(table* tb, int count, bool& complate);
53 #endif
54 
55 #define null_str _T("")
56 
57 #pragma warning(disable : 4251)
58 
59 static const int mra_nojoin = 0;
60 static const int mra_first = 0;
61 static const int mra_nextrows = 1;
62 static const int mra_innerjoin = 2;
63 static const int mra_outerjoin = 4;
64 static const int mra_current_block = -1;
65 
66 class multiRecordAlocator
67 {
68 
69 public:
70  virtual ~multiRecordAlocator() {}
71  virtual void init(size_t recordCount, size_t recordLen, int addType,
72  const class table* tb) = 0;
73  virtual unsigned char* allocBlobBlock(size_t size) = 0;
74  virtual unsigned char* ptr(size_t row, int stat) = 0;
75  virtual void setJoinType(int v) = 0;
76  virtual void setInvalidRecord(size_t row, bool v) = 0;
77  virtual void setJoinRowMap(
78  const std::vector<std::vector<int> >* v /*, size_t size*/) = 0;
79  virtual const std::vector<std::vector<int> >* joinRowMap() const = 0;
80  virtual void duplicateRow(int row, int count) = 0;
81  virtual void removeLastMemBlock(int row) = 0;
82 };
83 
84 class filter;
85 typedef boost::shared_ptr<filter> pq_handle;
86 
87 /** @endcond */
88 
89 class DLLLIB table : public nstable
90 {
91  static void* __STDCALL DDBA(client::table* tb, uint_td size);
92 
93  friend class recordCache;
94  friend class database;
95  friend class filter;
96  friend class fields;
97  friend struct logic;
98 
99  struct tbimpl* m_impl;
100  class fielddefs* m_fddefs;
101  tabledef** m_tableDef;
102 
103  uchar_td charset() const;
104  bool checkIndex(short index) const;
105  void getKeySpec(keySpec* ks, bool SpecifyKeyNum = false);
106  const bzs::db::blobHeader* getBlobHeader();
107  unsigned char* setBlobFieldPointer(char* ptr, const ::bzs::db::blobHeader* p,
108  unsigned char* to=NULL);
109  void addSendBlob(const bzs::db::blob* blob);
110  void addBlobEndRow();
111  void resetSendBlob();
112  void btrvGetExtend(ushort_td op);
113  void getRecords(ushort_td op);
114  uint_td doGetWriteImageLen(); // orverride
115  void doUpdate(bool ncc = false); // orverride
116  ushort_td doCommitBulkInsert(bool autoCommit = false); // orverride
117  void doAbortBulkInsert(); // orverride
118  void doCreateIndex(bool SpecifyKeyNum = false); // orverride
119  uint_td doRecordCount(bool estimate, bool fromCurrent); // orverride
120  short_td doBtrvErr(HWND hWnd, _TCHAR* retbuf = NULL); // orverride
121  void doFind(ushort_td op, bool notIncCurrent);
122  bool setSeekValueField(int row);
123  void btrvSeekMulti();
124  bool doSeekMultiAfter(int row);
125  void* doDdba(uint_td size);
126  bool isReadContinue(ushort_td& op);
127 
128 protected:
129  explicit table(nsdatabase* pbe); // Inheritance is impossible
130  virtual ~table();
131  void* dataBak() const;
132  void* reallocDataBuffer(uint_td v);
133  int dataBufferLen() const;
134  uint_td unPack(char* ptr, size_t size);
135  uint_td pack(char* ptr, size_t size);
136 
137  keylen_td writeKeyData(); // orverride
138  keylen_td writeKeyDataTo(uchar_td* to, int keySize);
139 
140  void writeRecordData(){};
141 
142  void onReadAfter(); // orverride
143  bool onUpdateCheck(eUpdateType type); // orverride
144 
145  int onUpdateBefore() { return 0; }; // orverride
146 
147  void onUpdateAfter(int beforeResult); // orverride
148  bool onDeleteCheck(bool inkey); // orverride
149 
150  int onInsertBefore() { return 0; }; // orverride
151 
152  void onInsertAfter(int beforeResult); // orverride
153  bool isUniqeKey(char_td keynum); // orverride
154  void init(tabledef** def, short filenum, bool regularDir);
155  void* attachBuffer(void* newPtr, bool unpack = false, size_t size = 0);
156  void dettachBuffer();
157  bool doPrepare();
158 
159  virtual void doInit(tabledef** def, short filenum, bool regularDir);
160 
161  virtual void onRecordCounting(size_t count, bool& cancel);
162 
163  virtual void setNoUpdateTimeStamp(bool v){};
164 
165 public:
166  using nstable::eFindType;
167 
168  inline const tabledef* tableDef() const { return *m_tableDef; };
169  inline const tabledef** tableDefPtr() const
170  {
171  return const_cast<const tabledef**>(m_tableDef);
172  }
173 
174  inline bool valiableFormatType() const
175  {
176  return (*m_tableDef)->optionFlags.bitA;
177  }
178 
179  inline bool blobFieldUsed() const { return (*m_tableDef)->optionFlags.bitB; }
180 
181  bool logicalToString() const;
182  void setLogicalToString(bool v);
183  void* optionalData() const;
184  void setOptionalData(void* v);
185  bool myDateTimeValueByBtrv() const;
186  void insertBookmarks(unsigned int start, void* data, ushort_td count);
187  int bookmarksCount() const;
188  void moveBookmarks(unsigned int index);
189  bookmark_td bookmarks(unsigned int index) const;
190  void clearBuffer();
191  unsigned int getRecordHash();
192  void smartUpdate();
193 
194  void setMra(multiRecordAlocator* p);
195  multiRecordAlocator* mra() const;
196 
197  void find(eFindType type = findForword);
198  void findFirst();
199  void findLast();
200  void findNext(bool notIncCurrent = true);
201  void findPrev(bool notIncCurrent = true);
202  short statReasonOfFind() const ;
203  eFindType lastFindDirection() const;
204  bookmark_td bookmarkFindCurrent() const;
205  pq_handle setQuery(const queryBase* query, bool serverPrepare=false);
206  pq_handle prepare(const queryBase* query, bool serverPrepare=false)
207  {
208  return setQuery(query, serverPrepare);
209  }
210  void setPrepare(const pq_handle stmt);
211 
212  void setFilter(const _TCHAR* str, ushort_td rejectCount,
213  ushort_td cacheCount, bool autoEscape = true);
214  short fieldNumByName(const _TCHAR* name);
215  unsigned char getFVbyt(short index);
216  short getFVsht(short index);
217  int getFVint(short index);
218  int getFVlng(short index);
219  __int64 getFV64(short index);
220  float getFVflt(short index);
221  double getFVdbl(short index);
222  const char* getFVAstr(short index);
223  void* getFVbin(short index, uint_td& size);
224  unsigned char getFVbyt(const _TCHAR* fieldName);
225  short getFVsht(const _TCHAR* fieldName);
226  int getFVint(const _TCHAR* fieldName);
227  int getFVlng(const _TCHAR* fieldName);
228  __int64 getFV64(const _TCHAR* fieldName);
229  float getFVflt(const _TCHAR* fieldName);
230  double getFVdbl(const _TCHAR* fieldName);
231  const char* getFVAstr(const _TCHAR* fieldName);
232  void* getFVbin(const _TCHAR* fieldName, uint_td& size);
233  void setFV(short index, double data);
234  void setFV(short index, float data);
235  void setFV(short index, unsigned char data);
236  void setFV(short index, short data);
237  void setFVA(short index, const char* data);
238  void setFV(short index, int data);
239  void setFV(short index, const void* data, uint_td size);
240  void setFV(const _TCHAR* fieldName, int data);
241  void setFVA(const _TCHAR* fieldName, const char* data);
242 
243 #ifdef _WIN32
244  const wchar_t* getFVWstr(const _TCHAR* fieldName);
245  const wchar_t* getFVWstr(short index);
246  void setFVW(short index, const wchar_t* data);
247  void setFVW(const _TCHAR* fieldName, const wchar_t* data);
248 #endif
249 
250 #ifdef _UNICODE
251  inline const wchar_t* getFVstr(short index) { return getFVWstr(index); };
252  inline const wchar_t* getFVstr(const wchar_t* fieldName)
253  {
254  return getFVWstr(fieldName);
255  };
256 #else
257  inline const char* getFVstr(short index) { return getFVAstr(index); };
258  inline const char* getFVstr(const char* fieldName)
259  {
260  return getFVAstr(fieldName);
261  };
262 #endif
263 
264  inline void setFV(short index, const char* data) { setFVA(index, data); };
265  inline void setFV(const _TCHAR* fieldName, const char* data)
266  {
267  setFVA(fieldName, data);
268  };
269 #ifdef _WIN32
270  inline void setFV(short index, const wchar_t* data)
271  {
272  setFVW(index, data);
273  };
274  inline void setFV(const _TCHAR* fieldName, const wchar_t* data)
275  {
276  setFVW(fieldName, data);
277  };
278 #endif
279 
280  void setFV(const _TCHAR* fieldName, double data);
281  void setFV(const _TCHAR* fieldName, float data);
282  void setFV(const _TCHAR* fieldName, unsigned char data);
283  void setFV(const _TCHAR* fieldName, short data);
284  void setFV(const _TCHAR* fieldName, const void* data, uint_td size);
285  void setFV(short index, __int64 data);
286  void setFV(const _TCHAR* fieldName, __int64 data);
287  void* fieldPtr(short index) const;
288  void keyValueDescription(_TCHAR* buf, int bufsize);
289  short getCurProcFieldCount() const;
290  short getCurProcFieldIndex(short index) const;
291  void setOnRecordCount(const recordCountFn v);
292  recordCountFn onRecordCount() const;
293  client::fields& fields();
294 };
295 
296 #define KEYVALUE_PTR 0
297 #define KEYVALUE_STR 1
298 #define KEYVALUE_NEED_COPY 2
299 #define KEYVALUE_STR_NEED_COPY 3
300 
301 /** @cond INTERNAL */
302 
303 struct DLLLIB keyValuePtr
304 {
305 
306  const void* ptr;
307  ushort_td len;
308  short type;
309  keyValuePtr(const void* p, ushort_td l, short typeStr);
310  ~keyValuePtr();
311 };
312 /** @endcond */
313 
314 class DLLLIB queryBase
315 {
316  friend class filter;
317  struct impl* m_impl;
318 
319 protected:
320  const std::vector<std::_tstring>& getSelects() const;
321  const std::vector<std::_tstring>& getWheres() const;
322  const std::vector<std::_tstring>& getSeekKeyValues() const;
323  const std::vector<keyValuePtr>& getSeekValuesPtr() const;
324 
325 public:
327  {
328  none = 0,
329  joinHasOneOrHasMany = 1,
330  combineCondition = 2
331  };
332 
333  queryBase();
334  queryBase(const queryBase& r);
335  queryBase& operator=(const queryBase& r);
336 
337  virtual ~queryBase();
338  void reset();
339  void clearSeekKeyValues();
340  void clearSelectFields();
341  void addField(const _TCHAR* name);
342  void addLogic(const _TCHAR* name, const _TCHAR* logic, const _TCHAR* value);
343  void addLogic(const _TCHAR* combine, const _TCHAR* name,
344  const _TCHAR* logic, const _TCHAR* value);
345  void addSeekKeyValue(const _TCHAR* value, bool reset = false);
346  void addSeekBookmark(bookmark_td& bm, ushort_td len, bool reset = false);
347  void addSeekKeyValuePtr(const void* value, ushort_td len, short typeStr,
348  bool reset = false);
349  void reserveSeekKeyValueSize(size_t v);
350  void reserveSeekKeyValuePtrSize(size_t v);
351  queryBase& queryString(const _TCHAR* str, bool autoEscape = false);
352  queryBase& reject(int v);
353  queryBase& limit(int v);
354  queryBase& direction(table::eFindType v);
355  queryBase& all();
356  queryBase& optimize(eOptimize v);
357  queryBase& bookmarkAlso(bool v);
358  queryBase& joinKeySize(int v);
359  queryBase& stopAtLimit(bool v);
360  const _TCHAR* toString() const;
361  table::eFindType getDirection() const;
362  int getReject() const;
363  int getLimit() const;
364  bool isAll() const;
365  int getJoinKeySize() const;
366  eOptimize getOptimize() const;
367  bool isStopAtLimit() const;
368  bool isBookmarkAlso() const;
369  bool isSeekByBookmarks() const;
370  short selectCount() const;
371  const _TCHAR* getSelect(short index) const;
372  short whereTokens() const;
373  const _TCHAR* getWhereToken(short index) const;
374  void setWhereToken(short index, const _TCHAR* v);
375  void reverseAliasName(const _TCHAR* alias, const _TCHAR* src);
376  void release(); // don't virtual
377  static queryBase* create();
378 };
379 
380 /** @cond INTERNAL */
381 
382 inline std::_tstring lexical_cast(__int64 v)
383 {
384  _TCHAR tmp[256];
385  _i64tot_s(v, tmp, 256, 10);
386  return std::_tstring(tmp);
387 }
388 
389 inline std::_tstring lexical_cast(int v)
390 {
391  _TCHAR tmp[256];
392  _ltot_s(v, tmp, 256, 10);
393  return std::_tstring(tmp);
394 }
395 
396 inline std::_tstring lexical_cast(short v)
397 {
398  _TCHAR tmp[256];
399  _ltot_s((int)v, tmp, 256, 10);
400  return std::_tstring(tmp);
401 }
402 
403 inline std::_tstring lexical_cast(char v)
404 {
405  _TCHAR tmp[256];
406  _ltot_s((int)v, tmp, 256, 10);
407  return std::_tstring(tmp);
408 }
409 
410 inline std::_tstring lexical_cast(double v)
411 {
412  _TCHAR tmp[256];
413  _stprintf_s(tmp, 256, _T("%.*f"), 15, v);
414  return std::_tstring(tmp);
415 }
416 
417 inline std::_tstring lexical_cast(float v)
418 {
419  _TCHAR tmp[256];
420  _stprintf_s(tmp, 256, _T("%.*f"), 15, v);
421  return std::_tstring(tmp);
422 }
423 
424 inline std::_tstring lexical_cast(const _TCHAR* v)
425 {
426  if (v)
427  return std::_tstring(v);
428  return std::_tstring(_T(""));
429 }
430 
431 class qlogic
432 {
433  std::_tstring m_name;
434  std::_tstring m_value;
435  std::_tstring m_type;
436  combineType m_next;
437 
438 public:
439  template <class T>
440  qlogic(const _TCHAR* name, const _TCHAR* type, T value, combineType next)
441  : m_name(name), m_type(type), m_next(next)
442  {
443  m_value = lexical_cast(value);
444  }
445 };
446 /** @endcond */
447 
448 class DLLLIB query : public queryBase
449 {
450 public:
451  query() : queryBase() {}
452  query(const query& r) : queryBase(r) {}
453 
454  virtual ~query() {}
455 
457  {
459  return *this;
460  }
461 
462  query& select(const _TCHAR* name, const _TCHAR* name1 = NULL,
463  const _TCHAR* name2 = NULL, const _TCHAR* name3 = NULL,
464  const _TCHAR* name4 = NULL, const _TCHAR* name5 = NULL,
465  const _TCHAR* name6 = NULL, const _TCHAR* name7 = NULL,
466  const _TCHAR* name8 = NULL, const _TCHAR* name9 = NULL,
467  const _TCHAR* name10 = NULL)
468  {
469  if (_tcscmp(name, _T("*")) == 0)
470  {
471  clearSelectFields();
472  return *this;
473  }
474  addField(name);
475  if (name1)
476  addField(name1);
477  if (name2)
478  addField(name2);
479  if (name3)
480  addField(name3);
481  if (name4)
482  addField(name4);
483  if (name5)
484  addField(name5);
485  if (name6)
486  addField(name6);
487  if (name7)
488  addField(name7);
489  if (name8)
490  addField(name8);
491  if (name9)
492  addField(name9);
493  if (name10)
494  addField(name10);
495  return *this;
496  }
497 
498  template <class T>
499  query& where(const _TCHAR* name, const _TCHAR* qlogic, T value)
500  {
501  addLogic(name, qlogic, lexical_cast(value).c_str());
502  return *this;
503  }
504 
505  template <class T>
506  query& and_(const _TCHAR* name, const _TCHAR* qlogic, T value)
507  {
508  if (whereTokens() == 0)
509  THROW_BZS_ERROR_WITH_CODEMSG(STATUS_FILTERSTRING_ERROR,
510  _T("Invalid function call."));
511 
512  addLogic(_T("and"), name, qlogic, lexical_cast(value).c_str());
513  return *this;
514  }
515 
516  template <class T>
517  query& or_(const _TCHAR* name, const _TCHAR* qlogic, T value)
518  {
519  if (whereTokens() == 0)
520  THROW_BZS_ERROR_WITH_CODEMSG(STATUS_FILTERSTRING_ERROR,
521  _T("Invalid function call."));
522 
523  addLogic(_T("or"), name, qlogic, lexical_cast(value).c_str());
524  return *this;
525  }
526 
527  template <class T0, class T1, class T2, class T3, class T4, class T5,
528  class T6, class T7>
529  query& in(const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3,
530  const T4 kv4, const T5 kv5, const T6 kv6, const T7 kv7)
531  {
532  addSeekKeyValue(lexical_cast(kv0).c_str());
533  addSeekKeyValue(lexical_cast(kv1).c_str());
534  addSeekKeyValue(lexical_cast(kv2).c_str());
535  addSeekKeyValue(lexical_cast(kv3).c_str());
536  addSeekKeyValue(lexical_cast(kv4).c_str());
537  addSeekKeyValue(lexical_cast(kv5).c_str());
538  addSeekKeyValue(lexical_cast(kv6).c_str());
539  addSeekKeyValue(lexical_cast(kv7).c_str());
540  return *this;
541  }
542  template <class T0, class T1, class T2, class T3, class T4, class T5,
543  class T6>
544  query& in(const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3,
545  const T4 kv4, const T5 kv5, const T6 kv6)
546  {
547  addSeekKeyValue(lexical_cast(kv0).c_str());
548  addSeekKeyValue(lexical_cast(kv1).c_str());
549  addSeekKeyValue(lexical_cast(kv2).c_str());
550  addSeekKeyValue(lexical_cast(kv3).c_str());
551  addSeekKeyValue(lexical_cast(kv4).c_str());
552  addSeekKeyValue(lexical_cast(kv5).c_str());
553  addSeekKeyValue(lexical_cast(kv6).c_str());
554  return *this;
555  }
556 
557  template <class T0, class T1, class T2, class T3, class T4, class T5>
558  query& in(const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3,
559  const T4 kv4, const T5 kv5)
560  {
561  addSeekKeyValue(lexical_cast(kv0).c_str());
562  addSeekKeyValue(lexical_cast(kv1).c_str());
563  addSeekKeyValue(lexical_cast(kv2).c_str());
564  addSeekKeyValue(lexical_cast(kv3).c_str());
565  addSeekKeyValue(lexical_cast(kv4).c_str());
566  addSeekKeyValue(lexical_cast(kv5).c_str());
567  return *this;
568  }
569 
570  template <class T0, class T1, class T2, class T3, class T4>
571  query& in(const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3,
572  const T4 kv4)
573  {
574  addSeekKeyValue(lexical_cast(kv0).c_str());
575  addSeekKeyValue(lexical_cast(kv1).c_str());
576  addSeekKeyValue(lexical_cast(kv2).c_str());
577  addSeekKeyValue(lexical_cast(kv3).c_str());
578  addSeekKeyValue(lexical_cast(kv4).c_str());
579  return *this;
580  }
581 
582  template <class T0, class T1, class T2, class T3>
583  query& in(const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3)
584  {
585  addSeekKeyValue(lexical_cast(kv0).c_str());
586  addSeekKeyValue(lexical_cast(kv1).c_str());
587  addSeekKeyValue(lexical_cast(kv2).c_str());
588  addSeekKeyValue(lexical_cast(kv3).c_str());
589  return *this;
590  }
591 
592  template <class T0, class T1, class T2>
593  query& in(const T0 kv0, const T1 kv1, const T2 kv2)
594  {
595  addSeekKeyValue(lexical_cast(kv0).c_str());
596  addSeekKeyValue(lexical_cast(kv1).c_str());
597  addSeekKeyValue(lexical_cast(kv2).c_str());
598  return *this;
599  }
600 
601  template <class T0, class T1> query& in(const T0 kv0, const T1 kv1)
602  {
603  addSeekKeyValue(lexical_cast(kv0).c_str());
604  addSeekKeyValue(lexical_cast(kv1).c_str());
605  return *this;
606  }
607 
608  template <class T0> query& in(const T0 kv0)
609  {
610  addSeekKeyValue(lexical_cast(kv0).c_str());
611  return *this;
612  }
613 
614  static query* create(); // implemet int activeTable.cpp
615 };
616 
617 /** @cond INTERNAL */
618 int DLLLIB makeSupplyValues(/*in out*/const _TCHAR* values[], int size,
619  const _TCHAR* value, const _TCHAR* value1 = NULL,
620  const _TCHAR* value2 = NULL, const _TCHAR* value3 = NULL,
621  const _TCHAR* value4 = NULL, const _TCHAR* value5 = NULL,
622  const _TCHAR* value6 = NULL, const _TCHAR* value7 = NULL,
623  const _TCHAR* value8 = NULL, const _TCHAR* value9 = NULL,
624  const _TCHAR* value10 = NULL);
625 /** @endcond */
626 
627 bool DLLLIB supplyValues(pq_handle& filter, const _TCHAR* values[], int size);
628 bool DLLLIB supplyValue(pq_handle& filter, int index, const _TCHAR* v);
629 bool DLLLIB supplyValue(pq_handle& filter, int index, short v);
630 bool DLLLIB supplyValue(pq_handle& filter, int index, int v);
631 bool DLLLIB supplyValue(pq_handle& filter, int index, __int64 v);
632 bool DLLLIB supplyValue(pq_handle& filter, int index, float v);
633 bool DLLLIB supplyValue(pq_handle& filter, int index, double v);
634 
635 //bool DLLLIB supplyInValues(pq_handle& filter, const _TCHAR* values[], size_t size, int segments);
636 
637 
638 
639 
640 
641 #pragma warning(default : 4251)
642 
643 } // namespace client
644 } // namespace tdap
645 } // namespace protocol
646 } // namespace db
647 } // namespace bzs
648 
649 #endif // BZS_DB_PROTOCOL_TDAP_CLIENT_TABLE_H
query & in(const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3, const T4 kv4)
Definition: table.h:571
const _TCHAR * protocol(const _TCHAR *uri)
Definition: uri.h:42
combineType
Definition: tdapSchema.h:815
query()
Definition: table.h:451
query(const query &r)
Definition: table.h:452
int onInsertBefore()
Definition: table.h:150
const tabledef * tableDef() const
Definition: table.h:168
pq_handle setQuery(table_ptr &tb, const queryBase &q, bool serverPrepare=false)
Definition: trdboostapi.h:544
void writeRecordData()
Definition: table.h:140
クエリー(フィルター)作成の補助をするためのベースクラス
Definition: table.h:314
query & in(const T0 kv0, const T1 kv1)
Definition: table.h:601
eFindType
Definition: nsTable.h:56
const char * getFVstr(const char *fieldName)
Definition: table.h:258
データベースアクセス基本クラス (nocopyable)
Definition: nsDatabase.h:55
query & where(const _TCHAR *name, const _TCHAR *qlogic, T value)
Definition: table.h:499
フィールドコレクションクラス
Definition: fields.h:224
eOptimize
クエリーの実行時に行われる最適化条件をセットします。
Definition: table.h:326
findIterator find(table_ptr tb, const char_td keynum, const Q &q, const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3, const T4 kv4, const T5 kv5, const T6 kv6, const T7 kv7)
Definition: trdboostapi.h:569
query & reset()
Definition: table.h:456
query & in(const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3, const T4 kv4, const T5 kv5, const T6 kv6)
Definition: table.h:544
bool DLLLIB supplyValues(pq_handle &filter, const _TCHAR *values[], int size)
eFindType
findオペレーションで検索の方向を示すタイプ
Definition: nsTable.h:56
テーブルアクセスクラス (nocopyable)
Definition: table.h:89
query & in(const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3, const T4 kv4, const T5 kv5, const T6 kv6, const T7 kv7)
Definition: table.h:529
int onUpdateBefore()
Definition: table.h:145
テーブルアクセスの基本クラス (abstruct nocopyable)
Definition: nsTable.h:44
void setFV(const _TCHAR *fieldName, const char *data)
Definition: table.h:265
query & select(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)
Definition: table.h:462
query & in(const T0 kv0, const T1 kv1, const T2 kv2)
Definition: table.h:593
fielddef のコレクションクラス
Definition: field.h:73
query & in(const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3)
Definition: table.h:583
query & in(const T0 kv0)
Definition: table.h:608
グルーピング レコード数カウンター
Definition: groupQuery.h:229
create tableで使用するキーセグメント定義構造体
Definition: tdapSchema.h:108
フィールドコレクションのベースクラス
Definition: fields.h:123
fieldsBase row
Definition: fields.h:220
bool DLLLIB supplyValue(pq_handle &filter, int index, const _TCHAR *v)
query & and_(const _TCHAR *name, const _TCHAR *qlogic, T value)
Definition: table.h:506
読み取り用クエリー
Definition: table.h:448
const char * getFVstr(short index)
Definition: table.h:257
データベースアクセスクラス
Definition: database.h:59
query & in(const T0 kv0, const T1 kv1, const T2 kv2, const T3 kv3, const T4 kv4, const T5 kv5)
Definition: table.h:558
void setFV(short index, const char *data)
Definition: table.h:264
virtual void setNoUpdateTimeStamp(bool v)
Definition: table.h:163
query & or_(const _TCHAR *name, const _TCHAR *qlogic, T value)
Definition: table.h:517
pq_handle prepare(const queryBase *query, bool serverPrepare=false)
Definition: table.h:206
const _TCHAR * c_str(const btrDate &d)
Definition: btrDate.h:207
bool valiableFormatType() const
Definition: table.h:174
bool blobFieldUsed() const
Definition: table.h:179
const tabledef ** tableDefPtr() const
Definition: table.h:169
テーブル定義構造体
Definition: tdapSchema.h:660
virtual ~query()
Definition: table.h:454

Transactd SDK 2015年09月08日(火) 19時13分35秒 doxygen