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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 170428ca4c13d71e29e383dcd2177a3379ab9aa6
|
|
4
|
+
data.tar.gz: 679895450a096a43e0c3eb97fdd89e9da2b1c854
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b8fb996a5df63898313c19c456251efe0a4e598e0e9cb426828f7a5f4ac60df1474c6be25faa03756977c08db346d5aa41351e0d775bcbd7bffce876a5ff8bde
|
|
7
|
+
data.tar.gz: 18b21cf181a039f3bc1811e3a2d3ad0665f13a08f9baf7c8735973736312791bff390c6b4a3e0f759eedb56fcb7a6836308de83198e22082228cdd9a79d23c67
|
data/CMakeLists.txt
CHANGED
|
@@ -29,16 +29,28 @@ include(build/common/transactd_common.cmake)
|
|
|
29
29
|
option(WITH_TRANSACTD_SERVER "Build Transactd server plugin" ON)
|
|
30
30
|
option(WITH_TRANSACTD_CLIENTS "Build Transactd client libraries" ON)
|
|
31
31
|
option(TRANSACTD_HANDLERSOCKET "Add HandlerSocket protocol to Transactd plugin" ON)
|
|
32
|
-
option(TRANSACTD_RUBY_GEM "Build Transactd ruby gem" OFF)
|
|
33
32
|
set(TRANSACTD_PREFIX "/usr/local/transactd" CACHE STRING "Prefix for transactd executables(test,benchmark)")
|
|
34
33
|
set(TRANSACTD_CLIENTS_PREFIX "" CACHE STRING "Prefix for transactd client libraries")
|
|
34
|
+
# options for Ruby client
|
|
35
|
+
option(TRANSACTD_RUBY_GEM "Build Transactd ruby gem" OFF)
|
|
36
|
+
# options for PHP client
|
|
37
|
+
option(TRANSACTD_PHP "Build Transactd client PHP extension" OFF)
|
|
38
|
+
set(TRANSACTD_PHP_SOURCE_ROOT "" CACHE STRING "Path of php source directory")
|
|
39
|
+
set(TRANSACTD_PHP_LIBRARY_PATH "" CACHE STRING "Library path for php")
|
|
40
|
+
option(TRANSACTD_PHP_ZTS "Add ZTS flag for build Transactd client PHP extension" OFF)
|
|
35
41
|
|
|
36
42
|
# The following options are set automatically if not specified.
|
|
37
43
|
# Usually you do not have to set these values.
|
|
44
|
+
# options for Ruby client
|
|
38
45
|
set(TRANSACTD_RUBY_GEM_ROOT_PATH "" CACHE STRING "Transactd gem root path")
|
|
39
46
|
set(TRANSACTD_RUBY_EXECUTABLE_PATH "" CACHE STRING "Ruby executable path")
|
|
40
|
-
set(TRANSACTD_RUBY_INCLUDE_PATH "" CACHE STRING "Include path for ruby
|
|
41
|
-
set(TRANSACTD_RUBY_LIBRARY_PATH "" CACHE STRING "
|
|
47
|
+
set(TRANSACTD_RUBY_INCLUDE_PATH "" CACHE STRING "Include path for ruby")
|
|
48
|
+
set(TRANSACTD_RUBY_LIBRARY_PATH "" CACHE STRING "Library path for ruby")
|
|
49
|
+
# options for PHP client
|
|
50
|
+
set(TRANSACTD_PHP_INCLUDE_PATH "" CACHE STRING "Include path for PHP")
|
|
51
|
+
option(TRANSACTD_PHP_USE_32BIT_TIME_T
|
|
52
|
+
"Add _USE_32BIT_TIME_T option for building Transactd client PHP extension" ON)
|
|
53
|
+
set(TDCL_CPP_CHARSET "" CACHE STRING "Transactd clients charset m:Multibyte u:Unicode")
|
|
42
54
|
|
|
43
55
|
|
|
44
56
|
# ==========================================================
|
|
@@ -50,6 +62,10 @@ if(TRANSACTD_RUBY_GEM)
|
|
|
50
62
|
set(WITH_TRANSACTD_SERVER OFF)
|
|
51
63
|
set(WITH_TRANSACTD_CLIENTS OFF)
|
|
52
64
|
endif()
|
|
65
|
+
if(TRANSACTD_PHP)
|
|
66
|
+
set(WITH_TRANSACTD_SERVER OFF)
|
|
67
|
+
set(WITH_TRANSACTD_CLIENTS OFF)
|
|
68
|
+
endif()
|
|
53
69
|
|
|
54
70
|
|
|
55
71
|
# ==========================================================
|
|
@@ -71,7 +87,9 @@ if(WITH_TRANSACTD_CLIENTS)
|
|
|
71
87
|
endif()
|
|
72
88
|
subdirs("build/tdclc")
|
|
73
89
|
if(WIN32 AND NOT MINGW)
|
|
74
|
-
|
|
90
|
+
if((NOT ("${TDCL_CPP_CHARSET}" STREQUAL "m")) AND (NOT ("${TDCL_CPP_CHARSET}" STREQUAL "u")))
|
|
91
|
+
set(TDCL_CPP_CHARSET u)
|
|
92
|
+
endif()
|
|
75
93
|
else()
|
|
76
94
|
set(TDCL_CPP_CHARSET m)
|
|
77
95
|
endif()
|
|
@@ -91,6 +109,21 @@ if(TRANSACTD_RUBY_GEM)
|
|
|
91
109
|
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
92
110
|
project(tdcl)
|
|
93
111
|
endif()
|
|
112
|
+
set(TDCL_CPP_CHARSET m)
|
|
94
113
|
transactd_copy_subdir("${TRANSACTD_ROOT}" tdclcpp tdclcppm)
|
|
95
114
|
subdirs("build/tdclrb")
|
|
96
115
|
endif()
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
# ==========================================================
|
|
119
|
+
# build PHP extension
|
|
120
|
+
# ==========================================================
|
|
121
|
+
if(TRANSACTD_PHP)
|
|
122
|
+
message(STATUS "BUILD Transactd client PHP extension")
|
|
123
|
+
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
124
|
+
project(tdcl)
|
|
125
|
+
endif()
|
|
126
|
+
set(TDCL_CPP_CHARSET m)
|
|
127
|
+
transactd_copy_subdir("${TRANSACTD_ROOT}" tdclcpp tdclcppm)
|
|
128
|
+
subdirs("build/tdclphp")
|
|
129
|
+
endif()
|
|
Binary file
|
|
Binary file
|
|
@@ -32,7 +32,6 @@ macro(tdcl_add_source_files TRANSACTD_ROOT)
|
|
|
32
32
|
${TRANSACTD_ROOT}/source/bzs/db/protocol/tdap/client/errorMessage.cpp
|
|
33
33
|
${TRANSACTD_ROOT}/source/bzs/db/protocol/tdap/client/fieldDDF.cpp
|
|
34
34
|
${TRANSACTD_ROOT}/source/bzs/db/protocol/tdap/client/fileDDF.cpp
|
|
35
|
-
${TRANSACTD_ROOT}/source/bzs/db/protocol/tdap/client/filter.cpp
|
|
36
35
|
${TRANSACTD_ROOT}/source/bzs/db/protocol/tdap/client/indexDDF.cpp
|
|
37
36
|
${TRANSACTD_ROOT}/source/bzs/db/protocol/tdap/client/nsDatabase.cpp
|
|
38
37
|
${TRANSACTD_ROOT}/source/bzs/db/protocol/tdap/client/nsTable.cpp
|
|
@@ -209,7 +209,7 @@ macro(transactd_link_boost_libraries boost_components)
|
|
|
209
209
|
target_link_libraries(${this_target} ${Boost_LIBRARIES})
|
|
210
210
|
else()
|
|
211
211
|
if(APPLE)
|
|
212
|
-
target_link_libraries(${this_target} ${Boost_LIBRARIES})
|
|
212
|
+
target_link_libraries(${this_target} ${Boost_LIBRARIES})
|
|
213
213
|
else()
|
|
214
214
|
# need "-lrt" after chrono or timer
|
|
215
215
|
target_link_libraries(${this_target} ${Boost_LIBRARIES} rt)
|
|
@@ -219,21 +219,41 @@ macro(transactd_link_boost_libraries boost_components)
|
|
|
219
219
|
## find Boost for Visual Studio /MD or /MDd or /MT or /MTd
|
|
220
220
|
if(MSVC)
|
|
221
221
|
get_boost_libs("${boost_components}")
|
|
222
|
-
add_library(boostlibs_for_${this_target} SHARED IMPORTED)
|
|
223
222
|
if("${CMAKE_CONFIGURATION_TYPES}" STREQUAL "")
|
|
224
223
|
set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo MinSizeRel)
|
|
225
224
|
endif()
|
|
225
|
+
# buildtype-specified libraries
|
|
226
226
|
foreach(BT_NAME "" ${CMAKE_CONFIGURATION_TYPES})
|
|
227
227
|
if(NOT("${BT_NAME}" STREQUAL ""))
|
|
228
228
|
set(BT_NAME "_${BT_NAME}")
|
|
229
229
|
string(TOUPPER "${BT_NAME}" BT_NAME)
|
|
230
230
|
endif()
|
|
231
231
|
get_boost_libs_from_CXXFLAGS("${CMAKE_CXX_FLAGS${BT_NAME}}")
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
set(boost_libs_for${BT_NAME} "${get_boost_libs_from_CXXFLAGS_return}")
|
|
233
|
+
string(REGEX REPLACE ";$" "" boost_libs_for${BT_NAME} "${boost_libs_for${BT_NAME}}")
|
|
234
|
+
list(LENGTH boost_libs_for${BT_NAME} boost_libs_listlen${BT_NAME})
|
|
235
|
+
if(${boost_libs_listlen${BT_NAME}} GREATER ${boost_libs_listlen})
|
|
236
|
+
set(boost_libs_listlen ${boost_libs_listlen${BT_NAME}})
|
|
237
|
+
endif()
|
|
234
238
|
endforeach()
|
|
235
|
-
|
|
236
|
-
|
|
239
|
+
# add libraries
|
|
240
|
+
if(${boost_libs_listlen} GREATER 0)
|
|
241
|
+
foreach(idx RANGE 1 ${boost_libs_listlen})
|
|
242
|
+
math(EXPR i "${idx} - 1")
|
|
243
|
+
add_library(boostlibs_for_${this_target}_${idx} SHARED IMPORTED)
|
|
244
|
+
foreach(BT_NAME "" ${CMAKE_CONFIGURATION_TYPES})
|
|
245
|
+
if(NOT("${BT_NAME}" STREQUAL ""))
|
|
246
|
+
set(BT_NAME "_${BT_NAME}")
|
|
247
|
+
string(TOUPPER "${BT_NAME}" BT_NAME)
|
|
248
|
+
endif()
|
|
249
|
+
list(GET boost_libs_for${BT_NAME} ${i} boost_lib_tmp)
|
|
250
|
+
set_property(TARGET boostlibs_for_${this_target}_${idx} PROPERTY
|
|
251
|
+
IMPORTED_IMPLIB${BT_NAME} "${boost_lib_tmp}")
|
|
252
|
+
endforeach()
|
|
253
|
+
if(NOT "${boost_components}" STREQUAL "")
|
|
254
|
+
target_link_libraries(${this_target} boostlibs_for_${this_target}_${idx})
|
|
255
|
+
endif()
|
|
256
|
+
endforeach()
|
|
237
257
|
endif()
|
|
238
258
|
endif()
|
|
239
259
|
include_directories("${Boost_INCLUDE_DIRS}")
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
##=================================================================
|
|
2
|
+
# Copyright (C) 2012 2013 BizStation Corp All rights reserved.
|
|
3
|
+
#
|
|
4
|
+
# This program is free software; you can redistribute it and/or
|
|
5
|
+
# modify it under the terms of the GNU General Public License
|
|
6
|
+
# as published by the Free Software Foundation; either version 2
|
|
7
|
+
# of the License, or (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program; if not, write to the Free Software
|
|
16
|
+
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
17
|
+
# 02111-1307, USA.
|
|
18
|
+
##=================================================================
|
|
19
|
+
## GENERATE SWIG WRAPPER
|
|
20
|
+
if(WIN32)
|
|
21
|
+
execute_process(
|
|
22
|
+
ERROR_VARIABLE TRANSACTD_GENERATE_ERROR_VAR
|
|
23
|
+
COMMAND "@SWIG_GEN_CMD_WIN@"
|
|
24
|
+
)
|
|
25
|
+
else()
|
|
26
|
+
get_filename_component(TRANSACTD_PHP_PATH "@SWIG_NATIVE_OUTFILE@" PATH)
|
|
27
|
+
file(TO_CMAKE_PATH "${TRANSACTD_PHP_PATH}/transactd.php" TRANSACTD_PHP_PATH)
|
|
28
|
+
## generate correct transactd.php
|
|
29
|
+
if(NOT EXISTS "${TRANSACTD_PHP_PATH}.correct")
|
|
30
|
+
MESSAGE("Generating ${TRANSACTD_PHP_PATH}.correct ...")
|
|
31
|
+
execute_process(
|
|
32
|
+
COMMAND ${CMAKE_COMMAND} -E copy_if_different "@SWIG_INTERFACE_FILE@" "@SWIG_INTERFACE_FILE@.org")
|
|
33
|
+
execute_process(
|
|
34
|
+
COMMAND grep -v "^%newobj" "@SWIG_INTERFACE_FILE@.org"
|
|
35
|
+
OUTPUT_FILE "@SWIG_INTERFACE_FILE@")
|
|
36
|
+
execute_process(
|
|
37
|
+
ERROR_VARIABLE TRANSACTD_GENERATE_ERROR_VAR
|
|
38
|
+
COMMAND swig -c++ -php5 -I@SWIG_INC_PATH1@ -I@SWIG_INC_PATH2@ -o @SWIG_NATIVE_OUTFILE@ @SWIG_INTERFACE_FILE@)
|
|
39
|
+
execute_process(
|
|
40
|
+
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${TRANSACTD_PHP_PATH}" "${TRANSACTD_PHP_PATH}.correct")
|
|
41
|
+
execute_process(
|
|
42
|
+
COMMAND ${CMAKE_COMMAND} -E copy_if_different "@SWIG_INTERFACE_FILE@.org" "@SWIG_INTERFACE_FILE@")
|
|
43
|
+
execute_process(
|
|
44
|
+
COMMAND ${CMAKE_COMMAND} -E remove "@SWIG_INTERFACE_FILE@.org")
|
|
45
|
+
endif()
|
|
46
|
+
## generate wrapper cpp
|
|
47
|
+
execute_process(
|
|
48
|
+
ERROR_VARIABLE TRANSACTD_GENERATE_ERROR_VAR
|
|
49
|
+
COMMAND swig -c++ -php5 -I@SWIG_INC_PATH1@ -I@SWIG_INC_PATH2@ -o @SWIG_NATIVE_OUTFILE@ @SWIG_INTERFACE_FILE@)
|
|
50
|
+
## overwrite with correct transactd.php
|
|
51
|
+
execute_process(
|
|
52
|
+
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${TRANSACTD_PHP_PATH}.correct" "${TRANSACTD_PHP_PATH}")
|
|
53
|
+
endif()
|
|
54
|
+
|
|
55
|
+
if("${TRANSACTD_GENERATE_ERROR_VAR}" STREQUAL "")
|
|
56
|
+
else()
|
|
57
|
+
message(STATUS ${TRANSACTD_GENERATE_ERROR_VAR})
|
|
58
|
+
endif()
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@REM ===============================================================
|
|
2
|
+
@REM Copyright (C) 2013 BizStation Corp All rights reserved.
|
|
3
|
+
@REM
|
|
4
|
+
@REM This program is free software; you can redistribute it and/or
|
|
5
|
+
@REM modify it under the terms of the GNU General Public License
|
|
6
|
+
@REM as published by the Free Software Foundation; either version 2
|
|
7
|
+
@REM of the License, or (at your option) any later version.
|
|
8
|
+
@REM
|
|
9
|
+
@REM This program is distributed in the hope that it will be useful,
|
|
10
|
+
@REM but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
@REM GNU General Public License for more details.
|
|
13
|
+
@REM
|
|
14
|
+
@REM You should have received a copy of the GNU General Public License
|
|
15
|
+
@REM along with this program; if not, write to the Free Software
|
|
16
|
+
@REM Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
17
|
+
@REM 02111-1307, USA.
|
|
18
|
+
@REM ===============================================================
|
|
19
|
+
call :GET_TRANSACTD_PHP_PATH "@SWIG_NATIVE_OUTFILE@"
|
|
20
|
+
if not exist "%TDPHPPATH%.correct" call :GENERATE_TRANSACTD_PHP_CORRECT
|
|
21
|
+
|
|
22
|
+
swig -c++ -php5 -DSWIGWIN -D_WIN32 -I"@SWIG_INC_PATH1@" -I"@SWIG_INC_PATH2@" @SWIG_ADDITONAL_OPTIONS@ -o "@SWIG_NATIVE_OUTFILE@" "@SWIG_INTERFACE_FILE@"
|
|
23
|
+
del "%TDPHPPATH%"
|
|
24
|
+
copy "%TDPHPPATH%.correct" "%TDPHPPATH%"
|
|
25
|
+
|
|
26
|
+
exit /b 0
|
|
27
|
+
|
|
28
|
+
:GENERATE_TRANSACTD_PHP_CORRECT
|
|
29
|
+
copy "@SWIG_INTERFACE_FILE@" "@SWIG_INTERFACE_FILE@.org"
|
|
30
|
+
findstr /V /B /C:"%%newobject" "@SWIG_INTERFACE_FILE@.org" > "@SWIG_INTERFACE_FILE@"
|
|
31
|
+
swig -c++ -php5 -DSWIGWIN -D_WIN32 -I"@SWIG_INC_PATH1@" -I"@SWIG_INC_PATH2@" @SWIG_ADDITONAL_OPTIONS@ -o "@SWIG_NATIVE_OUTFILE@" "@SWIG_INTERFACE_FILE@"
|
|
32
|
+
del "@SWIG_INTERFACE_FILE@"
|
|
33
|
+
copy "@SWIG_INTERFACE_FILE@.org" "@SWIG_INTERFACE_FILE@"
|
|
34
|
+
del "@SWIG_INTERFACE_FILE@.org"
|
|
35
|
+
move "%TDPHPPATH%" "%TDPHPPATH%.correct"
|
|
36
|
+
exit /b 0
|
|
37
|
+
|
|
38
|
+
:GET_TRANSACTD_PHP_PATH
|
|
39
|
+
setlocal enabledelayedexpansion
|
|
40
|
+
endlocal && set TDPHPPATH=%~dp1transactd.php
|
|
41
|
+
exit /b 0
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/*=================================================================
|
|
2
|
+
Copyright (C) 2013 BizStation Corp All rights reserved.
|
|
3
|
+
|
|
4
|
+
This program is free software; you can redistribute it and/or
|
|
5
|
+
modify it under the terms of the GNU General Public License
|
|
6
|
+
as published by the Free Software Foundation; either version 2
|
|
7
|
+
of the License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU General Public License
|
|
15
|
+
along with this program; if not, write to the Free Software
|
|
16
|
+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
17
|
+
02111-1307, USA.
|
|
18
|
+
=================================================================*/
|
|
19
|
+
#if defined(SWIGPHP) // ======= For PHP =======
|
|
20
|
+
|
|
21
|
+
/* ===============================================
|
|
22
|
+
ignore functions
|
|
23
|
+
=============================================== */
|
|
24
|
+
// original callback
|
|
25
|
+
%ignore bzs::db::protocol::tdap::client::database::onCopyData;
|
|
26
|
+
%ignore bzs::db::protocol::tdap::client::database::setOnCopyData;
|
|
27
|
+
%ignore bzs::db::protocol::tdap::client::database::onDeleteRecord;
|
|
28
|
+
%ignore bzs::db::protocol::tdap::client::database::setOnDeleteRecord;
|
|
29
|
+
// overloaded functions
|
|
30
|
+
%ignore bzs::db::protocol::tdap::client::table::setFV(short, float); // use double instead of this
|
|
31
|
+
%ignore bzs::db::protocol::tdap::client::table::setFV(short, unsigned char); // use __int64 instead of this
|
|
32
|
+
%ignore bzs::db::protocol::tdap::client::table::setFV(short, short); // use __int64 instead of this
|
|
33
|
+
%ignore bzs::db::protocol::tdap::client::table::setFV(short, int); // use __int64 instead of this
|
|
34
|
+
%ignore bzs::db::protocol::tdap::client::table::setFV(const _TCHAR *, float); // use double instead of this
|
|
35
|
+
%ignore bzs::db::protocol::tdap::client::table::setFV(const _TCHAR *, unsigned char); // use __int64 instead of this
|
|
36
|
+
%ignore bzs::db::protocol::tdap::client::table::setFV(const _TCHAR *, short); // use __int64 instead of this
|
|
37
|
+
%ignore bzs::db::protocol::tdap::client::table::setFV(const _TCHAR *, int); // use __int64 instead of this
|
|
38
|
+
%ignore bzs::db::protocol::tdap::client::table::setFVW; // use setFV instead of this
|
|
39
|
+
%ignore bzs::db::protocol::tdap::client::table::getFVWstr; // use getFVstr instead of this
|
|
40
|
+
%ignore bzs::db::protocol::tdap::btrTimeStamp::btrTimeStamp(const wchar_t *); // use char* instead of this
|
|
41
|
+
%ignore bzs::db::protocol::tdap::btrTimeStamp::toString(wchar_t *); // use char* instead of this
|
|
42
|
+
%ignore bzs::db::protocol::tdap::btrTimeStamp::fromString(const wchar_t *); // use char* instead of this
|
|
43
|
+
%ignore bzs::db::protocol::tdap::atobtrd(const wchar_t *); // use char* instead of this
|
|
44
|
+
%ignore bzs::db::protocol::tdap::atobtrt(const wchar_t *); // use char* instead of this
|
|
45
|
+
%ignore bzs::db::protocol::tdap::btrdtoa(int, wchar_t *); // use char* instead of this
|
|
46
|
+
%ignore bzs::db::protocol::tdap::btrdtoa(int, wchar_t *, bool); // use char* instead of this
|
|
47
|
+
%ignore bzs::db::protocol::tdap::btrdtoa(const btrDate &, wchar_t *); // use char* instead of this
|
|
48
|
+
%ignore bzs::db::protocol::tdap::btrdtoa(const btrDate &, wchar_t *, bool); // use char* instead of this
|
|
49
|
+
%ignore bzs::db::protocol::tdap::btrttoa(int, wchar_t *); // use char* instead of this
|
|
50
|
+
%ignore bzs::db::protocol::tdap::btrttoa(int, wchar_t *, bool); // use char* instead of this
|
|
51
|
+
%ignore bzs::db::protocol::tdap::btrttoa(const btrTime &, wchar_t *); // use char* instead of this
|
|
52
|
+
%ignore bzs::db::protocol::tdap::btrttoa(const btrTime &, wchar_t *, bool); // use char* instead of this
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/* ===============================================
|
|
56
|
+
Rename functions
|
|
57
|
+
=============================================== */
|
|
58
|
+
// Rename function which has keyword of PHP as its name.
|
|
59
|
+
%rename(andWhere) bzs::db::protocol::tdap::client::queryBase::And;
|
|
60
|
+
%rename(orWhere) bzs::db::protocol::tdap::client::queryBase::Or;
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
/* ===============================================
|
|
64
|
+
set execCodePage on createObject
|
|
65
|
+
=============================================== */
|
|
66
|
+
%ignore bzs::db::protocol::tdap::client::database::create();
|
|
67
|
+
%extend bzs::db::protocol::tdap::client::database {
|
|
68
|
+
static bzs::db::protocol::tdap::client::database* createObject()
|
|
69
|
+
{
|
|
70
|
+
bzs::db::protocol::tdap::client::nsdatabase::setExecCodePage(CP_UTF8);
|
|
71
|
+
return bzs::db::protocol::tdap::client::database::create();
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
%newobject bzs::db::protocol::tdap::client::database::createObject;
|
|
75
|
+
%delobject bzs::db::protocol::tdap::client::database::release;
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
/* ===============================================
|
|
79
|
+
SWIG PHP can't convert String to c++ wchar_t
|
|
80
|
+
so define _TCHAR as char.
|
|
81
|
+
=============================================== */
|
|
82
|
+
#ifdef _UNICODE
|
|
83
|
+
#undef _UNICODE
|
|
84
|
+
#endif
|
|
85
|
+
#ifdef UNICODE
|
|
86
|
+
#undef UNICODE
|
|
87
|
+
#endif
|
|
88
|
+
typedef char _TCHAR;
|
|
89
|
+
#define _T(x) x
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
/* ===============================================
|
|
93
|
+
define strtoll and strtoull
|
|
94
|
+
for Visual Studio 2008 or lesser
|
|
95
|
+
=============================================== */
|
|
96
|
+
%{
|
|
97
|
+
#if _MSC_VER
|
|
98
|
+
#define strtoll _strtoi64
|
|
99
|
+
#define strtoull _strtoui64
|
|
100
|
+
#endif
|
|
101
|
+
%}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
/* ===============================================
|
|
105
|
+
typemap
|
|
106
|
+
=============================================== */
|
|
107
|
+
%apply short { char_td }
|
|
108
|
+
%typemap(argout) (const char* u8, int u8size, char* mbc, int mbcsize) {
|
|
109
|
+
ZVAL_STRING(return_value, (char *)$3, 1);
|
|
110
|
+
}
|
|
111
|
+
%typemap(argout) (const char* mbc, int mbcsize, char* u8, int u8size) {
|
|
112
|
+
ZVAL_STRING(return_value, (char *)$3, 1);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
/* ===============================================
|
|
117
|
+
setFV / getFV for binary data
|
|
118
|
+
=============================================== */
|
|
119
|
+
%ignore bzs::db::protocol::tdap::client::table::setFV(short, const void *, uint_td);
|
|
120
|
+
%extend bzs::db::protocol::tdap::client::table {
|
|
121
|
+
void setFV(short index, const char * data, uint_td size) {
|
|
122
|
+
return self->setFV(index, (void const *) data, size);
|
|
123
|
+
}
|
|
124
|
+
void setFV(const _TCHAR *fieldName, const char * data, uint_td size) {
|
|
125
|
+
return self->setFV(fieldName, (void const *) data, size);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
%typemap(in, numinputs=0) (uint_td & size) (uint_td temp) {
|
|
129
|
+
$1 = &temp;
|
|
130
|
+
}
|
|
131
|
+
%typemap(argout) (uint_td & size) {
|
|
132
|
+
ZVAL_STRINGL($result, (char *)result, *$1, 1);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
/* ===============================================
|
|
137
|
+
phpinfo
|
|
138
|
+
=============================================== */
|
|
139
|
+
#ifndef SWIGWIN
|
|
140
|
+
%{
|
|
141
|
+
#define TRANSACTD_PHP_REQUIRED_MODULE_PREFIX "lib"
|
|
142
|
+
%}
|
|
143
|
+
#else
|
|
144
|
+
%{
|
|
145
|
+
#define TRANSACTD_PHP_REQUIRED_MODULE_PREFIX ""
|
|
146
|
+
%}
|
|
147
|
+
#endif
|
|
148
|
+
%pragma(php) phpinfo="
|
|
149
|
+
php_info_print_table_start();
|
|
150
|
+
php_info_print_table_row(2, \"Version\", CPP_INTERFACE_VER_MAJOR \".\" CPP_INTERFACE_VER_MINOR \".\" CPP_INTERFACE_VER_RELEASE);
|
|
151
|
+
php_info_print_table_row(2, \"Required Module\", TRANSACTD_PHP_REQUIRED_MODULE_PREFIX TDCLC_LIBNAME);
|
|
152
|
+
php_info_print_table_end();
|
|
153
|
+
"
|
|
154
|
+
|
|
155
|
+
#endif // =============== For PHP ===============
|
data/build/swig/ruby/ruby.swg
CHANGED
|
@@ -36,6 +36,14 @@
|
|
|
36
36
|
%ignore bzs::db::protocol::tdap::client::database::setOnDeleteRecord;
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
/* ===============================================
|
|
40
|
+
Rename functions
|
|
41
|
+
=============================================== */
|
|
42
|
+
// Rename function which has keyword of Ruby as its name.
|
|
43
|
+
%rename(andWhere) bzs::db::protocol::tdap::client::queryBase::And;
|
|
44
|
+
%rename(orWhere) bzs::db::protocol::tdap::client::queryBase::Or;
|
|
45
|
+
|
|
46
|
+
|
|
39
47
|
/* ===============================================
|
|
40
48
|
Ruby can't convert String to c++ wchar_t
|
|
41
49
|
so define _TCHAR as char.
|
|
@@ -65,6 +73,36 @@ typedef char _TCHAR;
|
|
|
65
73
|
%delobject bzs::db::protocol::tdap::client::database::release;
|
|
66
74
|
|
|
67
75
|
|
|
76
|
+
/* ===============================================
|
|
77
|
+
setFV / getFV for binary data
|
|
78
|
+
=============================================== */
|
|
79
|
+
%ignore bzs::db::protocol::tdap::client::table::setFV(short, const void *, uint_td);
|
|
80
|
+
%extend bzs::db::protocol::tdap::client::table {
|
|
81
|
+
void setFV(short index, const char * data, uint_td size) {
|
|
82
|
+
return self->setFV(index, (void const *) data, size);
|
|
83
|
+
}
|
|
84
|
+
void setFV(const _TCHAR *fieldName, const char * data, uint_td size) {
|
|
85
|
+
return self->setFV(fieldName, (void const *) data, size);
|
|
86
|
+
}
|
|
87
|
+
const char * getFVbin(short index, uint_td& size)
|
|
88
|
+
{
|
|
89
|
+
return (const char *)(self->getFVbin(index, size));
|
|
90
|
+
}
|
|
91
|
+
const char * getFVbin(const _TCHAR *fieldName, uint_td& size)
|
|
92
|
+
{
|
|
93
|
+
return (const char *)(self->getFVbin(fieldName, size));
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
%typemap(in, numinputs=0) (uint_td & size) (uint_td temp) {
|
|
97
|
+
$1 = &temp;
|
|
98
|
+
}
|
|
99
|
+
%typemap(argout) (uint_td & size) {
|
|
100
|
+
$result = rb_str_new((const char *)result, *$1);
|
|
101
|
+
}
|
|
102
|
+
%ignore bzs::db::protocol::tdap::client::table::getFVbin(short, uint_td&);
|
|
103
|
+
%ignore bzs::db::protocol::tdap::client::table::getFVbin(const _TCHAR *, uint_td&);
|
|
104
|
+
|
|
105
|
+
|
|
68
106
|
/* ===============================================
|
|
69
107
|
add encoding support for ruby 1.9
|
|
70
108
|
=============================================== */
|
data/build/swig/tdcl.i
CHANGED
|
@@ -21,18 +21,24 @@
|
|
|
21
21
|
=============================================== */
|
|
22
22
|
#if defined(SWIGRUBY)
|
|
23
23
|
%include "ruby/ruby.swg"
|
|
24
|
+
#elif defined(SWIGPHP)
|
|
25
|
+
%include "php/php.swg"
|
|
24
26
|
#endif
|
|
25
27
|
|
|
26
28
|
%module transactd
|
|
27
29
|
|
|
28
30
|
%include typemaps.i
|
|
29
31
|
%include std_string.i
|
|
32
|
+
%include wchar.i
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
/* ===============================================
|
|
33
36
|
HEADERS (for cpp compilation)
|
|
34
37
|
=============================================== */
|
|
35
38
|
%{
|
|
39
|
+
#ifdef SWIGPHP
|
|
40
|
+
#undef realloc
|
|
41
|
+
#endif
|
|
36
42
|
#include <bzs/env/crosscompile.h>
|
|
37
43
|
#include <bzs/env/compiler.h>
|
|
38
44
|
#include <bzs/db/protocol/tdap/btrDate.h>
|
|
@@ -75,6 +81,19 @@ using namespace bzs::db::protocol::tdap::client;
|
|
|
75
81
|
/* ===============================================
|
|
76
82
|
Ignore section
|
|
77
83
|
=============================================== */
|
|
84
|
+
// functions used by internal C++
|
|
85
|
+
%ignore bzs::db::protocol::tdap::client::nsdatabase::btrvFunc;
|
|
86
|
+
%ignore bzs::db::protocol::tdap::fileSpec;
|
|
87
|
+
%ignore bzs::db::protocol::tdap::keySpec;
|
|
88
|
+
%ignore bzs::db::protocol::tdap::fielddef::dataLen;
|
|
89
|
+
%ignore bzs::db::protocol::tdap::fielddef::keyCopy;
|
|
90
|
+
%ignore bzs::db::protocol::tdap::fielddef::keyData;
|
|
91
|
+
%ignore bzs::db::protocol::tdap::fielddef::keyDataLen;
|
|
92
|
+
%ignore bzs::db::protocol::tdap::fielddef::blobDataPtr;
|
|
93
|
+
%ignore bzs::db::protocol::tdap::fielddef::blobDataLen;
|
|
94
|
+
// overwrote functions
|
|
95
|
+
%ignore bzs::db::protocol::tdap::client::nsdatabase::createTable;
|
|
96
|
+
%ignore bzs::db::protocol::tdap::client::nsdatabase::getBtrVersion(btrVersions*, uchar_td*);
|
|
78
97
|
// ignore members used BizStation internal only
|
|
79
98
|
%ignore bzs::db::protocol::tdap::fielddef::chainChar;
|
|
80
99
|
%ignore bzs::db::protocol::tdap::fielddef::setChainChar;
|
|
@@ -99,12 +118,23 @@ using namespace bzs::db::protocol::tdap::client;
|
|
|
99
118
|
%ignore bzs::db::protocol::tdap::tabledef::parentKeyNum;
|
|
100
119
|
%ignore bzs::db::protocol::tdap::tabledef::replicaKeyNum;
|
|
101
120
|
%ignore bzs::db::protocol::tdap::tabledef::treeIndex;
|
|
121
|
+
%ignore bzs::db::protocol::tdap::tabledef::filler0;
|
|
122
|
+
%ignore bzs::db::protocol::tdap::tabledef::reserved;
|
|
102
123
|
%ignore bzs::db::protocol::tdap::client::dbdef::fieldNumByViewNum;
|
|
103
124
|
// ignore operator=
|
|
104
125
|
%ignore bzs::db::protocol::tdap::client::nsdatabase::operator=;
|
|
105
126
|
%ignore bzs::db::protocol::tdap::client::database::operator=;
|
|
106
127
|
// ignore internal structures / functions
|
|
107
128
|
%ignore bzs::rtl::benchmark::report;
|
|
129
|
+
// ignore methods that will be replaced other methods
|
|
130
|
+
%ignore bzs::db::protocol::tdap::client::table::keyValueDescription(_TCHAR* buf, int bufsize);
|
|
131
|
+
%ignore bzs::db::protocol::tdap::client::queryBase::addField;
|
|
132
|
+
%ignore bzs::db::protocol::tdap::client::queryBase::addLogic;
|
|
133
|
+
%ignore bzs::db::protocol::tdap::client::queryBase::addSeekKeyValue;
|
|
134
|
+
// ignore queryBase destructor. use release instead of it.
|
|
135
|
+
%ignore bzs::db::protocol::tdap::client::queryBase::~queryBase;
|
|
136
|
+
%newobject bzs::db::protocol::tdap::client::queryBase::create;
|
|
137
|
+
%delobject bzs::db::protocol::tdap::client::queryBase::release;
|
|
108
138
|
|
|
109
139
|
|
|
110
140
|
/* ===============================================
|
|
@@ -131,9 +161,29 @@ using namespace bzs::db::protocol::tdap::client;
|
|
|
131
161
|
|
|
132
162
|
|
|
133
163
|
/* ===============================================
|
|
134
|
-
|
|
164
|
+
type defines
|
|
135
165
|
=============================================== */
|
|
166
|
+
%apply unsigned long long { unsigned __int64 }
|
|
136
167
|
%apply long long { __int64 }
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
/* ===============================================
|
|
171
|
+
typemap and extend for table::keyValueDescription
|
|
172
|
+
=============================================== */
|
|
173
|
+
%typemap(in,numinputs=0) (_TCHAR* keyValueDescription_buf) (_TCHAR tmpbuf[1024 * 8]) {
|
|
174
|
+
$1 = tmpbuf;
|
|
175
|
+
}
|
|
176
|
+
%extend bzs::db::protocol::tdap::client::table {
|
|
177
|
+
const _TCHAR* keyValueDescription(_TCHAR* keyValueDescription_buf) {
|
|
178
|
+
self->keyValueDescription(keyValueDescription_buf, 1024 * 8);
|
|
179
|
+
return keyValueDescription_buf;
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
/* ===============================================
|
|
185
|
+
external symbols
|
|
186
|
+
=============================================== */
|
|
137
187
|
%include bzs/env/compiler.h
|
|
138
188
|
#ifdef SWIGWIN
|
|
139
189
|
#define CP_ACP 0
|
|
@@ -155,12 +205,92 @@ using namespace bzs::db::protocol::tdap::client;
|
|
|
155
205
|
%include bzs/rtl/benchmark.h
|
|
156
206
|
%include bzs/db/protocol/tdap/mysql/characterset.h
|
|
157
207
|
// typemap for btrTimeStamp::toString/btrdtoa/btrttoa/btrstoa --
|
|
158
|
-
%typemap(in,numinputs=0) (char *) (char tmpbuf[255]) { $1=tmpbuf; }
|
|
208
|
+
%typemap(in,numinputs=0) (char * retbuf) (char tmpbuf[255]) { $1=tmpbuf; }
|
|
159
209
|
%include bzs/db/protocol/tdap/btrDate.h
|
|
160
|
-
%clear char
|
|
210
|
+
%clear char * retbuf;
|
|
161
211
|
// clear typemap for typemap for btrTimeStamp::toString/btrdtoa/btrttoa/btrstoa --
|
|
162
212
|
|
|
163
213
|
|
|
214
|
+
/* ===============================================
|
|
215
|
+
expand queryBase class
|
|
216
|
+
* Replace functions for convenience
|
|
217
|
+
=============================================== */
|
|
218
|
+
%extend bzs::db::protocol::tdap::client::queryBase {
|
|
219
|
+
queryBase* select(const _TCHAR* value1,
|
|
220
|
+
const _TCHAR* value2 = NULL, const _TCHAR* value3 = NULL, const _TCHAR* value4 = NULL,
|
|
221
|
+
const _TCHAR* value5 = NULL, const _TCHAR* value6 = NULL, const _TCHAR* value7 = NULL,
|
|
222
|
+
const _TCHAR* value8 = NULL, const _TCHAR* value9 = NULL, const _TCHAR* value10 = NULL)
|
|
223
|
+
{
|
|
224
|
+
self->addField(value1);
|
|
225
|
+
if (value2 != NULL)
|
|
226
|
+
self->addField(value2);
|
|
227
|
+
if (value3 != NULL)
|
|
228
|
+
self->addField(value3);
|
|
229
|
+
if (value4 != NULL)
|
|
230
|
+
self->addField(value4);
|
|
231
|
+
if (value5 != NULL)
|
|
232
|
+
self->addField(value5);
|
|
233
|
+
if (value6 != NULL)
|
|
234
|
+
self->addField(value6);
|
|
235
|
+
if (value7 != NULL)
|
|
236
|
+
self->addField(value7);
|
|
237
|
+
if (value8 != NULL)
|
|
238
|
+
self->addField(value8);
|
|
239
|
+
if (value9 != NULL)
|
|
240
|
+
self->addField(value9);
|
|
241
|
+
if (value10 != NULL)
|
|
242
|
+
self->addField(value10);
|
|
243
|
+
return self;
|
|
244
|
+
}
|
|
245
|
+
queryBase* where(const _TCHAR* field, const _TCHAR* op, const _TCHAR* val)
|
|
246
|
+
{
|
|
247
|
+
self->addLogic(field, op, val);
|
|
248
|
+
return self;
|
|
249
|
+
}
|
|
250
|
+
queryBase* And(const _TCHAR* field, const _TCHAR* op, const _TCHAR* val)
|
|
251
|
+
{
|
|
252
|
+
self->addLogic(_T("and") ,field, op, val);
|
|
253
|
+
return self;
|
|
254
|
+
}
|
|
255
|
+
queryBase* Or(const _TCHAR* field, const _TCHAR* op, const _TCHAR* val)
|
|
256
|
+
{
|
|
257
|
+
self->addLogic(_T("or") ,field, op, val);
|
|
258
|
+
return self;
|
|
259
|
+
}
|
|
260
|
+
queryBase* In(const _TCHAR* value1,
|
|
261
|
+
const _TCHAR* value2 = NULL, const _TCHAR* value3 = NULL, const _TCHAR* value4 = NULL,
|
|
262
|
+
const _TCHAR* value5 = NULL, const _TCHAR* value6 = NULL, const _TCHAR* value7 = NULL,
|
|
263
|
+
const _TCHAR* value8 = NULL, const _TCHAR* value9 = NULL, const _TCHAR* value10 = NULL)
|
|
264
|
+
{
|
|
265
|
+
self->addSeekKeyValue(value1, false);
|
|
266
|
+
if (value2 != NULL)
|
|
267
|
+
self->addSeekKeyValue(value2, false);
|
|
268
|
+
if (value3 != NULL)
|
|
269
|
+
self->addSeekKeyValue(value3, false);
|
|
270
|
+
if (value4 != NULL)
|
|
271
|
+
self->addSeekKeyValue(value4, false);
|
|
272
|
+
if (value5 != NULL)
|
|
273
|
+
self->addSeekKeyValue(value5, false);
|
|
274
|
+
if (value6 != NULL)
|
|
275
|
+
self->addSeekKeyValue(value6, false);
|
|
276
|
+
if (value7 != NULL)
|
|
277
|
+
self->addSeekKeyValue(value7, false);
|
|
278
|
+
if (value8 != NULL)
|
|
279
|
+
self->addSeekKeyValue(value8, false);
|
|
280
|
+
if (value9 != NULL)
|
|
281
|
+
self->addSeekKeyValue(value9, false);
|
|
282
|
+
if (value10 != NULL)
|
|
283
|
+
self->addSeekKeyValue(value10, false);
|
|
284
|
+
return self;
|
|
285
|
+
}
|
|
286
|
+
queryBase* addInValue(const _TCHAR* value, bool reset = false)
|
|
287
|
+
{
|
|
288
|
+
self->addSeekKeyValue(value, reset);
|
|
289
|
+
return self;
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
|
|
164
294
|
/* ===============================================
|
|
165
295
|
expand some classes
|
|
166
296
|
* many languages can not use pointer as array so add helper functions.
|
data/build/tdclc/CMakeLists.txt
CHANGED
|
@@ -134,10 +134,13 @@ add_library(${this_target} SHARED ${${this_target}_SOURCE_FILES})
|
|
|
134
134
|
# ==========================================================
|
|
135
135
|
# add link / include
|
|
136
136
|
# ==========================================================
|
|
137
|
-
transactd_link_boost_libraries("filesystem;system
|
|
137
|
+
transactd_link_boost_libraries("filesystem;thread;chrono;system")
|
|
138
138
|
if(APPLE)
|
|
139
139
|
target_link_libraries(${this_target} iconv)
|
|
140
140
|
endif()
|
|
141
|
+
if(NOT MSVC)
|
|
142
|
+
target_link_libraries(${this_target} pthread)
|
|
143
|
+
endif()
|
|
141
144
|
|
|
142
145
|
|
|
143
146
|
# ==========================================================
|