transactd 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CMakeLists.txt +37 -4
- data/bin/common/tdclc_32_1_2.dll +0 -0
- data/bin/common/tdclc_64_1_2.dll +0 -0
- data/build/common/transactd_cl_common.cmake +0 -1
- data/build/common/transactd_common.cmake +26 -6
- data/build/swig/php/generate.cmake.in +58 -0
- data/build/swig/php/generate.cmd.in +41 -0
- data/build/swig/php/php.swg +155 -0
- data/build/swig/ruby/ruby.swg +38 -0
- data/build/swig/tdcl.i +133 -3
- data/build/tdclc/CMakeLists.txt +4 -1
- data/build/tdclc/tdclc_32.cbproj +1 -1
- data/build/tdclc/tdclc_64.cbproj +1 -1
- data/build/tdclcpp/CMakeLists.txt +1 -1
- data/build/tdclcpp/tdclcpp_bcb_32.cbproj +1 -4
- data/build/tdclcpp/tdclcpp_bcb_64.cbproj +0 -3
- data/build/tdclrb/CMakeLists.txt +1 -1
- data/build/tdclrb/GEM_VERSION +2 -2
- data/source/bzs/db/engine/mysql/IReadRecords.h +1 -1
- data/source/bzs/db/engine/mysql/bookmark.h +3 -3
- data/source/bzs/db/engine/mysql/database.cpp +95 -19
- data/source/bzs/db/engine/mysql/database.h +6 -6
- data/source/bzs/db/engine/mysql/mysqlInternal.h +43 -1
- data/source/bzs/db/engine/mysql/mysqlThd.cpp +10 -8
- data/source/bzs/db/protocol/hs/hsCommandExecuter.cpp +1 -1
- data/source/bzs/db/protocol/tdap/btrDate.h +2 -2
- data/source/bzs/db/protocol/tdap/client/dbDef.cpp +15 -8
- data/source/bzs/db/protocol/tdap/client/dbDef.h +2 -2
- data/source/bzs/db/protocol/tdap/client/dllmain.cpp +4 -0
- data/source/bzs/db/protocol/tdap/client/fieldDDF.cpp +0 -5
- data/source/bzs/db/protocol/tdap/client/fileDDF.cpp +0 -4
- data/source/bzs/db/protocol/tdap/client/filter.cpp +0 -484
- data/source/bzs/db/protocol/tdap/client/filter.h +696 -84
- data/source/bzs/db/protocol/tdap/client/nsTable.cpp +13 -3
- data/source/bzs/db/protocol/tdap/client/nsTable.h +12 -6
- data/source/bzs/db/protocol/tdap/client/sqlBuilder.cpp +2 -1
- data/source/bzs/db/protocol/tdap/client/stringConverter.h +1 -0
- data/source/bzs/db/protocol/tdap/client/table.cpp +519 -75
- data/source/bzs/db/protocol/tdap/client/table.h +49 -7
- data/source/bzs/db/protocol/tdap/client/trdboostapi.h +145 -124
- data/source/bzs/db/protocol/tdap/client/trdboostapiInternal.h +39 -0
- data/source/bzs/db/protocol/tdap/client/trdormapi.h +872 -0
- data/source/bzs/db/protocol/tdap/myDateTime.cpp +8 -8
- data/source/bzs/db/protocol/tdap/mysql/databaseSchema.cpp +7 -9
- data/source/bzs/db/protocol/tdap/mysql/recordsetReader.h +406 -195
- data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.cpp +64 -13
- data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.h +2 -1
- data/source/bzs/db/protocol/tdap/tdapSchema.cpp +35 -3
- data/source/bzs/db/protocol/tdap/tdapSchema.h +11 -3
- data/source/bzs/db/protocol/tdap/tdapcapi.h +63 -53
- data/source/bzs/env/crosscompile.h +8 -3
- data/source/bzs/example/connection_pool_c.cpp +1 -7
- data/source/bzs/example/useORM.cpp +585 -0
- data/source/bzs/rtl/exception.h +6 -0
- data/source/bzs/test/tdclatl/bench_tdclatl.js +12 -7
- data/source/bzs/test/tdclphp/transactd_Test.php +1845 -0
- data/source/bzs/test/tdclphp/transactd_blob_Test.php +325 -0
- data/source/bzs/test/tdclphp/transactd_datetime_Test.php +183 -0
- data/source/bzs/test/tdclphp/transactd_kanjischema_Test.php +212 -0
- data/source/bzs/test/tdclrb/transactd_blob_spec.rb +332 -0
- data/source/bzs/test/tdclrb/transactd_spec.rb +256 -1
- data/source/bzs/test/trdclengn/test_blob.cpp +327 -0
- data/source/bzs/test/trdclengn/test_trdclengn.cpp +485 -5
- data/source/global/tdclatl/QueryBase.cpp +231 -0
- data/source/global/tdclatl/QueryBase.h +96 -0
- data/source/global/tdclatl/Table.cpp +24 -0
- data/source/global/tdclatl/Table.h +2 -1
- data/source/global/tdclatl/resource.h +0 -0
- data/source/global/tdclatl/tdclatl.idl +88 -2
- metadata +16 -3
- data/bin/common/tdclc_32_1_1.dll +0 -0
- data/bin/common/tdclc_64_1_1.dll +0 -0
|
@@ -143,6 +143,14 @@ std::string getTableName(const request& req, bool forSql)
|
|
|
143
143
|
return "";
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
const char* getOwnerName(const request& req)
|
|
147
|
+
{
|
|
148
|
+
const char* p = (const char*)req.data;
|
|
149
|
+
if (*req.datalen && (p[*req.datalen-1] == 0x00))
|
|
150
|
+
return p;
|
|
151
|
+
return "";
|
|
152
|
+
}
|
|
153
|
+
|
|
146
154
|
void dumpStdErr(int op, request& req, table* tb)
|
|
147
155
|
{
|
|
148
156
|
boost::scoped_array<char> msg(new char[1024]);
|
|
@@ -357,7 +365,7 @@ inline void dbExecuter::doOpenTable(request& req)
|
|
|
357
365
|
if (dbname != "")
|
|
358
366
|
{
|
|
359
367
|
database* db = getDatabase(dbname.c_str(), req.cid);
|
|
360
|
-
m_tb = db->openTable(getTableName(req), req.keyNum);// if error occured that throw exception
|
|
368
|
+
m_tb = db->openTable(getTableName(req), req.keyNum, getOwnerName(req));// if error occured that throw exception
|
|
361
369
|
req.result = db->stat();
|
|
362
370
|
if (m_tb)
|
|
363
371
|
{
|
|
@@ -458,7 +466,8 @@ inline int dbExecuter::doReadMultiWithSeek(request& req, int op, char* resultBuf
|
|
|
458
466
|
m_tb->seekKey((op == TD_KEY_GE_NEXT_MULTI) ? HA_READ_KEY_OR_NEXT : HA_READ_KEY_OR_PREV);
|
|
459
467
|
|
|
460
468
|
extRequest* ereq = (extRequest*)req.data;
|
|
461
|
-
req.result = m_readHandler->begin(m_tb, ereq,
|
|
469
|
+
req.result = m_readHandler->begin(m_tb, ereq, true
|
|
470
|
+
, resultBuffer, RETBUF_EXT_RESERVE_SIZE, *req.datalen, (op == TD_KEY_GE_NEXT_MULTI));
|
|
462
471
|
if (req.result != 0)
|
|
463
472
|
return 1;
|
|
464
473
|
if (m_tb->stat() == 0)
|
|
@@ -489,18 +498,34 @@ inline int dbExecuter::doReadMulti(request& req, int op, char* resultBuffer
|
|
|
489
498
|
m_tb = getTable(req.pbk->handle);
|
|
490
499
|
extRequest* ereq = (extRequest*)req.data;
|
|
491
500
|
bool incCurrent = !((ereq->type[0]=='E') && (ereq->type[1]=='G'));
|
|
492
|
-
|
|
501
|
+
bool forword = (op == TD_KEY_NEXT_MULTI) || (op == TD_POS_NEXT_MULTI);
|
|
502
|
+
req.result = m_readHandler->begin(m_tb, ereq,(op != TD_KEY_SEEK_MULTI)
|
|
503
|
+
, resultBuffer, RETBUF_EXT_RESERVE_SIZE, *req.datalen, forword);
|
|
493
504
|
if (req.result == 0)
|
|
494
505
|
{
|
|
495
|
-
if (op ==
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
m_tb->
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
506
|
+
if (op == TD_KEY_SEEK_MULTI)
|
|
507
|
+
{
|
|
508
|
+
char keynum = m_tb->keyNumByMakeOrder(req.keyNum);
|
|
509
|
+
if (m_tb->setKeyNum(keynum))
|
|
510
|
+
req.result = errorCodeSht(seekEach(ereq));
|
|
511
|
+
else
|
|
512
|
+
{
|
|
513
|
+
if (m_tb)m_tb->unUse();
|
|
514
|
+
return ret;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
else
|
|
518
|
+
{
|
|
519
|
+
if (op == TD_KEY_NEXT_MULTI)
|
|
520
|
+
m_tb->getNextExt(m_readHandler, incCurrent);
|
|
521
|
+
else if (op == TD_KEY_PREV_MULTI)
|
|
522
|
+
m_tb->getPrevExt(m_readHandler, incCurrent);
|
|
523
|
+
else if (op == TD_POS_NEXT_MULTI)
|
|
524
|
+
m_tb->stepNextExt(m_readHandler, incCurrent);
|
|
525
|
+
else if (op == TD_POS_PREV_MULTI)
|
|
526
|
+
m_tb->stepPrevExt(m_readHandler, incCurrent);
|
|
527
|
+
req.result = errorCodeSht(m_tb->stat());
|
|
528
|
+
}
|
|
504
529
|
DEBUG_WRITELOG2(op, req);
|
|
505
530
|
size = req.serializeForExt(m_tb, resultBuffer, m_readHandler->end());
|
|
506
531
|
if ((req.paramMask & P_MASK_BLOBBODY) && m_blobBuffer->fieldCount())
|
|
@@ -514,6 +539,26 @@ inline int dbExecuter::doReadMulti(request& req, int op, char* resultBuffer
|
|
|
514
539
|
return ret;
|
|
515
540
|
}
|
|
516
541
|
|
|
542
|
+
inline short dbExecuter::seekEach(extRequest* ereq)
|
|
543
|
+
{
|
|
544
|
+
short stat = 0;
|
|
545
|
+
logicalField* fd = &ereq->field;
|
|
546
|
+
for (int i=0;i<ereq->logicalCount;++i)
|
|
547
|
+
{
|
|
548
|
+
m_tb->setKeyValuesPacked(fd->ptr, fd->len);
|
|
549
|
+
m_tb->seekKey(HA_READ_KEY_EXACT);
|
|
550
|
+
if (m_tb->stat() == 0)
|
|
551
|
+
stat = m_readHandler->write(m_tb->position(), m_tb->posPtrLen());
|
|
552
|
+
else
|
|
553
|
+
stat = m_readHandler->write(NULL, m_tb->posPtrLen(), errorCodeSht(m_tb->stat()));
|
|
554
|
+
if (stat) break;
|
|
555
|
+
fd = fd->next();
|
|
556
|
+
}
|
|
557
|
+
if (stat==0)
|
|
558
|
+
stat = STATUS_REACHED_FILTER_COND;
|
|
559
|
+
return stat;
|
|
560
|
+
}
|
|
561
|
+
|
|
517
562
|
inline void dbExecuter::doStepRead(request& req, int op)
|
|
518
563
|
{
|
|
519
564
|
m_tb = getTable(req.pbk->handle);
|
|
@@ -846,7 +891,12 @@ int dbExecuter::commandExec(request& req, char* resultBuffer, size_t& size, nets
|
|
|
846
891
|
{
|
|
847
892
|
database* db = getDatabaseCid(req.cid);
|
|
848
893
|
m_tb = getTable(req.pbk->handle);
|
|
849
|
-
|
|
894
|
+
int num = (req.keyNum >1) ? req.keyNum -2: req.keyNum;
|
|
895
|
+
num += '0';
|
|
896
|
+
std::string s("%@%");
|
|
897
|
+
s += (const char*)#
|
|
898
|
+
s += (const char*)req.keybuf;
|
|
899
|
+
req.result = ddl_execSql(db->thd(), makeSQLChangeTableComment(db->name(), m_tb->name(), s.c_str()));
|
|
850
900
|
break;
|
|
851
901
|
}
|
|
852
902
|
case TD_DROP_INDEX:
|
|
@@ -861,6 +911,7 @@ int dbExecuter::commandExec(request& req, char* resultBuffer, size_t& size, nets
|
|
|
861
911
|
if (doReadMultiWithSeek(req, op, resultBuffer, size, optionalData) == EXECUTE_RESULT_SUCCESS)
|
|
862
912
|
return EXECUTE_RESULT_SUCCESS; // Caution Call unUse()
|
|
863
913
|
break;
|
|
914
|
+
case TD_KEY_SEEK_MULTI:
|
|
864
915
|
case TD_KEY_NEXT_MULTI:
|
|
865
916
|
case TD_KEY_PREV_MULTI:
|
|
866
917
|
case TD_POS_NEXT_MULTI:
|
|
@@ -39,6 +39,7 @@ namespace mysql
|
|
|
39
39
|
{
|
|
40
40
|
|
|
41
41
|
class ReadRecordsHandler;
|
|
42
|
+
struct extRequest;
|
|
42
43
|
|
|
43
44
|
#define FOR_SQL true
|
|
44
45
|
|
|
@@ -72,7 +73,7 @@ class dbExecuter : public engine::mysql::dbManager
|
|
|
72
73
|
inline void doDeleteKey(request& req);
|
|
73
74
|
inline void doInsertBulk(request& req);
|
|
74
75
|
inline void doStat(request& req);
|
|
75
|
-
|
|
76
|
+
inline short seekEach(extRequest* ereq);
|
|
76
77
|
public:
|
|
77
78
|
dbExecuter();
|
|
78
79
|
~dbExecuter();
|
|
@@ -130,10 +130,9 @@ void tabledef::setTableName(const wchar_t* s)
|
|
|
130
130
|
WideCharToMultiByte(schemaCodePage, (schemaCodePage == CP_UTF8) ? 0:WC_COMPOSITECHECK, s, -1, m_tableName, TABLE_NAME_SIZE, NULL, NULL);
|
|
131
131
|
}
|
|
132
132
|
#endif //_UNICODE
|
|
133
|
-
|
|
134
|
-
bool fielddef::isStringType()const
|
|
133
|
+
bool isStringType(uchar_td type)
|
|
135
134
|
{
|
|
136
|
-
|
|
135
|
+
return ((type == ft_string)|| (type == ft_zstring)
|
|
137
136
|
||(type == ft_wstring)|| (type == ft_wzstring)
|
|
138
137
|
||(type == ft_myvarchar)|| (type == ft_myvarbinary)
|
|
139
138
|
||(type == ft_mywvarchar)|| (type == ft_mywvarbinary)
|
|
@@ -142,6 +141,12 @@ bool fielddef::isStringType()const
|
|
|
142
141
|
||(type == ft_lstring)|| (type == ft_note));
|
|
143
142
|
}
|
|
144
143
|
|
|
144
|
+
|
|
145
|
+
bool fielddef::isStringType()const
|
|
146
|
+
{
|
|
147
|
+
return tdap::isStringType(type);
|
|
148
|
+
}
|
|
149
|
+
|
|
145
150
|
unsigned int fielddef::charNum(/*int index*/)const
|
|
146
151
|
{
|
|
147
152
|
if (type==ft_mychar)
|
|
@@ -215,6 +220,7 @@ const _TCHAR* getTypeName(short type)
|
|
|
215
220
|
case ft_mytimestamp: return _T("myTimeStamp");
|
|
216
221
|
case ft_mytext: return _T("myText");
|
|
217
222
|
case ft_myblob: return _T("myBlob");
|
|
223
|
+
case ft_autoIncUnsigned: return _T("AutoIncUnsigned");
|
|
218
224
|
case ft_nullindicator: return _T("Nullindicator");
|
|
219
225
|
default: return _T("Unknown");
|
|
220
226
|
}
|
|
@@ -299,6 +305,32 @@ const _TCHAR* btrVersion::moduleVersionShortString(_TCHAR* buf)
|
|
|
299
305
|
return buf;
|
|
300
306
|
}
|
|
301
307
|
|
|
308
|
+
PACKAGE uchar_td getFilterLogicTypeCode(const _TCHAR* cmpstr)
|
|
309
|
+
{
|
|
310
|
+
if (_tcscmp(cmpstr, _T("=")) == 0)
|
|
311
|
+
return (uchar_td)1;
|
|
312
|
+
|
|
313
|
+
if (_tcscmp(cmpstr, _T(">")) == 0)
|
|
314
|
+
return (uchar_td)2;
|
|
315
|
+
|
|
316
|
+
if (_tcscmp(cmpstr, _T("<")) == 0)
|
|
317
|
+
return (uchar_td)3;
|
|
318
|
+
|
|
319
|
+
if (_tcscmp(cmpstr, _T("<>")) == 0)
|
|
320
|
+
return (uchar_td)4;
|
|
321
|
+
|
|
322
|
+
if (_tcscmp(cmpstr, _T("=>")) == 0)
|
|
323
|
+
return (uchar_td)5;
|
|
324
|
+
if (_tcscmp(cmpstr, _T(">=")) == 0)
|
|
325
|
+
return (uchar_td)5;
|
|
326
|
+
|
|
327
|
+
if (_tcscmp(cmpstr, _T("=<")) == 0)
|
|
328
|
+
return (uchar_td)6;
|
|
329
|
+
if (_tcscmp(cmpstr, _T("<=")) == 0)
|
|
330
|
+
return (uchar_td)6;
|
|
331
|
+
return 255;
|
|
332
|
+
}
|
|
333
|
+
|
|
302
334
|
}//namespace tdap
|
|
303
335
|
}//namespace protocol
|
|
304
336
|
}//namespace db
|
|
@@ -134,11 +134,12 @@ struct keySegment
|
|
|
134
134
|
|
|
135
135
|
/* brief A key infomation
|
|
136
136
|
*/
|
|
137
|
+
#define MAX_KEY_SEGMENT 8
|
|
137
138
|
struct keydef
|
|
138
139
|
{
|
|
139
|
-
uchar_td segmentCount;
|
|
140
|
-
keySegment segments[
|
|
141
|
-
uchar_td keyNumber;
|
|
140
|
+
uchar_td segmentCount; // Number of segment
|
|
141
|
+
keySegment segments[MAX_KEY_SEGMENT]; // key segments . max 8 segments
|
|
142
|
+
uchar_td keyNumber; // key number
|
|
142
143
|
};
|
|
143
144
|
// 26byte
|
|
144
145
|
|
|
@@ -173,6 +174,9 @@ PACKAGE ushort_td lenByCharnum(uchar_td type, uchar_td charsetIndex
|
|
|
173
174
|
|
|
174
175
|
#endif
|
|
175
176
|
|
|
177
|
+
/* Is field type string ?*/
|
|
178
|
+
PACKAGE bool isStringType(uchar_td type);
|
|
179
|
+
|
|
176
180
|
/* Mark of ** that BizStation Corp internal use only.
|
|
177
181
|
*/
|
|
178
182
|
template <int N>
|
|
@@ -550,6 +554,10 @@ struct btrVersions
|
|
|
550
554
|
#pragma option -a.
|
|
551
555
|
pragma_pop
|
|
552
556
|
|
|
557
|
+
/*filter cobine type*/
|
|
558
|
+
enum combineType{eCend, eCand, eCor};
|
|
559
|
+
|
|
560
|
+
PACKAGE uchar_td getFilterLogicTypeCode(const _TCHAR* cmpstr);
|
|
553
561
|
|
|
554
562
|
}// namespace tdap
|
|
555
563
|
}// namespace protocol
|
|
@@ -125,6 +125,7 @@ typedef short_td (__STDCALL *BTRCALLID_PTR)(ushort_td,void*,void*, uint_td*
|
|
|
125
125
|
#define TD_ADD_SENDBLOB 92
|
|
126
126
|
#define TD_GET_BLOB_BUF 93
|
|
127
127
|
#define TD_STASTISTICS 94
|
|
128
|
+
#define TD_KEY_SEEK_MULTI 95
|
|
128
129
|
|
|
129
130
|
|
|
130
131
|
|
|
@@ -165,50 +166,61 @@ typedef short_td (__STDCALL *BTRCALLID_PTR)(ushort_td,void*,void*, uint_td*
|
|
|
165
166
|
|
|
166
167
|
/** field types
|
|
167
168
|
*/
|
|
168
|
-
#define ft_string
|
|
169
|
-
#define ft_integer
|
|
170
|
-
#define ft_float
|
|
171
|
-
#define ft_date
|
|
172
|
-
#define ft_time
|
|
173
|
-
#define ft_decimal
|
|
174
|
-
#define ft_money
|
|
175
|
-
#define ft_logical
|
|
176
|
-
#define ft_numeric
|
|
177
|
-
#define ft_bfloat
|
|
178
|
-
#define ft_lstring
|
|
179
|
-
#define ft_zstring
|
|
180
|
-
#define ft_note
|
|
181
|
-
#define ft_lvar
|
|
182
|
-
#define ft_uinteger
|
|
183
|
-
#define ft_autoinc
|
|
184
|
-
#define ft_bit
|
|
185
|
-
#define ft_numericsts
|
|
186
|
-
#define ft_numericsa
|
|
187
|
-
#define ft_currency
|
|
188
|
-
#define ft_timestamp
|
|
189
|
-
#define ft_blob
|
|
190
|
-
#define ft_reserve22
|
|
191
|
-
#define ft_reserve23
|
|
192
|
-
#define ft_reserve24
|
|
193
|
-
#define ft_wstring
|
|
194
|
-
#define ft_wzstring
|
|
195
|
-
#define ft_guid
|
|
196
|
-
#define ft_datatime
|
|
197
|
-
#define ft_myvarchar
|
|
198
|
-
#define ft_myvarbinary
|
|
199
|
-
#define ft_mywvarchar
|
|
200
|
-
#define ft_mywvarbinary
|
|
201
|
-
#define ft_mychar
|
|
202
|
-
#define ft_mywchar
|
|
203
|
-
#define ft_mydate
|
|
204
|
-
#define ft_mytime
|
|
205
|
-
#define ft_mydatetime
|
|
206
|
-
#define ft_mytimestamp
|
|
207
|
-
#define ft_mytext
|
|
208
|
-
#define ft_myblob
|
|
209
|
-
#define
|
|
210
|
-
|
|
211
|
-
|
|
169
|
+
#define ft_string 0
|
|
170
|
+
#define ft_integer 1
|
|
171
|
+
#define ft_float 2
|
|
172
|
+
#define ft_date 3
|
|
173
|
+
#define ft_time 4
|
|
174
|
+
#define ft_decimal 5
|
|
175
|
+
#define ft_money 6
|
|
176
|
+
#define ft_logical 7
|
|
177
|
+
#define ft_numeric 8
|
|
178
|
+
#define ft_bfloat 9
|
|
179
|
+
#define ft_lstring 10
|
|
180
|
+
#define ft_zstring 11
|
|
181
|
+
#define ft_note 12
|
|
182
|
+
#define ft_lvar 13
|
|
183
|
+
#define ft_uinteger 14
|
|
184
|
+
#define ft_autoinc 15
|
|
185
|
+
#define ft_bit 16
|
|
186
|
+
#define ft_numericsts 17
|
|
187
|
+
#define ft_numericsa 18
|
|
188
|
+
#define ft_currency 19
|
|
189
|
+
#define ft_timestamp 20
|
|
190
|
+
#define ft_blob 21
|
|
191
|
+
#define ft_reserve22 22
|
|
192
|
+
#define ft_reserve23 23
|
|
193
|
+
#define ft_reserve24 24
|
|
194
|
+
#define ft_wstring 25
|
|
195
|
+
#define ft_wzstring 26
|
|
196
|
+
#define ft_guid 27
|
|
197
|
+
#define ft_datatime 30
|
|
198
|
+
#define ft_myvarchar 40
|
|
199
|
+
#define ft_myvarbinary 41
|
|
200
|
+
#define ft_mywvarchar 42
|
|
201
|
+
#define ft_mywvarbinary 43
|
|
202
|
+
#define ft_mychar 44
|
|
203
|
+
#define ft_mywchar 45
|
|
204
|
+
#define ft_mydate 46
|
|
205
|
+
#define ft_mytime 47
|
|
206
|
+
#define ft_mydatetime 48
|
|
207
|
+
#define ft_mytimestamp 49
|
|
208
|
+
#define ft_mytext 50
|
|
209
|
+
#define ft_myblob 51
|
|
210
|
+
#define ft_autoIncUnsigned 52
|
|
211
|
+
#define ft_nullindicator 255
|
|
212
|
+
|
|
213
|
+
/** compair types
|
|
214
|
+
*/
|
|
215
|
+
enum eCompType
|
|
216
|
+
{
|
|
217
|
+
equal = 1,
|
|
218
|
+
greater = 2,
|
|
219
|
+
less = 3,
|
|
220
|
+
notEq = 4,
|
|
221
|
+
greaterEq = 5,
|
|
222
|
+
lessEq = 6
|
|
223
|
+
};
|
|
212
224
|
|
|
213
225
|
/** charset type number
|
|
214
226
|
*/
|
|
@@ -316,6 +328,7 @@ typedef short_td (__STDCALL *BTRCALLID_PTR)(ushort_td,void*,void*, uint_td*
|
|
|
316
328
|
#define STATUS_INVALID_OWNERNAME 51
|
|
317
329
|
#define STATUS_TABLE_EXISTS_ERROR 59
|
|
318
330
|
#define STATUS_LIMMIT_OF_REJECT 60
|
|
331
|
+
#define STATUS_WARKSPACE_TOO_SMALL 61
|
|
319
332
|
#define STATUS_REACHED_FILTER_COND 64
|
|
320
333
|
#define STATUS_INVALID_FIELD_OFFSET 65
|
|
321
334
|
#define STATUS_CHANGE_CONFLICT 80
|
|
@@ -335,9 +348,6 @@ typedef short_td (__STDCALL *BTRCALLID_PTR)(ushort_td,void*,void*, uint_td*
|
|
|
335
348
|
#define ERROR_TD_NOT_CONNECTED 3110
|
|
336
349
|
|
|
337
350
|
|
|
338
|
-
#define STATUS_BUFFERTOOSMALL 22
|
|
339
|
-
#define STATUS_KEYBUFFERTOOSMALL 21
|
|
340
|
-
|
|
341
351
|
#define TRANSACTD_SCHEMANAME _T("transactd_schema")
|
|
342
352
|
#define TYPE_SCHEMA_BDF (short)0
|
|
343
353
|
#define TYPE_SCHEMA_DDF (short)1
|
|
@@ -364,8 +374,8 @@ typedef short_td (__STDCALL *BTRCALLID_PTR)(ushort_td,void*,void*, uint_td*
|
|
|
364
374
|
If you change this version then you need change The ($TargetName) project options too.
|
|
365
375
|
*/
|
|
366
376
|
#define C_INTERFACE_VER_MAJOR "1"//##1 Build marker! Don't remove
|
|
367
|
-
#define C_INTERFACE_VER_MINOR "
|
|
368
|
-
#define C_INTERFACE_VER_RELEASE "
|
|
377
|
+
#define C_INTERFACE_VER_MINOR "2"//##2 Build marker! Don't remove
|
|
378
|
+
#define C_INTERFACE_VER_RELEASE "0"//##3 Build marker! Don't remove
|
|
369
379
|
|
|
370
380
|
#ifdef LINUX
|
|
371
381
|
#ifdef __APPLE__
|
|
@@ -414,15 +424,15 @@ typedef short_td (__STDCALL *BTRCALLID_PTR)(ushort_td,void*,void*, uint_td*
|
|
|
414
424
|
|
|
415
425
|
|
|
416
426
|
#define CPP_INTERFACE_VER_MAJOR "1"//##4 Build marker! Don't remove
|
|
417
|
-
#define CPP_INTERFACE_VER_MINOR "
|
|
418
|
-
#define CPP_INTERFACE_VER_RELEASE "
|
|
427
|
+
#define CPP_INTERFACE_VER_MINOR "2"//##5 Build marker! Don't remove
|
|
428
|
+
#define CPP_INTERFACE_VER_RELEASE "0"//##6 Build marker! Don't remove
|
|
419
429
|
|
|
420
430
|
#ifdef _WIN32
|
|
421
431
|
#define CPP_INTERFACE_VERSTR "_" COMPILER_VERSTR "_" TD_LIB_PART "_" CPP_INTERFACE_VER_MAJOR "_" CPP_INTERFACE_VER_MINOR //use autolink
|
|
422
432
|
#endif
|
|
423
433
|
|
|
424
434
|
#define TRANSACTD_VER_MAJOR 1//##7 Build marker! Don't remove
|
|
425
|
-
#define TRANSACTD_VER_MINOR
|
|
426
|
-
#define TRANSACTD_VER_RELEASE
|
|
435
|
+
#define TRANSACTD_VER_MINOR 2//##8 Build marker! Don't remove
|
|
436
|
+
#define TRANSACTD_VER_RELEASE 0//##9 Build marker! Don't remove
|
|
427
437
|
|
|
428
438
|
#endif //BZS_DB_PROTOCOL_TDAP_TDAPCAPI_H
|
|
@@ -106,9 +106,14 @@
|
|
|
106
106
|
|
|
107
107
|
#else //!defined(LINUX)
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
#
|
|
111
|
-
#
|
|
109
|
+
// define _ttof for MinGW or less than visual studio 2010
|
|
110
|
+
#if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1600)
|
|
111
|
+
#ifdef _UNICODE
|
|
112
|
+
#define _ttof _wtof
|
|
113
|
+
#else
|
|
114
|
+
#define _ttof atof
|
|
115
|
+
#endif
|
|
116
|
+
#endif
|
|
112
117
|
|
|
113
118
|
/* c c++ runtime library */
|
|
114
119
|
#include <tchar.h>
|
|
@@ -23,14 +23,8 @@ Each worker shows the connection object pointer.
|
|
|
23
23
|
|
|
24
24
|
struct clientID
|
|
25
25
|
{
|
|
26
|
-
|
|
27
|
-
#ifdef __x86_64__
|
|
28
|
-
void* con;
|
|
29
|
-
char_td reserved[4];
|
|
30
|
-
#else
|
|
31
26
|
void* con;
|
|
32
|
-
char_td reserved[8
|
|
33
|
-
#endif
|
|
27
|
+
char_td reserved[12 - sizeof(void*)];//32bit = 8 64bit = 4
|
|
34
28
|
char_td aid[2];
|
|
35
29
|
ushort_td id;
|
|
36
30
|
};
|