transactd 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/BUILD_UNIX-JA +174 -0
- data/BUILD_WIN-JA +256 -0
- data/CMakeLists.txt +96 -0
- data/COPYING +339 -0
- data/README +406 -0
- data/README-JA +424 -0
- data/bin/common/tdclc_32_1_0.dll +0 -0
- data/bin/common/tdclc_64_1_0.dll +0 -0
- data/build/common/check_for_link_iconv.cmake +73 -0
- data/build/common/copyifgreater.cmd +30 -0
- data/build/common/copyifgreater.js +290 -0
- data/build/common/get_boost_libs.cmake +106 -0
- data/build/common/get_ruby_path.cmake +115 -0
- data/build/common/options.cmake +127 -0
- data/build/common/smart_install.cmake +263 -0
- data/build/common/system.cmake +122 -0
- data/build/common/transactd.rc.in +52 -0
- data/build/common/transactd_cl_common.cmake +101 -0
- data/build/common/transactd_cl_output.cmake +93 -0
- data/build/common/transactd_common.cmake +237 -0
- data/build/common/transactd_required.cmake +28 -0
- data/build/swig/ruby/generate.cmake.in +35 -0
- data/build/swig/ruby/generate.cmd.in +19 -0
- data/build/swig/ruby/ruby.swg +101 -0
- data/build/swig/tdcl.i +188 -0
- data/build/tdclc/BUILDNUMBER.txt +1 -0
- data/build/tdclc/CMakeLists.txt +170 -0
- data/build/tdclc/tdclc_32.cbproj +181 -0
- data/build/tdclc/tdclc_64.cbproj +205 -0
- data/build/tdclcpp/BUILDNUMBER.txt +1 -0
- data/build/tdclcpp/CMakeLists.txt +142 -0
- data/build/tdclcpp/tdclcpp_bcb_32.cbproj +239 -0
- data/build/tdclcpp/tdclcpp_bcb_64.cbproj +304 -0
- data/build/tdclrb/BUILDNUMBER.txt +1 -0
- data/build/tdclrb/CMakeLists.txt +258 -0
- data/build/tdclrb/GEM_VERSION +3 -0
- data/build/tdclrb/bldgem/extconf.rb +123 -0
- data/build/tdclrb/gem/INSTALLLOG.win32 +9 -0
- data/build/tdclrb/gem/Makefile.win32-VS +65 -0
- data/build/tdclrb/gem/Makefile.win32-prebuilt +48 -0
- data/build/tdclrb/gem/detect.rb +31 -0
- data/build/tdclrb/gem/helper.rb +113 -0
- data/build/tdclrb/gem/transactd.rb +22 -0
- data/build/tdclrb/gem_output.cmake +44 -0
- data/source/bzs/db/IBlobBuffer.h +51 -0
- data/source/bzs/db/blobBuffer.h +177 -0
- data/source/bzs/db/blobStructs.h +85 -0
- data/source/bzs/db/engine/mysql/IReadRecords.h +52 -0
- data/source/bzs/db/engine/mysql/bookmark.h +195 -0
- data/source/bzs/db/engine/mysql/database.cpp +1882 -0
- data/source/bzs/db/engine/mysql/database.h +465 -0
- data/source/bzs/db/engine/mysql/dbManager.cpp +303 -0
- data/source/bzs/db/engine/mysql/dbManager.h +143 -0
- data/source/bzs/db/engine/mysql/errorMessage.cpp +75 -0
- data/source/bzs/db/engine/mysql/errorMessage.h +43 -0
- data/source/bzs/db/engine/mysql/fieldAccess.h +158 -0
- data/source/bzs/db/engine/mysql/mydebuglog.cpp +349 -0
- data/source/bzs/db/engine/mysql/mydebuglog.h +89 -0
- data/source/bzs/db/engine/mysql/mysqlInternal.h +171 -0
- data/source/bzs/db/engine/mysql/mysqlThd.cpp +169 -0
- data/source/bzs/db/engine/mysql/mysqlThd.h +35 -0
- data/source/bzs/db/engine/mysql/percentageKey.h +260 -0
- data/source/bzs/db/protocol/ICommandExecuter.h +49 -0
- data/source/bzs/db/protocol/hs/hsCommandExecuter.cpp +689 -0
- data/source/bzs/db/protocol/hs/hsCommandExecuter.h +228 -0
- data/source/bzs/db/protocol/tdap/btrDate.cpp +437 -0
- data/source/bzs/db/protocol/tdap/btrDate.h +227 -0
- data/source/bzs/db/protocol/tdap/client/bulkInsert.h +127 -0
- data/source/bzs/db/protocol/tdap/client/client.cpp +106 -0
- data/source/bzs/db/protocol/tdap/client/client.h +292 -0
- data/source/bzs/db/protocol/tdap/client/connMgr.cpp +144 -0
- data/source/bzs/db/protocol/tdap/client/connMgr.h +82 -0
- data/source/bzs/db/protocol/tdap/client/database.cpp +863 -0
- data/source/bzs/db/protocol/tdap/client/database.h +118 -0
- data/source/bzs/db/protocol/tdap/client/databaseFactory.cpp +100 -0
- data/source/bzs/db/protocol/tdap/client/dbDef.cpp +1640 -0
- data/source/bzs/db/protocol/tdap/client/dbDef.h +135 -0
- data/source/bzs/db/protocol/tdap/client/dllmain.cpp +434 -0
- data/source/bzs/db/protocol/tdap/client/errorMessage.cpp +92 -0
- data/source/bzs/db/protocol/tdap/client/errorMessage_ja.cpp +98 -0
- data/source/bzs/db/protocol/tdap/client/fieldDDF.cpp +174 -0
- data/source/bzs/db/protocol/tdap/client/fieldDDF.h +91 -0
- data/source/bzs/db/protocol/tdap/client/fileDDF.cpp +140 -0
- data/source/bzs/db/protocol/tdap/client/fileDDF.h +86 -0
- data/source/bzs/db/protocol/tdap/client/filter.cpp +527 -0
- data/source/bzs/db/protocol/tdap/client/filter.h +154 -0
- data/source/bzs/db/protocol/tdap/client/indexDDF.cpp +137 -0
- data/source/bzs/db/protocol/tdap/client/indexDDF.h +84 -0
- data/source/bzs/db/protocol/tdap/client/nsDatabase.cpp +724 -0
- data/source/bzs/db/protocol/tdap/client/nsDatabase.h +123 -0
- data/source/bzs/db/protocol/tdap/client/nsTable.cpp +899 -0
- data/source/bzs/db/protocol/tdap/client/nsTable.h +199 -0
- data/source/bzs/db/protocol/tdap/client/request.h +198 -0
- data/source/bzs/db/protocol/tdap/client/sharedData.cpp +58 -0
- data/source/bzs/db/protocol/tdap/client/sharedData.h +56 -0
- data/source/bzs/db/protocol/tdap/client/sqlBuilder.cpp +574 -0
- data/source/bzs/db/protocol/tdap/client/sqlBuilder.h +53 -0
- data/source/bzs/db/protocol/tdap/client/stringConverter.h +627 -0
- data/source/bzs/db/protocol/tdap/client/table.cpp +2613 -0
- data/source/bzs/db/protocol/tdap/client/table.h +221 -0
- data/source/bzs/db/protocol/tdap/client/trdboostapi.h +1096 -0
- data/source/bzs/db/protocol/tdap/client/trdboostapiInternal.h +179 -0
- data/source/bzs/db/protocol/tdap/client/trdclcppautolink.h +40 -0
- data/source/bzs/db/protocol/tdap/client/trnsctcl.def +11 -0
- data/source/bzs/db/protocol/tdap/myDateTime.cpp +500 -0
- data/source/bzs/db/protocol/tdap/mysql/characterset.cpp +184 -0
- data/source/bzs/db/protocol/tdap/mysql/characterset.h +60 -0
- data/source/bzs/db/protocol/tdap/mysql/databaseSchema.cpp +284 -0
- data/source/bzs/db/protocol/tdap/mysql/databaseSchema.h +53 -0
- data/source/bzs/db/protocol/tdap/mysql/debuglog.cpp +383 -0
- data/source/bzs/db/protocol/tdap/mysql/debuglog.h +106 -0
- data/source/bzs/db/protocol/tdap/mysql/recordsetReader.h +680 -0
- data/source/bzs/db/protocol/tdap/mysql/request.h +202 -0
- data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.cpp +1020 -0
- data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.h +141 -0
- data/source/bzs/db/protocol/tdap/tdapRequest.h +190 -0
- data/source/bzs/db/protocol/tdap/tdapSchema.cpp +295 -0
- data/source/bzs/db/protocol/tdap/tdapSchema.h +558 -0
- data/source/bzs/db/protocol/tdap/tdapcapi.h +423 -0
- data/source/bzs/db/transactd/appBuilderImple.h +55 -0
- data/source/bzs/db/transactd/appModule.cpp +183 -0
- data/source/bzs/db/transactd/appModule.h +80 -0
- data/source/bzs/db/transactd/connManager.cpp +201 -0
- data/source/bzs/db/transactd/connManager.h +60 -0
- data/source/bzs/db/transactd/connectionRecord.h +69 -0
- data/source/bzs/db/transactd/transactd.cpp +325 -0
- data/source/bzs/env/compiler.h +135 -0
- data/source/bzs/env/crosscompile.cpp +130 -0
- data/source/bzs/env/crosscompile.h +150 -0
- data/source/bzs/env/fileopen.h +36 -0
- data/source/bzs/env/mbcswchrLinux.cpp +40 -0
- data/source/bzs/env/mbcswchrLinux.h +88 -0
- data/source/bzs/env/tstring.h +183 -0
- data/source/bzs/example/changeSchema.cpp +117 -0
- data/source/bzs/example/changeSchema_c.cpp +78 -0
- data/source/bzs/example/connection_pool_c.cpp +171 -0
- data/source/bzs/example/createDatabase.cpp +305 -0
- data/source/bzs/example/createDatabase_c.cpp +202 -0
- data/source/bzs/example/deleteRecords.cpp +87 -0
- data/source/bzs/example/deleteRecords_c.cpp +57 -0
- data/source/bzs/example/dropDatabase.cpp +59 -0
- data/source/bzs/example/dropDatabase_c.cpp +34 -0
- data/source/bzs/example/insertRecords.cpp +212 -0
- data/source/bzs/example/insertRecords_c.cpp +153 -0
- data/source/bzs/example/readRecords.cpp +141 -0
- data/source/bzs/example/readRecords_c.cpp +107 -0
- data/source/bzs/example/updateRecords.cpp +99 -0
- data/source/bzs/example/updateRecords_c.cpp +71 -0
- data/source/bzs/example/update_with_transaction.cpp +104 -0
- data/source/bzs/example/update_with_transaction_c.cpp +80 -0
- data/source/bzs/netsvc/client/tcpClient.cpp +226 -0
- data/source/bzs/netsvc/client/tcpClient.h +489 -0
- data/source/bzs/netsvc/server/IAppModule.h +94 -0
- data/source/bzs/netsvc/server/iserver.h +65 -0
- data/source/bzs/netsvc/server/serverCpt.cpp +522 -0
- data/source/bzs/netsvc/server/serverCpt.h +88 -0
- data/source/bzs/netsvc/server/serverPipe.cpp +705 -0
- data/source/bzs/netsvc/server/serverPipe.h +96 -0
- data/source/bzs/netsvc/server/serverTpool.cpp +416 -0
- data/source/bzs/netsvc/server/serverTpool.h +84 -0
- data/source/bzs/rtl/benchmark.cpp +96 -0
- data/source/bzs/rtl/benchmark.h +65 -0
- data/source/bzs/rtl/datetime.cpp +375 -0
- data/source/bzs/rtl/datetime.h +53 -0
- data/source/bzs/rtl/debuglog.cpp +106 -0
- data/source/bzs/rtl/debuglog.h +97 -0
- data/source/bzs/rtl/exception.h +116 -0
- data/source/bzs/rtl/stl_uty.cpp +35 -0
- data/source/bzs/rtl/stl_uty.h +29 -0
- data/source/bzs/rtl/stringBuffers.cpp +101 -0
- data/source/bzs/rtl/stringBuffers.h +58 -0
- data/source/bzs/rtl/strtrim.cpp +135 -0
- data/source/bzs/rtl/strtrim.h +46 -0
- data/source/bzs/test/tdclatl/bench_tdclatl.js +445 -0
- data/source/bzs/test/tdclrb/bench_tdclcpp.rb +375 -0
- data/source/bzs/test/tdclrb/prepare.rb +226 -0
- data/source/bzs/test/tdclrb/transactd_datetime_spec.rb +172 -0
- data/source/bzs/test/tdclrb/transactd_kanjischema_spec.rb +208 -0
- data/source/bzs/test/tdclrb/transactd_spec.rb +1536 -0
- data/source/bzs/test/transactdBench/transactdBench.cpp +430 -0
- data/source/bzs/test/transactdBench/transactdBench2.cpp +342 -0
- data/source/bzs/test/trdclengn/test_trdclengn.cpp +2030 -0
- data/source/global/tdclatl/Database.cpp +503 -0
- data/source/global/tdclatl/Database.h +139 -0
- data/source/global/tdclatl/DbDef.cpp +242 -0
- data/source/global/tdclatl/DbDef.h +79 -0
- data/source/global/tdclatl/Field.cpp +92 -0
- data/source/global/tdclatl/Field.h +59 -0
- data/source/global/tdclatl/FieldDef.cpp +238 -0
- data/source/global/tdclatl/FieldDef.h +87 -0
- data/source/global/tdclatl/Flags.cpp +111 -0
- data/source/global/tdclatl/Flags.h +55 -0
- data/source/global/tdclatl/KeyDef.cpp +51 -0
- data/source/global/tdclatl/KeyDef.h +55 -0
- data/source/global/tdclatl/KeySegment.cpp +55 -0
- data/source/global/tdclatl/Table.cpp +600 -0
- data/source/global/tdclatl/Table.h +144 -0
- data/source/global/tdclatl/TableDef.cpp +291 -0
- data/source/global/tdclatl/TableDef.h +86 -0
- data/source/global/tdclatl/TdVersion.cpp +74 -0
- data/source/global/tdclatl/TdVersion.h +54 -0
- data/source/global/tdclatl/_IDatabaseEvents_CP.h +113 -0
- data/source/global/tdclatl/dllmain.cpp +30 -0
- data/source/global/tdclatl/dllmain.h +27 -0
- data/source/global/tdclatl/keySegment.h +57 -0
- data/source/global/tdclatl/resource.h +0 -0
- data/source/global/tdclatl/stdafx.cpp +2 -0
- data/source/global/tdclatl/stdafx.h +25 -0
- data/source/global/tdclatl/targetver.h +4 -0
- data/source/global/tdclatl/tdclatl.cpp +68 -0
- data/source/global/tdclatl/tdclatl.def +10 -0
- data/source/global/tdclatl/tdclatl.idl +1035 -0
- data/source/linux/charsetConvert.h +112 -0
- data/source/linux/linuxTypes.h +33 -0
- data/source/linux/tchar.h +428 -0
- data/transactd.gemspec +97 -0
- metadata +267 -0
@@ -0,0 +1,237 @@
|
|
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
|
+
# ==========================================================
|
20
|
+
# make subdir, copy CMakeLists.txt and BUILDNUMBER.txt
|
21
|
+
# ==========================================================
|
22
|
+
if(NOT COMMAND transactd_copy_subdir)
|
23
|
+
macro(transactd_copy_subdir TRANSACTD_ROOT srcname dstname)
|
24
|
+
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory
|
25
|
+
${TRANSACTD_ROOT}/build/${dstname})
|
26
|
+
execute_process(
|
27
|
+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
28
|
+
${TRANSACTD_ROOT}/build/${srcname}/CMakeLists.txt
|
29
|
+
${TRANSACTD_ROOT}/build/${dstname}/CMakeLists.txt)
|
30
|
+
if(WIN32 AND NOT EXISTS "${TRANSACTD_ROOT}/build/${dstname}/BUILDNUMBER.txt")
|
31
|
+
execute_process(COMMAND ${CMAKE_COMMAND} -E copy
|
32
|
+
${TRANSACTD_ROOT}/build/${srcname}/BUILDNUMBER.txt
|
33
|
+
${TRANSACTD_ROOT}/build/${dstname}/BUILDNUMBER.txt)
|
34
|
+
endif()
|
35
|
+
endmacro()
|
36
|
+
endif()
|
37
|
+
|
38
|
+
|
39
|
+
# ==========================================================
|
40
|
+
# read build number if BUILDNUMBER.txt exists
|
41
|
+
# ==========================================================
|
42
|
+
if(NOT COMMAND transactd_read_build_number)
|
43
|
+
macro(transactd_read_build_number TRANSACTD_ROOT)
|
44
|
+
if(WIN32)
|
45
|
+
set(${this_target}_BuildNumber_path "${TRANSACTD_ROOT}/build/${this_target}/BUILDNUMBER.txt")
|
46
|
+
if(EXISTS "${${this_target}_BuildNumber_path}")
|
47
|
+
file(STRINGS "${${this_target}_BuildNumber_path}" TRANSACTD_BUILD_NUMBER_PRE)
|
48
|
+
MATH(EXPR TRANSACTD_BUILD_NUMBER "${TRANSACTD_BUILD_NUMBER_PRE} + 1")
|
49
|
+
file(WRITE "${${this_target}_BuildNumber_path}" "${TRANSACTD_BUILD_NUMBER}")
|
50
|
+
message(STATUS "${this_target} increment build number : ${TRANSACTD_BUILD_NUMBER_PRE} -> ${TRANSACTD_BUILD_NUMBER}")
|
51
|
+
else()
|
52
|
+
set(TRANSACTD_BUILD_NUMBER 1)
|
53
|
+
message(STATUS "${this_target} BUILDNUMBER.txt not found so BuildNumber = ${TRANSACTD_BUILD_NUMBER}")
|
54
|
+
endif()
|
55
|
+
else()
|
56
|
+
set(TRANSACTD_BUILD_NUMBER 1)
|
57
|
+
endif()
|
58
|
+
endmacro()
|
59
|
+
endif()
|
60
|
+
|
61
|
+
|
62
|
+
# ==========================================================
|
63
|
+
# read version
|
64
|
+
# ==========================================================
|
65
|
+
if(NOT COMMAND transactd_read_version)
|
66
|
+
macro(transactd_read_version TRANSACTD_ROOT)
|
67
|
+
if(NOT TRANSACTD_VERSION_READ)
|
68
|
+
if(WIN32 AND NOT MINGW)
|
69
|
+
set(TRANSACTD_VER_CMD_GREP "findstr")
|
70
|
+
else()
|
71
|
+
set(TRANSACTD_VER_CMD_GREP "grep")
|
72
|
+
endif()
|
73
|
+
# file that version defined
|
74
|
+
set(TRANSACTD_VER_FILE_PATH "${TRANSACTD_ROOT}/source/bzs/db/protocol/tdap/tdapcapi.h")
|
75
|
+
if(WIN32 AND NOT MINGW)
|
76
|
+
file(TO_NATIVE_PATH "${TRANSACTD_VER_FILE_PATH}" TRANSACTD_VER_FILE_PATH)
|
77
|
+
endif()
|
78
|
+
if(NOT EXISTS "${TRANSACTD_VER_FILE_PATH}")
|
79
|
+
message(SEND_ERROR "Can not find file ${TRANSACTD_VER_FILE_PATH}")
|
80
|
+
endif()
|
81
|
+
# temporary file
|
82
|
+
set(TRANSACTD_VER_TMPFILE_PATH "${CMAKE_CURRENT_BINARY_DIR}/transactd_versions.tmp")
|
83
|
+
if(NOT EXISTS "${TRANSACTD_VER_TMPFILE_PATH}")
|
84
|
+
execute_process(
|
85
|
+
COMMAND ${TRANSACTD_VER_CMD_GREP} "##" "${TRANSACTD_VER_FILE_PATH}"
|
86
|
+
OUTPUT_FILE ${TRANSACTD_VER_TMPFILE_PATH}
|
87
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
88
|
+
endif()
|
89
|
+
# read from temporary file
|
90
|
+
if(WIN32 AND NOT MINGW)
|
91
|
+
file(TO_NATIVE_PATH "${TRANSACTD_VER_TMPFILE_PATH}" TRANSACTD_VER_TMPFILE_PATH)
|
92
|
+
endif()
|
93
|
+
foreach(VALNAME C_INTERFACE_VER_MAJOR C_INTERFACE_VER_MINOR C_INTERFACE_VER_RELEASE
|
94
|
+
CPP_INTERFACE_VER_MAJOR CPP_INTERFACE_VER_MINOR CPP_INTERFACE_VER_RELEASE
|
95
|
+
TRANSACTD_VER_MAJOR TRANSACTD_VER_MINOR TRANSACTD_VER_RELEASE)
|
96
|
+
execute_process(
|
97
|
+
COMMAND ${TRANSACTD_VER_CMD_GREP} "${VALNAME}" "${TRANSACTD_VER_TMPFILE_PATH}"
|
98
|
+
OUTPUT_VARIABLE TRANSACTD_VER_TMP_VAR
|
99
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
100
|
+
string(REGEX REPLACE "/\\*.*" "" TRANSACTD_VER_TMP_VAR "${TRANSACTD_VER_TMP_VAR}")
|
101
|
+
string(REGEX REPLACE "//.*" "" TRANSACTD_VER_TMP_VAR "${TRANSACTD_VER_TMP_VAR}")
|
102
|
+
string(REGEX REPLACE "${VALNAME}" "" TRANSACTD_VER_TMP_VAR "${TRANSACTD_VER_TMP_VAR}")
|
103
|
+
string(REGEX REPLACE "[^0-9]" "" TRANSACTD_VER_TMP_VAR "${TRANSACTD_VER_TMP_VAR}")
|
104
|
+
if("${TRANSACTD_VER_TMP_VAR}" STREQUAL "")
|
105
|
+
message(SEND_ERROR "Can not read version ${VALNAME}")
|
106
|
+
endif()
|
107
|
+
set(TDVER_${VALNAME} "${TRANSACTD_VER_TMP_VAR}")
|
108
|
+
endforeach()
|
109
|
+
set(TRANSACTD_VERSION_READ ON)
|
110
|
+
endif()
|
111
|
+
endmacro()
|
112
|
+
endif()
|
113
|
+
|
114
|
+
|
115
|
+
# ==========================================================
|
116
|
+
# read simple version variables
|
117
|
+
# file format like: VARIABLENAME VALUE
|
118
|
+
# VARIABLENAME2 VALUE2
|
119
|
+
# ==========================================================
|
120
|
+
if(NOT COMMAND transactd_read_variables)
|
121
|
+
macro(transactd_read_variables TRANSACTD_VAR_FILE)
|
122
|
+
file(READ "${TRANSACTD_VAR_FILE}" tmp_contents)
|
123
|
+
string(REGEX REPLACE "\n" ";" tmp_contents "${tmp_contents}")
|
124
|
+
string(REGEX REPLACE ";+$" "" tmp_contents "${tmp_contents}")
|
125
|
+
string(REGEX REPLACE " +" " " tmp_contents "${tmp_contents}")
|
126
|
+
foreach(tmp_line ${tmp_contents})
|
127
|
+
string(REGEX REPLACE " " ";" tmp_list "${tmp_line}")
|
128
|
+
list(LENGTH tmp_list tmp_list_len)
|
129
|
+
if("${tmp_list_len}" STREQUAL "2")
|
130
|
+
list (GET tmp_list 0 tmp_varname)
|
131
|
+
string(REGEX REPLACE "^\"(.*)\"$" "\\1" tmp_varname "${tmp_varname}")
|
132
|
+
list (GET tmp_list 1 tmp_value)
|
133
|
+
string(REGEX REPLACE "^\"(.*)\"$" "\\1" tmp_value "${tmp_value}")
|
134
|
+
set(TDREAD_${tmp_varname} "${tmp_value}")
|
135
|
+
endif()
|
136
|
+
endforeach()
|
137
|
+
endmacro()
|
138
|
+
endif()
|
139
|
+
|
140
|
+
|
141
|
+
# ==========================================================
|
142
|
+
# generate rc file
|
143
|
+
# ==========================================================
|
144
|
+
if(NOT COMMAND transactd_generate_rc_file)
|
145
|
+
macro(transactd_generate_rc_file)
|
146
|
+
if(WIN32)
|
147
|
+
cmake_parse_arguments(TD_RC "" "TRANSACTD_ROOT;OUTFILE;F_VER;P_VER;P_NAME" "F_DESC" ${ARGN})
|
148
|
+
# split version
|
149
|
+
foreach(ForP F P)
|
150
|
+
string(REPLACE "." ";" TD_RC_${ForP}_VER ${TD_RC_${ForP}_VER})
|
151
|
+
list(GET TD_RC_${ForP}_VER 0 TD_RC_${ForP}_VER_MAJOR)
|
152
|
+
list(GET TD_RC_${ForP}_VER 1 TD_RC_${ForP}_VER_MINOR)
|
153
|
+
list(GET TD_RC_${ForP}_VER 2 TD_RC_${ForP}_VER_RELEASE)
|
154
|
+
list(GET TD_RC_${ForP}_VER 3 TD_RC_${ForP}_VER_BUILD)
|
155
|
+
endforeach()
|
156
|
+
# generate rc file
|
157
|
+
configure_file("${TD_RC_TRANSACTD_ROOT}/build/common/transactd.rc.in" "${TD_RC_OUTFILE}")
|
158
|
+
endif()
|
159
|
+
endmacro()
|
160
|
+
endif()
|
161
|
+
|
162
|
+
|
163
|
+
# ==========================================================
|
164
|
+
# add rc file
|
165
|
+
# ==========================================================
|
166
|
+
if(NOT COMMAND transactd_add_rc_file)
|
167
|
+
macro(transactd_add_rc_file)
|
168
|
+
if(MSVC)
|
169
|
+
set(${this_target}_SOURCE_FILES
|
170
|
+
"${${this_target}_SOURCE_FILES}" "${${this_target}_RC_FILE}")
|
171
|
+
elseif(MINGW)
|
172
|
+
set(CMAKE_RC_COMPILER_INIT windres)
|
173
|
+
ENABLE_LANGUAGE(RC)
|
174
|
+
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -o <OBJECT> <SOURCE>")
|
175
|
+
set(${this_target}_SOURCE_FILES
|
176
|
+
"${${this_target}_SOURCE_FILES}" "${${this_target}_RC_FILE}")
|
177
|
+
endif()
|
178
|
+
endmacro()
|
179
|
+
endif()
|
180
|
+
|
181
|
+
|
182
|
+
# ==========================================================
|
183
|
+
# transactd_link_boost_libraries MACRO
|
184
|
+
# boost_components : "system;chrono;thread;filesystem"
|
185
|
+
# ==========================================================
|
186
|
+
if(NOT COMMAND transactd_link_boost_libraries)
|
187
|
+
macro(transactd_link_boost_libraries boost_components)
|
188
|
+
set(Boost_USE_MULTITHREADED ON)
|
189
|
+
set(Boost_USE_STATIC_LIBS ON)
|
190
|
+
if("${BOOST_ROOT}" STREQUAL "")
|
191
|
+
if(WIN32)
|
192
|
+
bz_get_compiler_bitness()
|
193
|
+
set(BOOST_ROOT "$ENV{TI_BOOST_ROOT_${BZ_BITNESS}}")
|
194
|
+
endif()
|
195
|
+
if("${BOOST_ROOT}" STREQUAL "")
|
196
|
+
set(BOOST_ROOT "$ENV{BOOST_ROOT}")
|
197
|
+
endif()
|
198
|
+
if(NOT ("${BOOST_ROOT}" STREQUAL ""))
|
199
|
+
message(STATUS "BOOST_ROOT : ${BOOST_ROOT}")
|
200
|
+
endif()
|
201
|
+
endif()
|
202
|
+
## use find_package to find Boost_LIBRARIES (on Unix or MinGW)
|
203
|
+
if(UNIX OR MINGW)
|
204
|
+
find_package(Boost COMPONENTS "${boost_components}")
|
205
|
+
if(NOT Boost_FOUND)
|
206
|
+
message(SEND_ERROR "Boost not found. ${BOOST_ROOT}")
|
207
|
+
endif()
|
208
|
+
if(MINGW)
|
209
|
+
target_link_libraries(${this_target} ${Boost_LIBRARIES})
|
210
|
+
else()
|
211
|
+
# need "-lrt" after chrono or timer
|
212
|
+
target_link_libraries(${this_target} ${Boost_LIBRARIES} rt)
|
213
|
+
endif()
|
214
|
+
endif()
|
215
|
+
## find Boost for Visual Studio /MD or /MDd or /MT or /MTd
|
216
|
+
if(MSVC)
|
217
|
+
get_boost_libs("${boost_components}")
|
218
|
+
add_library(boostlibs_for_${this_target} SHARED IMPORTED)
|
219
|
+
if("${CMAKE_CONFIGURATION_TYPES}" STREQUAL "")
|
220
|
+
set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo MinSizeRel)
|
221
|
+
endif()
|
222
|
+
foreach(BT_NAME "" ${CMAKE_CONFIGURATION_TYPES})
|
223
|
+
if(NOT("${BT_NAME}" STREQUAL ""))
|
224
|
+
set(BT_NAME "_${BT_NAME}")
|
225
|
+
string(TOUPPER "${BT_NAME}" BT_NAME)
|
226
|
+
endif()
|
227
|
+
get_boost_libs_from_CXXFLAGS("${CMAKE_CXX_FLAGS${BT_NAME}}")
|
228
|
+
set_property(TARGET boostlibs_for_${this_target} PROPERTY
|
229
|
+
"IMPORTED_IMPLIB${BT_NAME}" ${get_boost_libs_from_CXXFLAGS_return})
|
230
|
+
endforeach()
|
231
|
+
if(NOT "${boost_components}" STREQUAL "")
|
232
|
+
target_link_libraries(${this_target} boostlibs_for_${this_target})
|
233
|
+
endif()
|
234
|
+
endif()
|
235
|
+
include_directories("${Boost_INCLUDE_DIRS}")
|
236
|
+
endmacro()
|
237
|
+
endif()
|
@@ -0,0 +1,28 @@
|
|
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
|
+
# ==========================================================
|
20
|
+
# require 2.8.3 on windows
|
21
|
+
# ==========================================================
|
22
|
+
if(WIN32)
|
23
|
+
set(tmp_verstr "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}")
|
24
|
+
if ("2.8.3" GREATER "${tmp_verstr}")
|
25
|
+
message(SEND_ERROR "CMake 2.8.3 or higher is required. You are running version ${tmp_verstr}")
|
26
|
+
endif()
|
27
|
+
include(CMakeParseArguments)
|
28
|
+
endif()
|
@@ -0,0 +1,35 @@
|
|
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
|
+
execute_process(
|
27
|
+
ERROR_VARIABLE TRANSACTD_GENERATE_ERROR_VAR
|
28
|
+
COMMAND swig -c++ -ruby -I@SWIG_INC_PATH1@ -I@SWIG_INC_PATH2@ -o @SWIG_NATIVE_OUTFILE@ @SWIG_INTERFACE_FILE@
|
29
|
+
)
|
30
|
+
endif()
|
31
|
+
|
32
|
+
if("${TRANSACTD_GENERATE_ERROR_VAR}" STREQUAL "")
|
33
|
+
else()
|
34
|
+
message(STATUS ${TRANSACTD_GENERATE_ERROR_VAR})
|
35
|
+
endif()
|
@@ -0,0 +1,19 @@
|
|
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
|
+
swig -c++ -ruby -DSWIGWIN -D_WIN32 -I"@SWIG_INC_PATH1@" -I"@SWIG_INC_PATH2@" -o "@SWIG_NATIVE_OUTFILE@" "@SWIG_INTERFACE_FILE@"
|
@@ -0,0 +1,101 @@
|
|
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(SWIGRUBY) // ======= For RUBY =======
|
20
|
+
|
21
|
+
/* ===============================================
|
22
|
+
Suppress warning
|
23
|
+
=============================================== */
|
24
|
+
%warnfilter(
|
25
|
+
SWIGWARN_RUBY_WRONG_NAME
|
26
|
+
);
|
27
|
+
|
28
|
+
|
29
|
+
/* ===============================================
|
30
|
+
ignore functions
|
31
|
+
=============================================== */
|
32
|
+
// original callback
|
33
|
+
%ignore bzs::db::protocol::tdap::client::database::onCopyData;
|
34
|
+
%ignore bzs::db::protocol::tdap::client::database::setOnCopyData;
|
35
|
+
%ignore bzs::db::protocol::tdap::client::database::onDeleteRecord;
|
36
|
+
%ignore bzs::db::protocol::tdap::client::database::setOnDeleteRecord;
|
37
|
+
|
38
|
+
|
39
|
+
/* ===============================================
|
40
|
+
Ruby can't convert String to c++ wchar_t
|
41
|
+
so define _TCHAR as char.
|
42
|
+
=============================================== */
|
43
|
+
#ifdef _UNICODE
|
44
|
+
# undef _UNICODE
|
45
|
+
#endif
|
46
|
+
#ifdef UNICODE
|
47
|
+
# undef UNICODE
|
48
|
+
#endif
|
49
|
+
typedef char _TCHAR;
|
50
|
+
#define _T(x) x
|
51
|
+
|
52
|
+
|
53
|
+
/* ===============================================
|
54
|
+
set execCodePage on createObject
|
55
|
+
=============================================== */
|
56
|
+
%ignore bzs::db::protocol::tdap::client::database::create();
|
57
|
+
%extend bzs::db::protocol::tdap::client::database {
|
58
|
+
static bzs::db::protocol::tdap::client::database* createObject()
|
59
|
+
{
|
60
|
+
bzs::db::protocol::tdap::client::nsdatabase::setExecCodePage(CP_UTF8);
|
61
|
+
return bzs::db::protocol::tdap::client::database::create();
|
62
|
+
}
|
63
|
+
};
|
64
|
+
%newobject bzs::db::protocol::tdap::client::database::createObject;
|
65
|
+
%delobject bzs::db::protocol::tdap::client::database::release;
|
66
|
+
|
67
|
+
|
68
|
+
/* ===============================================
|
69
|
+
add encoding support for ruby 1.9
|
70
|
+
=============================================== */
|
71
|
+
%{
|
72
|
+
#include "ruby/encoding.h"
|
73
|
+
#undef stat
|
74
|
+
#include <bzs/env/tstring.h>
|
75
|
+
|
76
|
+
rb_encoding* rb_enc_find_from_codepage(int codePage)
|
77
|
+
{
|
78
|
+
if (codePage <= 0 || codePage >= 10000000)
|
79
|
+
codePage = GetACP();
|
80
|
+
char cpname[10];
|
81
|
+
sprintf(cpname, "CP%2d", codePage);
|
82
|
+
return rb_enc_find(cpname);
|
83
|
+
}
|
84
|
+
%}
|
85
|
+
|
86
|
+
%typemap(argout) (const char* u8, int u8size, char* mbc, int mbcsize) {
|
87
|
+
%append_output(rb_str_new($3, strlen($3)));
|
88
|
+
}
|
89
|
+
%typemap(argout) (const char* mbc, int mbcsize, char* u8, int u8size) {
|
90
|
+
%append_output(rb_str_new($3, strlen($3)));
|
91
|
+
}
|
92
|
+
|
93
|
+
%typemap(out) const char* {
|
94
|
+
vresult = rb_enc_str_new($1, strlen($1), rb_enc_find_from_codepage(CP_UTF8));
|
95
|
+
}
|
96
|
+
|
97
|
+
%typemap(out) char* {
|
98
|
+
vresult = rb_enc_str_new($1, strlen($1), rb_enc_find_from_codepage(CP_UTF8));
|
99
|
+
}
|
100
|
+
|
101
|
+
#endif // =============== For RUBY ===============
|
data/build/swig/tdcl.i
ADDED
@@ -0,0 +1,188 @@
|
|
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
|
+
/* ===============================================
|
20
|
+
Settings specific to each languages.
|
21
|
+
=============================================== */
|
22
|
+
#if defined(SWIGRUBY)
|
23
|
+
%include "ruby/ruby.swg"
|
24
|
+
#endif
|
25
|
+
|
26
|
+
%module transactd
|
27
|
+
|
28
|
+
%include typemaps.i
|
29
|
+
%include std_string.i
|
30
|
+
|
31
|
+
|
32
|
+
/* ===============================================
|
33
|
+
HEADERS (for cpp compilation)
|
34
|
+
=============================================== */
|
35
|
+
%{
|
36
|
+
#include <bzs/env/crosscompile.h>
|
37
|
+
#include <bzs/env/compiler.h>
|
38
|
+
#include <bzs/db/protocol/tdap/btrDate.h>
|
39
|
+
#include <bzs/db/blobStructs.h>
|
40
|
+
#include <bzs/db/protocol/tdap/mysql/characterset.h>
|
41
|
+
#include <bzs/db/transactd/connectionRecord.h>
|
42
|
+
%}
|
43
|
+
#ifndef SWIGWIN
|
44
|
+
%{
|
45
|
+
#include <linux/linuxTypes.h>
|
46
|
+
#include <linux/charsetConvert.h>
|
47
|
+
#include <bzs/env/mbcswchrLinux.h>
|
48
|
+
%}
|
49
|
+
#endif
|
50
|
+
%{
|
51
|
+
#include <bzs/env/tstring.h>
|
52
|
+
#include <bzs/rtl/benchmark.h>
|
53
|
+
#include <bzs/rtl/datetime.h>
|
54
|
+
#include <bzs/rtl/stringBuffers.h>
|
55
|
+
#include <bzs/rtl/strtrim.h>
|
56
|
+
#include <bzs/db/protocol/tdap/btrDate.h>
|
57
|
+
#include <bzs/db/protocol/tdap/myDateTime.cpp>
|
58
|
+
#include <bzs/db/protocol/tdap/client/sharedData.h>
|
59
|
+
#include <bzs/db/protocol/tdap/tdapcapi.h>
|
60
|
+
#include <bzs/db/protocol/tdap/tdapSchema.h>
|
61
|
+
#include <bzs/db/protocol/tdap/client/nsTable.h>
|
62
|
+
#include <bzs/db/protocol/tdap/client/connMgr.h>
|
63
|
+
#include <bzs/db/protocol/tdap/client/bulkInsert.h>
|
64
|
+
#include <bzs/db/protocol/tdap/client/dbDef.h>
|
65
|
+
#include <bzs/db/protocol/tdap/client/table.h>
|
66
|
+
#include <bzs/db/protocol/tdap/client/nsDatabase.h>
|
67
|
+
#include <bzs/db/protocol/tdap/client/database.h>
|
68
|
+
#include <bzs/db/protocol/tdap/mysql/characterset.h>
|
69
|
+
|
70
|
+
using namespace bzs::db::protocol::tdap;
|
71
|
+
using namespace bzs::db::protocol::tdap::client;
|
72
|
+
%}
|
73
|
+
|
74
|
+
|
75
|
+
/* ===============================================
|
76
|
+
Ignore section
|
77
|
+
=============================================== */
|
78
|
+
// ignore members used BizStation internal only
|
79
|
+
%ignore bzs::db::protocol::tdap::fielddef::chainChar;
|
80
|
+
%ignore bzs::db::protocol::tdap::fielddef::setChainChar;
|
81
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::defValue;
|
82
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::defViewWidth;
|
83
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::enableFlags;
|
84
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::filterId;
|
85
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::filterKeynum;
|
86
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::lookDBNum;
|
87
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::lookField;
|
88
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::lookFields;
|
89
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::lookTable;
|
90
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::userOption;
|
91
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::viewNum;
|
92
|
+
%ignore bzs::db::protocol::tdap::fielddef_t::viewWidth;
|
93
|
+
%ignore bzs::db::protocol::tdap::tabledef::autoIncExSpace;
|
94
|
+
%ignore bzs::db::protocol::tdap::tabledef::convertFileNum;
|
95
|
+
%ignore bzs::db::protocol::tdap::tabledef::iconIndex;
|
96
|
+
%ignore bzs::db::protocol::tdap::tabledef::iconIndex2;
|
97
|
+
%ignore bzs::db::protocol::tdap::tabledef::iconIndex3;
|
98
|
+
%ignore bzs::db::protocol::tdap::tabledef::optionFlags;
|
99
|
+
%ignore bzs::db::protocol::tdap::tabledef::parentKeyNum;
|
100
|
+
%ignore bzs::db::protocol::tdap::tabledef::replicaKeyNum;
|
101
|
+
%ignore bzs::db::protocol::tdap::tabledef::treeIndex;
|
102
|
+
%ignore bzs::db::protocol::tdap::client::dbdef::fieldNumByViewNum;
|
103
|
+
// ignore operator=
|
104
|
+
%ignore bzs::db::protocol::tdap::client::nsdatabase::operator=;
|
105
|
+
%ignore bzs::db::protocol::tdap::client::database::operator=;
|
106
|
+
// ignore internal structures / functions
|
107
|
+
%ignore bzs::rtl::benchmark::report;
|
108
|
+
|
109
|
+
|
110
|
+
/* ===============================================
|
111
|
+
Rename section
|
112
|
+
=============================================== */
|
113
|
+
// duplicate name (class method and instance method)
|
114
|
+
%rename(tdapLastErr) bzs::db::protocol::tdap::client::nstable::tdapErr(HWND, _TCHAR*);
|
115
|
+
|
116
|
+
|
117
|
+
/* ===============================================
|
118
|
+
Memory management
|
119
|
+
=============================================== */
|
120
|
+
// add new/delobject define for database
|
121
|
+
%newobject bzs::db::protocol::tdap::client::database::createObject;
|
122
|
+
%delobject bzs::db::protocol::tdap::client::database::release;
|
123
|
+
%ignore bzs::db::protocol::tdap::client::database::destroy;
|
124
|
+
%ignore bzs::db::protocol::tdap::client::database::release;
|
125
|
+
|
126
|
+
// add new/delobject define for table
|
127
|
+
%newobject bzs::db::protocol::tdap::client::database::openTable;
|
128
|
+
%delobject bzs::db::protocol::tdap::client::table::release;
|
129
|
+
%ignore bzs::db::protocol::tdap::client::nstable::release;
|
130
|
+
%ignore bzs::db::protocol::tdap::client::table::release;
|
131
|
+
|
132
|
+
|
133
|
+
/* ===============================================
|
134
|
+
external symbols
|
135
|
+
=============================================== */
|
136
|
+
%apply long long { __int64 }
|
137
|
+
%include bzs/env/compiler.h
|
138
|
+
#ifdef SWIGWIN
|
139
|
+
#define CP_ACP 0
|
140
|
+
#define CP_UTF8 65001
|
141
|
+
#else
|
142
|
+
%include bzs/env/mbcswchrLinux.h
|
143
|
+
#endif
|
144
|
+
#undef pragma_pack1
|
145
|
+
#define pragma_pack1
|
146
|
+
#undef pragma_pop
|
147
|
+
#define pragma_pop
|
148
|
+
%include bzs/db/protocol/tdap/tdapcapi.h
|
149
|
+
%include bzs/db/protocol/tdap/tdapSchema.h
|
150
|
+
%include bzs/db/protocol/tdap/client/nsTable.h
|
151
|
+
%include bzs/db/protocol/tdap/client/dbDef.h
|
152
|
+
%include bzs/db/protocol/tdap/client/table.h
|
153
|
+
%include bzs/db/protocol/tdap/client/nsDatabase.h
|
154
|
+
%include bzs/db/protocol/tdap/client/database.h
|
155
|
+
%include bzs/rtl/benchmark.h
|
156
|
+
%include bzs/db/protocol/tdap/mysql/characterset.h
|
157
|
+
// typemap for btrTimeStamp::toString/btrdtoa/btrttoa/btrstoa --
|
158
|
+
%typemap(in,numinputs=0) (char *) (char tmpbuf[255]) { $1=tmpbuf; }
|
159
|
+
%include bzs/db/protocol/tdap/btrDate.h
|
160
|
+
%clear char *;
|
161
|
+
// clear typemap for typemap for btrTimeStamp::toString/btrdtoa/btrttoa/btrstoa --
|
162
|
+
|
163
|
+
|
164
|
+
/* ===============================================
|
165
|
+
expand some classes
|
166
|
+
* many languages can not use pointer as array so add helper functions.
|
167
|
+
=============================================== */
|
168
|
+
%extend bzs::db::protocol::tdap::keydef {
|
169
|
+
keySegment* segment(const int index)
|
170
|
+
{
|
171
|
+
return &(self->segments[index]);
|
172
|
+
}
|
173
|
+
};
|
174
|
+
%extend bzs::db::protocol::tdap::tabledef {
|
175
|
+
fielddef* fieldDef(const int index)
|
176
|
+
{
|
177
|
+
return &(self->fieldDefs[index]);
|
178
|
+
}
|
179
|
+
keydef* keyDef(const int index)
|
180
|
+
{
|
181
|
+
return &(self->keyDefs[index]);
|
182
|
+
}
|
183
|
+
};
|
184
|
+
%extend bzs::db::protocol::tdap::btrVersions {
|
185
|
+
btrVersion* version(const int index) {
|
186
|
+
return &(self->versions[index]);
|
187
|
+
}
|
188
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
0
|