hikyuu 2.5.6__py3-none-macosx_11_0_arm64.whl

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.
Files changed (1008) hide show
  1. hikyuu/LICENSE.txt +21 -0
  2. hikyuu/__init__.py +573 -0
  3. hikyuu/__init__.pyi +953 -0
  4. hikyuu/analysis/__init__.py +14 -0
  5. hikyuu/analysis/__init__.pyi +499 -0
  6. hikyuu/analysis/analysis.py +151 -0
  7. hikyuu/analysis/analysis.pyi +529 -0
  8. hikyuu/config/__init__.py +1 -0
  9. hikyuu/config/block/__init__.py +0 -0
  10. hikyuu/config/block/dybk.ini +5357 -0
  11. hikyuu/config/block/gnbk.ini +50024 -0
  12. hikyuu/config/block/hybk.ini +5464 -0
  13. hikyuu/config/block/self.ini +10 -0
  14. hikyuu/config/block/zsbk.ini +65543 -0
  15. hikyuu/core.py +27 -0
  16. hikyuu/core.pyi +494 -0
  17. hikyuu/cpp/__init__.py +1 -0
  18. hikyuu/cpp/__init__.pyi +3 -0
  19. hikyuu/cpp/core310.pyi +13025 -0
  20. hikyuu/cpp/core310.so +0 -0
  21. hikyuu/cpp/core311.pyi +13025 -0
  22. hikyuu/cpp/core311.so +0 -0
  23. hikyuu/cpp/core312.pyi +13025 -0
  24. hikyuu/cpp/core312.so +0 -0
  25. hikyuu/cpp/core313.pyi +13003 -0
  26. hikyuu/cpp/core313.so +0 -0
  27. hikyuu/cpp/libcrypto.3.dylib +0 -0
  28. hikyuu/cpp/libcrypto.dylib +0 -0
  29. hikyuu/cpp/libhikyuu.dylib +0 -0
  30. hikyuu/cpp/libhku_hdf5.200.2.0.dylib +0 -0
  31. hikyuu/cpp/libhku_hdf5.200.dylib +0 -0
  32. hikyuu/cpp/libhku_hdf5.dylib +0 -0
  33. hikyuu/cpp/libhku_hdf5_cpp.200.2.0.dylib +0 -0
  34. hikyuu/cpp/libhku_hdf5_cpp.200.dylib +0 -0
  35. hikyuu/cpp/libhku_hdf5_cpp.dylib +0 -0
  36. hikyuu/cpp/libhku_hdf5_hl.200.1.0.dylib +0 -0
  37. hikyuu/cpp/libhku_hdf5_hl.200.dylib +0 -0
  38. hikyuu/cpp/libhku_hdf5_hl.dylib +0 -0
  39. hikyuu/cpp/libhku_hdf5_hl_cpp.200.1.0.dylib +0 -0
  40. hikyuu/cpp/libhku_hdf5_hl_cpp.200.dylib +0 -0
  41. hikyuu/cpp/libhku_hdf5_hl_cpp.dylib +0 -0
  42. hikyuu/cpp/libhku_hdf5_tools.200.1.1.dylib +0 -0
  43. hikyuu/cpp/libhku_hdf5_tools.200.dylib +0 -0
  44. hikyuu/cpp/libhku_hdf5_tools.dylib +0 -0
  45. hikyuu/cpp/libmysqlclient.21.dylib +0 -0
  46. hikyuu/cpp/libmysqlclient.dylib +0 -0
  47. hikyuu/cpp/libsqlite3.dylib +0 -0
  48. hikyuu/cpp/libssl.3.dylib +0 -0
  49. hikyuu/cpp/libssl.dylib +0 -0
  50. hikyuu/data/__init__.py +1 -0
  51. hikyuu/data/common.py +248 -0
  52. hikyuu/data/common_h5.py +398 -0
  53. hikyuu/data/common_mysql.py +502 -0
  54. hikyuu/data/common_pytdx.py +124 -0
  55. hikyuu/data/common_sqlite3.py +140 -0
  56. hikyuu/data/em_block_to_mysql.py +121 -0
  57. hikyuu/data/em_block_to_sqlite.py +122 -0
  58. hikyuu/data/hku_config_template.py +266 -0
  59. hikyuu/data/mysql_upgrade/0001.sql +5 -0
  60. hikyuu/data/mysql_upgrade/0002.sql +3 -0
  61. hikyuu/data/mysql_upgrade/0003.sql +9 -0
  62. hikyuu/data/mysql_upgrade/0004.sql +26 -0
  63. hikyuu/data/mysql_upgrade/0005.sql +3 -0
  64. hikyuu/data/mysql_upgrade/0006.sql +2 -0
  65. hikyuu/data/mysql_upgrade/0007.sql +20 -0
  66. hikyuu/data/mysql_upgrade/0008.sql +6 -0
  67. hikyuu/data/mysql_upgrade/0009.sql +36 -0
  68. hikyuu/data/mysql_upgrade/0010.sql +5 -0
  69. hikyuu/data/mysql_upgrade/0011.sql +5 -0
  70. hikyuu/data/mysql_upgrade/0012.sql +5 -0
  71. hikyuu/data/mysql_upgrade/0013.sql +2389 -0
  72. hikyuu/data/mysql_upgrade/0014.sql +3 -0
  73. hikyuu/data/mysql_upgrade/0015.sql +4 -0
  74. hikyuu/data/mysql_upgrade/0016.sql +4 -0
  75. hikyuu/data/mysql_upgrade/0017.sql +5 -0
  76. hikyuu/data/mysql_upgrade/0018.sql +2 -0
  77. hikyuu/data/mysql_upgrade/0019.sql +6 -0
  78. hikyuu/data/mysql_upgrade/0020.sql +4 -0
  79. hikyuu/data/mysql_upgrade/0021.sql +4 -0
  80. hikyuu/data/mysql_upgrade/0022.sql +5 -0
  81. hikyuu/data/mysql_upgrade/0023.sql +4 -0
  82. hikyuu/data/mysql_upgrade/0024.sql +2 -0
  83. hikyuu/data/mysql_upgrade/0025.sql +61 -0
  84. hikyuu/data/mysql_upgrade/0026.sql +9 -0
  85. hikyuu/data/mysql_upgrade/0027.sql +6 -0
  86. hikyuu/data/mysql_upgrade/__init__.py +1 -0
  87. hikyuu/data/mysql_upgrade/createdb.sql +265 -0
  88. hikyuu/data/pytdx_finance_to_mysql.py +129 -0
  89. hikyuu/data/pytdx_finance_to_sqlite.py +162 -0
  90. hikyuu/data/pytdx_to_h5.py +665 -0
  91. hikyuu/data/pytdx_to_mysql.py +806 -0
  92. hikyuu/data/pytdx_weight_to_mysql.py +196 -0
  93. hikyuu/data/pytdx_weight_to_sqlite.py +192 -0
  94. hikyuu/data/sqlite_mem.py +84 -0
  95. hikyuu/data/sqlite_mem_sql/__init__.py +1 -0
  96. hikyuu/data/sqlite_mem_sql/createdb.sql +126 -0
  97. hikyuu/data/sqlite_upgrade/0001.sql +4 -0
  98. hikyuu/data/sqlite_upgrade/0002.sql +48 -0
  99. hikyuu/data/sqlite_upgrade/0003.sql +18 -0
  100. hikyuu/data/sqlite_upgrade/0004.sql +11 -0
  101. hikyuu/data/sqlite_upgrade/0005.sql +28 -0
  102. hikyuu/data/sqlite_upgrade/0006.sql +5 -0
  103. hikyuu/data/sqlite_upgrade/0007.sql +4 -0
  104. hikyuu/data/sqlite_upgrade/0008.sql +22 -0
  105. hikyuu/data/sqlite_upgrade/0009.sql +8 -0
  106. hikyuu/data/sqlite_upgrade/0010.sql +5 -0
  107. hikyuu/data/sqlite_upgrade/0011.sql +16 -0
  108. hikyuu/data/sqlite_upgrade/0012.sql +15 -0
  109. hikyuu/data/sqlite_upgrade/0013.sql +9 -0
  110. hikyuu/data/sqlite_upgrade/0014.sql +607 -0
  111. hikyuu/data/sqlite_upgrade/0015.sql +7 -0
  112. hikyuu/data/sqlite_upgrade/0016.sql +8 -0
  113. hikyuu/data/sqlite_upgrade/0017.sql +16 -0
  114. hikyuu/data/sqlite_upgrade/0018.sql +5 -0
  115. hikyuu/data/sqlite_upgrade/0019.sql +4 -0
  116. hikyuu/data/sqlite_upgrade/0020.sql +4 -0
  117. hikyuu/data/sqlite_upgrade/0021.sql +6 -0
  118. hikyuu/data/sqlite_upgrade/0022.sql +6 -0
  119. hikyuu/data/sqlite_upgrade/0023.sql +7 -0
  120. hikyuu/data/sqlite_upgrade/0024.sql +22 -0
  121. hikyuu/data/sqlite_upgrade/0025.sql +63 -0
  122. hikyuu/data/sqlite_upgrade/0026.sql +10 -0
  123. hikyuu/data/sqlite_upgrade/0027.sql +8 -0
  124. hikyuu/data/sqlite_upgrade/__init__.py +1 -0
  125. hikyuu/data/sqlite_upgrade/createdb.sql +61 -0
  126. hikyuu/data/tdx_to_h5.py +464 -0
  127. hikyuu/data/tdx_to_mysql.py +464 -0
  128. hikyuu/data/weight_to_mysql.py +72 -0
  129. hikyuu/data/weight_to_sqlite.py +70 -0
  130. hikyuu/data/zh_bond10_to_mysql.py +30 -0
  131. hikyuu/data/zh_bond10_to_sqlite.py +42 -0
  132. hikyuu/data_driver/__init__.py +49 -0
  133. hikyuu/data_driver/jqdata_data_driver.py +277 -0
  134. hikyuu/data_driver/pytdx_data_driver.py +292 -0
  135. hikyuu/draw/__init__.py +65 -0
  136. hikyuu/draw/__init__.pyi +35 -0
  137. hikyuu/draw/drawplot/__init__.py +307 -0
  138. hikyuu/draw/drawplot/__init__.pyi +138 -0
  139. hikyuu/draw/drawplot/bokeh_draw.py +583 -0
  140. hikyuu/draw/drawplot/bokeh_draw.pyi +956 -0
  141. hikyuu/draw/drawplot/common.py +89 -0
  142. hikyuu/draw/drawplot/common.pyi +10 -0
  143. hikyuu/draw/drawplot/echarts_draw.py +597 -0
  144. hikyuu/draw/drawplot/echarts_draw.pyi +842 -0
  145. hikyuu/draw/drawplot/icon/1.png +0 -0
  146. hikyuu/draw/drawplot/icon/10.png +0 -0
  147. hikyuu/draw/drawplot/icon/11.png +0 -0
  148. hikyuu/draw/drawplot/icon/12.png +0 -0
  149. hikyuu/draw/drawplot/icon/13.png +0 -0
  150. hikyuu/draw/drawplot/icon/14.png +0 -0
  151. hikyuu/draw/drawplot/icon/15.png +0 -0
  152. hikyuu/draw/drawplot/icon/16.png +0 -0
  153. hikyuu/draw/drawplot/icon/17.png +0 -0
  154. hikyuu/draw/drawplot/icon/18.png +0 -0
  155. hikyuu/draw/drawplot/icon/19.png +0 -0
  156. hikyuu/draw/drawplot/icon/2.png +0 -0
  157. hikyuu/draw/drawplot/icon/20.png +0 -0
  158. hikyuu/draw/drawplot/icon/21.png +0 -0
  159. hikyuu/draw/drawplot/icon/22.png +0 -0
  160. hikyuu/draw/drawplot/icon/23.png +0 -0
  161. hikyuu/draw/drawplot/icon/24.png +0 -0
  162. hikyuu/draw/drawplot/icon/25.png +0 -0
  163. hikyuu/draw/drawplot/icon/26.png +0 -0
  164. hikyuu/draw/drawplot/icon/27.png +0 -0
  165. hikyuu/draw/drawplot/icon/28.png +0 -0
  166. hikyuu/draw/drawplot/icon/29.png +0 -0
  167. hikyuu/draw/drawplot/icon/3.png +0 -0
  168. hikyuu/draw/drawplot/icon/30.png +0 -0
  169. hikyuu/draw/drawplot/icon/31.png +0 -0
  170. hikyuu/draw/drawplot/icon/32.png +0 -0
  171. hikyuu/draw/drawplot/icon/33.png +0 -0
  172. hikyuu/draw/drawplot/icon/34.png +0 -0
  173. hikyuu/draw/drawplot/icon/35.png +0 -0
  174. hikyuu/draw/drawplot/icon/36.png +0 -0
  175. hikyuu/draw/drawplot/icon/37.png +0 -0
  176. hikyuu/draw/drawplot/icon/38.png +0 -0
  177. hikyuu/draw/drawplot/icon/39.png +0 -0
  178. hikyuu/draw/drawplot/icon/4.png +0 -0
  179. hikyuu/draw/drawplot/icon/40.png +0 -0
  180. hikyuu/draw/drawplot/icon/41.png +0 -0
  181. hikyuu/draw/drawplot/icon/42.png +0 -0
  182. hikyuu/draw/drawplot/icon/43.png +0 -0
  183. hikyuu/draw/drawplot/icon/44.png +0 -0
  184. hikyuu/draw/drawplot/icon/45.png +0 -0
  185. hikyuu/draw/drawplot/icon/46.png +0 -0
  186. hikyuu/draw/drawplot/icon/47.png +0 -0
  187. hikyuu/draw/drawplot/icon/48.png +0 -0
  188. hikyuu/draw/drawplot/icon/49.png +0 -0
  189. hikyuu/draw/drawplot/icon/5.png +0 -0
  190. hikyuu/draw/drawplot/icon/6.png +0 -0
  191. hikyuu/draw/drawplot/icon/7.png +0 -0
  192. hikyuu/draw/drawplot/icon/8.png +0 -0
  193. hikyuu/draw/drawplot/icon/9.png +0 -0
  194. hikyuu/draw/drawplot/icon/__init__.py +0 -0
  195. hikyuu/draw/drawplot/matplotlib_draw.py +1518 -0
  196. hikyuu/draw/drawplot/matplotlib_draw.pyi +1308 -0
  197. hikyuu/draw/elder.py +135 -0
  198. hikyuu/draw/elder.pyi +44 -0
  199. hikyuu/draw/kaufman.py +192 -0
  200. hikyuu/draw/kaufman.pyi +38 -0
  201. hikyuu/draw/volume.py +122 -0
  202. hikyuu/draw/volume.pyi +31 -0
  203. hikyuu/examples/Turtle_SG.py +47 -0
  204. hikyuu/examples/__init__.py +1 -0
  205. hikyuu/examples/examples_init.py +33 -0
  206. hikyuu/examples/notebook/000-Index.ipynb +76 -0
  207. hikyuu/examples/notebook/001-overview.ipynb +345 -0
  208. hikyuu/examples/notebook/002-HowToGetStock.ipynb +265 -0
  209. hikyuu/examples/notebook/003-HowToGetKDataAndDraw.ipynb +375 -0
  210. hikyuu/examples/notebook/004-IndicatorOverview.ipynb +501 -0
  211. hikyuu/examples/notebook/005-Drawplot.ipynb +321 -0
  212. hikyuu/examples/notebook/006-TradeManager.ipynb +381 -0
  213. hikyuu/examples/notebook/007-SystemDetails.ipynb +380 -0
  214. hikyuu/examples/notebook/008-Pickle.ipynb +127 -0
  215. hikyuu/examples/notebook/009-RealData.ipynb +110 -0
  216. hikyuu/examples/notebook/010-Portfolio.ipynb +333 -0
  217. hikyuu/examples/notebook/011-PyechartsDrawplot.ipynb +21821 -0
  218. hikyuu/examples/notebook/Demo/Demo1.ipynb +623 -0
  219. hikyuu/examples/notebook/Demo/Demo2.ipynb +665 -0
  220. hikyuu/examples/notebook/Demo/__init__.py +1 -0
  221. hikyuu/examples/notebook/README.md +1 -0
  222. hikyuu/examples/notebook/__init__.py +1 -0
  223. hikyuu/examples/notebook/images/002_01_block_config.png +0 -0
  224. hikyuu/examples/notebook/images/008_01_tocsv.png +0 -0
  225. hikyuu/examples/notebook/images/008_02_tocsv_look.png +0 -0
  226. hikyuu/examples/notebook/images/008_03_pickle.png +0 -0
  227. hikyuu/examples/notebook/images/__init__.py +1 -0
  228. hikyuu/examples/quick_crtsg.py +40 -0
  229. hikyuu/extend.py +369 -0
  230. hikyuu/extend.pyi +630 -0
  231. hikyuu/fetcher/__init__.py +8 -0
  232. hikyuu/fetcher/proxy/__init__.py +12 -0
  233. hikyuu/fetcher/proxy/proxy.py +39 -0
  234. hikyuu/fetcher/proxy/zhima.py +63 -0
  235. hikyuu/fetcher/stock/__init__.py +8 -0
  236. hikyuu/fetcher/stock/zh_block_em.py +218 -0
  237. hikyuu/fetcher/stock/zh_stock_a_huatai.py +51 -0
  238. hikyuu/fetcher/stock/zh_stock_a_pytdx.py +139 -0
  239. hikyuu/fetcher/stock/zh_stock_a_qmt.py +58 -0
  240. hikyuu/fetcher/stock/zh_stock_a_sina_qq.py +229 -0
  241. hikyuu/flat/Spot.py +440 -0
  242. hikyuu/flat/SpotList.py +74 -0
  243. hikyuu/flat/__init__.py +4 -0
  244. hikyuu/gui/HikyuuTDX.py +842 -0
  245. hikyuu/gui/__init__.py +1 -0
  246. hikyuu/gui/data/CollectSpotThread.py +43 -0
  247. hikyuu/gui/data/CollectToMemThread.py +123 -0
  248. hikyuu/gui/data/CollectToMySQLThread.py +178 -0
  249. hikyuu/gui/data/EscapetimeThread.py +32 -0
  250. hikyuu/gui/data/ImportBlockInfoTask.py +56 -0
  251. hikyuu/gui/data/ImportHistoryFinanceTask.py +143 -0
  252. hikyuu/gui/data/ImportPytdxTimeToH5Task.py +94 -0
  253. hikyuu/gui/data/ImportPytdxToH5Task.py +98 -0
  254. hikyuu/gui/data/ImportPytdxTransToH5Task.py +94 -0
  255. hikyuu/gui/data/ImportTdxToH5Task.py +111 -0
  256. hikyuu/gui/data/ImportWeightToSqliteTask.py +114 -0
  257. hikyuu/gui/data/ImportZhBond10Task.py +48 -0
  258. hikyuu/gui/data/MainWindow.py +830 -0
  259. hikyuu/gui/data/SchedImportThread.py +62 -0
  260. hikyuu/gui/data/UsePytdxImportToH5Thread.py +371 -0
  261. hikyuu/gui/data/UseTdxImportToH5Thread.py +182 -0
  262. hikyuu/gui/data/__init__.py +1 -0
  263. hikyuu/gui/data/tool.py +43 -0
  264. hikyuu/gui/hikyuu.ico +0 -0
  265. hikyuu/gui/hikyuu_small.png +0 -0
  266. hikyuu/gui/importdata.py +153 -0
  267. hikyuu/gui/spot_server.py +336 -0
  268. hikyuu/gui/start_huatai_insight.py +510 -0
  269. hikyuu/gui/start_qmt.py +122 -0
  270. hikyuu/hub.py +771 -0
  271. hikyuu/hub.pyi +295 -0
  272. hikyuu/include/__init__.py +1 -0
  273. hikyuu/include/hikyuu/Block.h +173 -0
  274. hikyuu/include/hikyuu/DataType.h +177 -0
  275. hikyuu/include/hikyuu/GlobalInitializer.h +46 -0
  276. hikyuu/include/hikyuu/HistoryFinanceInfo.h +35 -0
  277. hikyuu/include/hikyuu/KData.h +271 -0
  278. hikyuu/include/hikyuu/KDataImp.h +94 -0
  279. hikyuu/include/hikyuu/KQuery.h +275 -0
  280. hikyuu/include/hikyuu/KRecord.h +94 -0
  281. hikyuu/include/hikyuu/MarketInfo.h +132 -0
  282. hikyuu/include/hikyuu/Stock.h +358 -0
  283. hikyuu/include/hikyuu/StockManager.h +372 -0
  284. hikyuu/include/hikyuu/StockMapIterator.h +72 -0
  285. hikyuu/include/hikyuu/StockTypeInfo.h +127 -0
  286. hikyuu/include/hikyuu/StockWeight.h +148 -0
  287. hikyuu/include/hikyuu/StrategyContext.h +116 -0
  288. hikyuu/include/hikyuu/TimeLineRecord.h +71 -0
  289. hikyuu/include/hikyuu/TransRecord.h +79 -0
  290. hikyuu/include/hikyuu/ZhBond10.h +36 -0
  291. hikyuu/include/hikyuu/__init__.py +1 -0
  292. hikyuu/include/hikyuu/analysis/__init__.py +1 -0
  293. hikyuu/include/hikyuu/analysis/analysis_sys.h +76 -0
  294. hikyuu/include/hikyuu/analysis/combinate.h +115 -0
  295. hikyuu/include/hikyuu/config.h +51 -0
  296. hikyuu/include/hikyuu/data_driver/BaseInfoDriver.h +201 -0
  297. hikyuu/include/hikyuu/data_driver/BlockInfoDriver.h +108 -0
  298. hikyuu/include/hikyuu/data_driver/DataDriverFactory.h +58 -0
  299. hikyuu/include/hikyuu/data_driver/DriverConnectPool.h +146 -0
  300. hikyuu/include/hikyuu/data_driver/HistoryFinanceReader.h +36 -0
  301. hikyuu/include/hikyuu/data_driver/KDataDriver.h +194 -0
  302. hikyuu/include/hikyuu/data_driver/__init__.py +1 -0
  303. hikyuu/include/hikyuu/data_driver/base_info/__init__.py +1 -0
  304. hikyuu/include/hikyuu/data_driver/base_info/mysql/MySQLBaseInfoDriver.h +54 -0
  305. hikyuu/include/hikyuu/data_driver/base_info/mysql/__init__.py +1 -0
  306. hikyuu/include/hikyuu/data_driver/base_info/sqlite/SQLiteBaseInfoDriver.h +50 -0
  307. hikyuu/include/hikyuu/data_driver/base_info/sqlite/__init__.py +1 -0
  308. hikyuu/include/hikyuu/data_driver/base_info/table/HistoryFinanceFieldTable.h +19 -0
  309. hikyuu/include/hikyuu/data_driver/base_info/table/HistoryFinanceTable.h +23 -0
  310. hikyuu/include/hikyuu/data_driver/base_info/table/HolidayTable.h +29 -0
  311. hikyuu/include/hikyuu/data_driver/base_info/table/MarketInfoTable.h +127 -0
  312. hikyuu/include/hikyuu/data_driver/base_info/table/StockTable.h +64 -0
  313. hikyuu/include/hikyuu/data_driver/base_info/table/StockTypeInfoTable.h +108 -0
  314. hikyuu/include/hikyuu/data_driver/base_info/table/StockWeightTable.h +52 -0
  315. hikyuu/include/hikyuu/data_driver/base_info/table/ZhBond10Table.h +20 -0
  316. hikyuu/include/hikyuu/data_driver/base_info/table/__init__.py +1 -0
  317. hikyuu/include/hikyuu/data_driver/block_info/__init__.py +1 -0
  318. hikyuu/include/hikyuu/data_driver/block_info/mysql/MySQLBlockInfoDriver.h +36 -0
  319. hikyuu/include/hikyuu/data_driver/block_info/mysql/__init__.py +1 -0
  320. hikyuu/include/hikyuu/data_driver/block_info/qianlong/QLBlockInfoDriver.h +31 -0
  321. hikyuu/include/hikyuu/data_driver/block_info/qianlong/__init__.py +1 -0
  322. hikyuu/include/hikyuu/data_driver/block_info/sqlite/SQLiteBlockInfoDriver.h +36 -0
  323. hikyuu/include/hikyuu/data_driver/block_info/sqlite/__init__.py +1 -0
  324. hikyuu/include/hikyuu/data_driver/kdata/DoNothingKDataDriver.h +33 -0
  325. hikyuu/include/hikyuu/data_driver/kdata/__init__.py +1 -0
  326. hikyuu/include/hikyuu/data_driver/kdata/cvs/KDataTempCsvDriver.h +106 -0
  327. hikyuu/include/hikyuu/data_driver/kdata/cvs/__init__.py +1 -0
  328. hikyuu/include/hikyuu/data_driver/kdata/hdf5/H5KDataDriver.h +89 -0
  329. hikyuu/include/hikyuu/data_driver/kdata/hdf5/H5Record.h +50 -0
  330. hikyuu/include/hikyuu/data_driver/kdata/hdf5/__init__.py +1 -0
  331. hikyuu/include/hikyuu/data_driver/kdata/mysql/KRecordTable.h +124 -0
  332. hikyuu/include/hikyuu/data_driver/kdata/mysql/MySQLKDataDriver.h +78 -0
  333. hikyuu/include/hikyuu/data_driver/kdata/mysql/__init__.py +1 -0
  334. hikyuu/include/hikyuu/data_driver/kdata/sqlite/SQLiteKDataDriver.h +62 -0
  335. hikyuu/include/hikyuu/data_driver/kdata/sqlite/__init__.py +1 -0
  336. hikyuu/include/hikyuu/data_driver/kdata/tdx/TdxKDataDriver.h +63 -0
  337. hikyuu/include/hikyuu/data_driver/kdata/tdx/__init__.py +1 -0
  338. hikyuu/include/hikyuu/debug.h +32 -0
  339. hikyuu/include/hikyuu/doc.h +166 -0
  340. hikyuu/include/hikyuu/global/GlobalSpotAgent.h +33 -0
  341. hikyuu/include/hikyuu/global/SpotRecord.h +52 -0
  342. hikyuu/include/hikyuu/global/__init__.py +1 -0
  343. hikyuu/include/hikyuu/global/agent/SpotAgent.h +143 -0
  344. hikyuu/include/hikyuu/global/agent/__init__.py +1 -0
  345. hikyuu/include/hikyuu/global/agent/hikyuu/__init__.py +1 -0
  346. hikyuu/include/hikyuu/global/agent/hikyuu/flat/__init__.py +1 -0
  347. hikyuu/include/hikyuu/global/agent/spot_generated.h +527 -0
  348. hikyuu/include/hikyuu/global/schedule/__init__.py +1 -0
  349. hikyuu/include/hikyuu/global/schedule/inner_tasks.h +16 -0
  350. hikyuu/include/hikyuu/global/schedule/scheduler.h +24 -0
  351. hikyuu/include/hikyuu/global/sysinfo.h +67 -0
  352. hikyuu/include/hikyuu/hikyuu.h +55 -0
  353. hikyuu/include/hikyuu/indicator/IndParam.h +39 -0
  354. hikyuu/include/hikyuu/indicator/Indicator.h +434 -0
  355. hikyuu/include/hikyuu/indicator/Indicator2InImp.h +66 -0
  356. hikyuu/include/hikyuu/indicator/IndicatorImp.h +417 -0
  357. hikyuu/include/hikyuu/indicator/__init__.py +1 -0
  358. hikyuu/include/hikyuu/indicator/build_in.h +131 -0
  359. hikyuu/include/hikyuu/indicator/crt/ABS.h +34 -0
  360. hikyuu/include/hikyuu/indicator/crt/ACOS.h +36 -0
  361. hikyuu/include/hikyuu/indicator/crt/AD.h +28 -0
  362. hikyuu/include/hikyuu/indicator/crt/ADVANCE.h +34 -0
  363. hikyuu/include/hikyuu/indicator/crt/ALIGN.h +42 -0
  364. hikyuu/include/hikyuu/indicator/crt/AMA.h +113 -0
  365. hikyuu/include/hikyuu/indicator/crt/ASIN.h +36 -0
  366. hikyuu/include/hikyuu/indicator/crt/ATAN.h +36 -0
  367. hikyuu/include/hikyuu/indicator/crt/ATR.h +33 -0
  368. hikyuu/include/hikyuu/indicator/crt/AVEDEV.h +45 -0
  369. hikyuu/include/hikyuu/indicator/crt/BACKSET.h +44 -0
  370. hikyuu/include/hikyuu/indicator/crt/BARSCOUNT.h +37 -0
  371. hikyuu/include/hikyuu/indicator/crt/BARSLAST.h +41 -0
  372. hikyuu/include/hikyuu/indicator/crt/BARSSINCE.h +53 -0
  373. hikyuu/include/hikyuu/indicator/crt/BETWEEN.h +85 -0
  374. hikyuu/include/hikyuu/indicator/crt/BLOCKSETNUM.h +23 -0
  375. hikyuu/include/hikyuu/indicator/crt/CEILING.h +38 -0
  376. hikyuu/include/hikyuu/indicator/crt/CONTEXT.h +30 -0
  377. hikyuu/include/hikyuu/indicator/crt/CORR.h +26 -0
  378. hikyuu/include/hikyuu/indicator/crt/COS.h +36 -0
  379. hikyuu/include/hikyuu/indicator/crt/COST.h +37 -0
  380. hikyuu/include/hikyuu/indicator/crt/COUNT.h +54 -0
  381. hikyuu/include/hikyuu/indicator/crt/CROSS.h +48 -0
  382. hikyuu/include/hikyuu/indicator/crt/CVAL.h +35 -0
  383. hikyuu/include/hikyuu/indicator/crt/CYCLE.h +24 -0
  384. hikyuu/include/hikyuu/indicator/crt/DECLINE.h +34 -0
  385. hikyuu/include/hikyuu/indicator/crt/DEVSQ.h +40 -0
  386. hikyuu/include/hikyuu/indicator/crt/DIFF.h +31 -0
  387. hikyuu/include/hikyuu/indicator/crt/DISCARD.h +27 -0
  388. hikyuu/include/hikyuu/indicator/crt/DMA.h +35 -0
  389. hikyuu/include/hikyuu/indicator/crt/DOWNNDAY.h +43 -0
  390. hikyuu/include/hikyuu/indicator/crt/DROPNA.h +31 -0
  391. hikyuu/include/hikyuu/indicator/crt/EMA.h +44 -0
  392. hikyuu/include/hikyuu/indicator/crt/EVERY.h +44 -0
  393. hikyuu/include/hikyuu/indicator/crt/EXIST.h +44 -0
  394. hikyuu/include/hikyuu/indicator/crt/EXP.h +34 -0
  395. hikyuu/include/hikyuu/indicator/crt/FILTER.h +44 -0
  396. hikyuu/include/hikyuu/indicator/crt/FINANCE.h +20 -0
  397. hikyuu/include/hikyuu/indicator/crt/FLOOR.h +38 -0
  398. hikyuu/include/hikyuu/indicator/crt/HHV.h +44 -0
  399. hikyuu/include/hikyuu/indicator/crt/HHVBARS.h +44 -0
  400. hikyuu/include/hikyuu/indicator/crt/HSL.h +27 -0
  401. hikyuu/include/hikyuu/indicator/crt/IC.h +41 -0
  402. hikyuu/include/hikyuu/indicator/crt/ICIR.h +51 -0
  403. hikyuu/include/hikyuu/indicator/crt/INBLOCK.h +31 -0
  404. hikyuu/include/hikyuu/indicator/crt/INDEX.h +60 -0
  405. hikyuu/include/hikyuu/indicator/crt/INSUM.h +36 -0
  406. hikyuu/include/hikyuu/indicator/crt/INTPART.h +38 -0
  407. hikyuu/include/hikyuu/indicator/crt/IR.h +44 -0
  408. hikyuu/include/hikyuu/indicator/crt/ISINF.h +28 -0
  409. hikyuu/include/hikyuu/indicator/crt/ISINFA.h +28 -0
  410. hikyuu/include/hikyuu/indicator/crt/ISLASTBAR.h +30 -0
  411. hikyuu/include/hikyuu/indicator/crt/ISNA.h +29 -0
  412. hikyuu/include/hikyuu/indicator/crt/JUMPDOWN.h +24 -0
  413. hikyuu/include/hikyuu/indicator/crt/JUMPUP.h +24 -0
  414. hikyuu/include/hikyuu/indicator/crt/KALMAN.h +30 -0
  415. hikyuu/include/hikyuu/indicator/crt/KDATA.h +72 -0
  416. hikyuu/include/hikyuu/indicator/crt/LAST.h +100 -0
  417. hikyuu/include/hikyuu/indicator/crt/LASTVALUE.h +29 -0
  418. hikyuu/include/hikyuu/indicator/crt/LIUTONGPAN.h +24 -0
  419. hikyuu/include/hikyuu/indicator/crt/LLV.h +46 -0
  420. hikyuu/include/hikyuu/indicator/crt/LLVBARS.h +44 -0
  421. hikyuu/include/hikyuu/indicator/crt/LN.h +36 -0
  422. hikyuu/include/hikyuu/indicator/crt/LOG.h +35 -0
  423. hikyuu/include/hikyuu/indicator/crt/LONGCROSS.h +68 -0
  424. hikyuu/include/hikyuu/indicator/crt/MA.h +44 -0
  425. hikyuu/include/hikyuu/indicator/crt/MACD.h +62 -0
  426. hikyuu/include/hikyuu/indicator/crt/MAX.h +45 -0
  427. hikyuu/include/hikyuu/indicator/crt/MDD.h +29 -0
  428. hikyuu/include/hikyuu/indicator/crt/MIN.h +45 -0
  429. hikyuu/include/hikyuu/indicator/crt/MOD.h +49 -0
  430. hikyuu/include/hikyuu/indicator/crt/MRR.h +29 -0
  431. hikyuu/include/hikyuu/indicator/crt/NDAY.h +43 -0
  432. hikyuu/include/hikyuu/indicator/crt/NOT.h +35 -0
  433. hikyuu/include/hikyuu/indicator/crt/POS.h +21 -0
  434. hikyuu/include/hikyuu/indicator/crt/POW.h +48 -0
  435. hikyuu/include/hikyuu/indicator/crt/PRICELIST.h +59 -0
  436. hikyuu/include/hikyuu/indicator/crt/RECOVER.h +45 -0
  437. hikyuu/include/hikyuu/indicator/crt/REF.h +48 -0
  438. hikyuu/include/hikyuu/indicator/crt/REPLACE.h +29 -0
  439. hikyuu/include/hikyuu/indicator/crt/RESULT.h +20 -0
  440. hikyuu/include/hikyuu/indicator/crt/REVERSE.h +36 -0
  441. hikyuu/include/hikyuu/indicator/crt/ROC.h +39 -0
  442. hikyuu/include/hikyuu/indicator/crt/ROCP.h +39 -0
  443. hikyuu/include/hikyuu/indicator/crt/ROCR.h +39 -0
  444. hikyuu/include/hikyuu/indicator/crt/ROCR100.h +39 -0
  445. hikyuu/include/hikyuu/indicator/crt/ROUND.h +36 -0
  446. hikyuu/include/hikyuu/indicator/crt/ROUNDDOWN.h +36 -0
  447. hikyuu/include/hikyuu/indicator/crt/ROUNDUP.h +36 -0
  448. hikyuu/include/hikyuu/indicator/crt/RSI.h +43 -0
  449. hikyuu/include/hikyuu/indicator/crt/SAFTYLOSS.h +79 -0
  450. hikyuu/include/hikyuu/indicator/crt/SGN.h +34 -0
  451. hikyuu/include/hikyuu/indicator/crt/SIN.h +36 -0
  452. hikyuu/include/hikyuu/indicator/crt/SLICE.h +44 -0
  453. hikyuu/include/hikyuu/indicator/crt/SLOPE.h +44 -0
  454. hikyuu/include/hikyuu/indicator/crt/SMA.h +72 -0
  455. hikyuu/include/hikyuu/indicator/crt/SPEARMAN.h +24 -0
  456. hikyuu/include/hikyuu/indicator/crt/SQRT.h +41 -0
  457. hikyuu/include/hikyuu/indicator/crt/STDEV.h +44 -0
  458. hikyuu/include/hikyuu/indicator/crt/STDP.h +38 -0
  459. hikyuu/include/hikyuu/indicator/crt/SUM.h +44 -0
  460. hikyuu/include/hikyuu/indicator/crt/SUMBARS.h +44 -0
  461. hikyuu/include/hikyuu/indicator/crt/TAN.h +36 -0
  462. hikyuu/include/hikyuu/indicator/crt/TIME.h +69 -0
  463. hikyuu/include/hikyuu/indicator/crt/TIMELINE.h +23 -0
  464. hikyuu/include/hikyuu/indicator/crt/TIMELINEVOL.h +21 -0
  465. hikyuu/include/hikyuu/indicator/crt/TR.h +32 -0
  466. hikyuu/include/hikyuu/indicator/crt/TURNOVER.h +21 -0
  467. hikyuu/include/hikyuu/indicator/crt/UPNDAY.h +43 -0
  468. hikyuu/include/hikyuu/indicator/crt/VAR.h +40 -0
  469. hikyuu/include/hikyuu/indicator/crt/VARP.h +40 -0
  470. hikyuu/include/hikyuu/indicator/crt/VIGOR.h +34 -0
  471. hikyuu/include/hikyuu/indicator/crt/WINNER.h +38 -0
  472. hikyuu/include/hikyuu/indicator/crt/WMA.h +46 -0
  473. hikyuu/include/hikyuu/indicator/crt/ZHBOND10.h +27 -0
  474. hikyuu/include/hikyuu/indicator/crt/ZONGGUBEN.h +17 -0
  475. hikyuu/include/hikyuu/indicator/crt/ZSCORE.h +30 -0
  476. hikyuu/include/hikyuu/indicator/crt/__init__.py +1 -0
  477. hikyuu/include/hikyuu/indicator/imp/IAbs.h +26 -0
  478. hikyuu/include/hikyuu/indicator/imp/IAcos.h +28 -0
  479. hikyuu/include/hikyuu/indicator/imp/IAd.h +30 -0
  480. hikyuu/include/hikyuu/indicator/imp/IAdvance.h +29 -0
  481. hikyuu/include/hikyuu/indicator/imp/IAlign.h +28 -0
  482. hikyuu/include/hikyuu/indicator/imp/IAma.h +38 -0
  483. hikyuu/include/hikyuu/indicator/imp/IAsin.h +28 -0
  484. hikyuu/include/hikyuu/indicator/imp/IAtan.h +28 -0
  485. hikyuu/include/hikyuu/indicator/imp/IAtr.h +30 -0
  486. hikyuu/include/hikyuu/indicator/imp/IBackset.h +33 -0
  487. hikyuu/include/hikyuu/indicator/imp/IBarsCount.h +28 -0
  488. hikyuu/include/hikyuu/indicator/imp/IBarsLast.h +28 -0
  489. hikyuu/include/hikyuu/indicator/imp/IBarsSince.h +34 -0
  490. hikyuu/include/hikyuu/indicator/imp/IBlockSetNum.h +28 -0
  491. hikyuu/include/hikyuu/indicator/imp/ICeil.h +31 -0
  492. hikyuu/include/hikyuu/indicator/imp/IContext.h +44 -0
  493. hikyuu/include/hikyuu/indicator/imp/ICorr.h +26 -0
  494. hikyuu/include/hikyuu/indicator/imp/ICos.h +28 -0
  495. hikyuu/include/hikyuu/indicator/imp/ICost.h +31 -0
  496. hikyuu/include/hikyuu/indicator/imp/ICount.h +32 -0
  497. hikyuu/include/hikyuu/indicator/imp/ICval.h +29 -0
  498. hikyuu/include/hikyuu/indicator/imp/ICycle.h +30 -0
  499. hikyuu/include/hikyuu/indicator/imp/IDecline.h +29 -0
  500. hikyuu/include/hikyuu/indicator/imp/IDevsq.h +29 -0
  501. hikyuu/include/hikyuu/indicator/imp/IDiff.h +29 -0
  502. hikyuu/include/hikyuu/indicator/imp/IDiscard.h +28 -0
  503. hikyuu/include/hikyuu/indicator/imp/IDma.h +30 -0
  504. hikyuu/include/hikyuu/indicator/imp/IDropna.h +28 -0
  505. hikyuu/include/hikyuu/indicator/imp/IEma.h +29 -0
  506. hikyuu/include/hikyuu/indicator/imp/IEvery.h +32 -0
  507. hikyuu/include/hikyuu/indicator/imp/IExist.h +32 -0
  508. hikyuu/include/hikyuu/indicator/imp/IExp.h +28 -0
  509. hikyuu/include/hikyuu/indicator/imp/IFilter.h +34 -0
  510. hikyuu/include/hikyuu/indicator/imp/IFinance.h +25 -0
  511. hikyuu/include/hikyuu/indicator/imp/IFloor.h +31 -0
  512. hikyuu/include/hikyuu/indicator/imp/IHhvbars.h +29 -0
  513. hikyuu/include/hikyuu/indicator/imp/IHighLine.h +34 -0
  514. hikyuu/include/hikyuu/indicator/imp/IHsl.h +30 -0
  515. hikyuu/include/hikyuu/indicator/imp/IIc.h +45 -0
  516. hikyuu/include/hikyuu/indicator/imp/IInBlock.h +30 -0
  517. hikyuu/include/hikyuu/indicator/imp/IInSum.h +28 -0
  518. hikyuu/include/hikyuu/indicator/imp/IIndex.h +26 -0
  519. hikyuu/include/hikyuu/indicator/imp/IIntpart.h +31 -0
  520. hikyuu/include/hikyuu/indicator/imp/IIsInf.h +26 -0
  521. hikyuu/include/hikyuu/indicator/imp/IIsInfa.h +26 -0
  522. hikyuu/include/hikyuu/indicator/imp/IIsLastBar.h +27 -0
  523. hikyuu/include/hikyuu/indicator/imp/IIsNa.h +26 -0
  524. hikyuu/include/hikyuu/indicator/imp/IJumpDown.h +24 -0
  525. hikyuu/include/hikyuu/indicator/imp/IJumpUp.h +24 -0
  526. hikyuu/include/hikyuu/indicator/imp/IKData.h +29 -0
  527. hikyuu/include/hikyuu/indicator/imp/IKalman.h +27 -0
  528. hikyuu/include/hikyuu/indicator/imp/ILastValue.h +26 -0
  529. hikyuu/include/hikyuu/indicator/imp/ILiuTongPan.h +29 -0
  530. hikyuu/include/hikyuu/indicator/imp/ILn.h +28 -0
  531. hikyuu/include/hikyuu/indicator/imp/ILog.h +28 -0
  532. hikyuu/include/hikyuu/indicator/imp/ILowLine.h +30 -0
  533. hikyuu/include/hikyuu/indicator/imp/ILowLineBars.h +29 -0
  534. hikyuu/include/hikyuu/indicator/imp/IMa.h +27 -0
  535. hikyuu/include/hikyuu/indicator/imp/IMacd.h +41 -0
  536. hikyuu/include/hikyuu/indicator/imp/IMdd.h +23 -0
  537. hikyuu/include/hikyuu/indicator/imp/IMrr.h +23 -0
  538. hikyuu/include/hikyuu/indicator/imp/INot.h +26 -0
  539. hikyuu/include/hikyuu/indicator/imp/IPow.h +32 -0
  540. hikyuu/include/hikyuu/indicator/imp/IPriceList.h +29 -0
  541. hikyuu/include/hikyuu/indicator/imp/IRecover.h +29 -0
  542. hikyuu/include/hikyuu/indicator/imp/IRef.h +34 -0
  543. hikyuu/include/hikyuu/indicator/imp/IReplace.h +26 -0
  544. hikyuu/include/hikyuu/indicator/imp/IResult.h +26 -0
  545. hikyuu/include/hikyuu/indicator/imp/IReverse.h +28 -0
  546. hikyuu/include/hikyuu/indicator/imp/IRoc.h +29 -0
  547. hikyuu/include/hikyuu/indicator/imp/IRocp.h +29 -0
  548. hikyuu/include/hikyuu/indicator/imp/IRocr.h +29 -0
  549. hikyuu/include/hikyuu/indicator/imp/IRocr100.h +29 -0
  550. hikyuu/include/hikyuu/indicator/imp/IRound.h +32 -0
  551. hikyuu/include/hikyuu/indicator/imp/IRoundDown.h +32 -0
  552. hikyuu/include/hikyuu/indicator/imp/IRoundUp.h +32 -0
  553. hikyuu/include/hikyuu/indicator/imp/ISaftyLoss.h +44 -0
  554. hikyuu/include/hikyuu/indicator/imp/ISign.h +28 -0
  555. hikyuu/include/hikyuu/indicator/imp/ISin.h +28 -0
  556. hikyuu/include/hikyuu/indicator/imp/ISlice.h +25 -0
  557. hikyuu/include/hikyuu/indicator/imp/ISlope.h +25 -0
  558. hikyuu/include/hikyuu/indicator/imp/ISma.h +34 -0
  559. hikyuu/include/hikyuu/indicator/imp/ISpearman.h +26 -0
  560. hikyuu/include/hikyuu/indicator/imp/ISqrt.h +31 -0
  561. hikyuu/include/hikyuu/indicator/imp/IStdev.h +31 -0
  562. hikyuu/include/hikyuu/indicator/imp/IStdp.h +33 -0
  563. hikyuu/include/hikyuu/indicator/imp/ISum.h +27 -0
  564. hikyuu/include/hikyuu/indicator/imp/ISumBars.h +30 -0
  565. hikyuu/include/hikyuu/indicator/imp/ITan.h +28 -0
  566. hikyuu/include/hikyuu/indicator/imp/ITime.h +33 -0
  567. hikyuu/include/hikyuu/indicator/imp/ITimeLine.h +32 -0
  568. hikyuu/include/hikyuu/indicator/imp/ITr.h +35 -0
  569. hikyuu/include/hikyuu/indicator/imp/IVar.h +32 -0
  570. hikyuu/include/hikyuu/indicator/imp/IVarp.h +32 -0
  571. hikyuu/include/hikyuu/indicator/imp/IVigor.h +35 -0
  572. hikyuu/include/hikyuu/indicator/imp/IWinner.h +26 -0
  573. hikyuu/include/hikyuu/indicator/imp/IWma.h +30 -0
  574. hikyuu/include/hikyuu/indicator/imp/IZScore.h +25 -0
  575. hikyuu/include/hikyuu/indicator/imp/IZhBond10.h +30 -0
  576. hikyuu/include/hikyuu/indicator/imp/IZongGuBen.h +25 -0
  577. hikyuu/include/hikyuu/indicator/imp/__init__.py +1 -0
  578. hikyuu/include/hikyuu/indicator_talib/__init__.py +1 -0
  579. hikyuu/include/hikyuu/indicator_talib/imp/TaAdosc.h +26 -0
  580. hikyuu/include/hikyuu/indicator_talib/imp/TaApo.h +24 -0
  581. hikyuu/include/hikyuu/indicator_talib/imp/TaBbands.h +24 -0
  582. hikyuu/include/hikyuu/indicator_talib/imp/TaMa.h +24 -0
  583. hikyuu/include/hikyuu/indicator_talib/imp/TaMacd.h +24 -0
  584. hikyuu/include/hikyuu/indicator_talib/imp/TaMacdext.h +24 -0
  585. hikyuu/include/hikyuu/indicator_talib/imp/TaMama.h +24 -0
  586. hikyuu/include/hikyuu/indicator_talib/imp/TaMavp.h +27 -0
  587. hikyuu/include/hikyuu/indicator_talib/imp/TaPpo.h +24 -0
  588. hikyuu/include/hikyuu/indicator_talib/imp/TaSar.h +26 -0
  589. hikyuu/include/hikyuu/indicator_talib/imp/TaSarext.h +31 -0
  590. hikyuu/include/hikyuu/indicator_talib/imp/TaStddev.h +24 -0
  591. hikyuu/include/hikyuu/indicator_talib/imp/TaStoch.h +27 -0
  592. hikyuu/include/hikyuu/indicator_talib/imp/TaStochf.h +26 -0
  593. hikyuu/include/hikyuu/indicator_talib/imp/TaStochrsi.h +24 -0
  594. hikyuu/include/hikyuu/indicator_talib/imp/TaT3.h +24 -0
  595. hikyuu/include/hikyuu/indicator_talib/imp/TaUltosc.h +26 -0
  596. hikyuu/include/hikyuu/indicator_talib/imp/TaVar.h +24 -0
  597. hikyuu/include/hikyuu/indicator_talib/imp/__init__.py +1 -0
  598. hikyuu/include/hikyuu/indicator_talib/imp/ta_defines.h +237 -0
  599. hikyuu/include/hikyuu/indicator_talib/imp/ta_imp.h +1328 -0
  600. hikyuu/include/hikyuu/indicator_talib/ta_crt.h +322 -0
  601. hikyuu/include/hikyuu/python/__init__.py +1 -0
  602. hikyuu/include/hikyuu/python/convert_any.h +299 -0
  603. hikyuu/include/hikyuu/python/pickle_support.h +90 -0
  604. hikyuu/include/hikyuu/python/pybind_utils.h +103 -0
  605. hikyuu/include/hikyuu/serialization/Block_serialization.h +55 -0
  606. hikyuu/include/hikyuu/serialization/Datetime_serialization.h +40 -0
  607. hikyuu/include/hikyuu/serialization/KData_serialization.h +45 -0
  608. hikyuu/include/hikyuu/serialization/KQuery_serialization.h +79 -0
  609. hikyuu/include/hikyuu/serialization/KRecord_serialization.h +50 -0
  610. hikyuu/include/hikyuu/serialization/MarketInfo_serialization.h +68 -0
  611. hikyuu/include/hikyuu/serialization/PriceList_serialization.h +66 -0
  612. hikyuu/include/hikyuu/serialization/StockTypeInfo_serialization.h +62 -0
  613. hikyuu/include/hikyuu/serialization/StockWeight_serialization.h +65 -0
  614. hikyuu/include/hikyuu/serialization/Stock_serialization.h +47 -0
  615. hikyuu/include/hikyuu/serialization/TimeDelta_serialization.h +44 -0
  616. hikyuu/include/hikyuu/serialization/TimeLineRecord_serialization.h +42 -0
  617. hikyuu/include/hikyuu/serialization/TransRecord_serialization.h +44 -0
  618. hikyuu/include/hikyuu/serialization/__init__.py +1 -0
  619. hikyuu/include/hikyuu/serialization/all.h +26 -0
  620. hikyuu/include/hikyuu/strategy/BrokerTradeManager.h +433 -0
  621. hikyuu/include/hikyuu/strategy/RunPortfolioInStrategy.h +36 -0
  622. hikyuu/include/hikyuu/strategy/RunSystemInStrategy.h +38 -0
  623. hikyuu/include/hikyuu/strategy/Strategy.h +190 -0
  624. hikyuu/include/hikyuu/strategy/__init__.py +1 -0
  625. hikyuu/include/hikyuu/trade_manage/BorrowRecord.h +91 -0
  626. hikyuu/include/hikyuu/trade_manage/CostRecord.h +67 -0
  627. hikyuu/include/hikyuu/trade_manage/FundsRecord.h +110 -0
  628. hikyuu/include/hikyuu/trade_manage/LoanRecord.h +64 -0
  629. hikyuu/include/hikyuu/trade_manage/OrderBrokerBase.h +207 -0
  630. hikyuu/include/hikyuu/trade_manage/Performance.h +80 -0
  631. hikyuu/include/hikyuu/trade_manage/PositionRecord.h +114 -0
  632. hikyuu/include/hikyuu/trade_manage/TradeCostBase.h +174 -0
  633. hikyuu/include/hikyuu/trade_manage/TradeManager.h +487 -0
  634. hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +778 -0
  635. hikyuu/include/hikyuu/trade_manage/TradeRecord.h +155 -0
  636. hikyuu/include/hikyuu/trade_manage/__init__.py +1 -0
  637. hikyuu/include/hikyuu/trade_manage/build_in.h +19 -0
  638. hikyuu/include/hikyuu/trade_manage/crt/TC_FixedA.h +45 -0
  639. hikyuu/include/hikyuu/trade_manage/crt/TC_FixedA2015.h +43 -0
  640. hikyuu/include/hikyuu/trade_manage/crt/TC_FixedA2017.h +44 -0
  641. hikyuu/include/hikyuu/trade_manage/crt/TC_TestStub.h +21 -0
  642. hikyuu/include/hikyuu/trade_manage/crt/TC_Zero.h +25 -0
  643. hikyuu/include/hikyuu/trade_manage/crt/__init__.py +1 -0
  644. hikyuu/include/hikyuu/trade_manage/crt/crtTM.h +33 -0
  645. hikyuu/include/hikyuu/trade_manage/imp/FixedA2015TradeCost.h +53 -0
  646. hikyuu/include/hikyuu/trade_manage/imp/FixedA2017TradeCost.h +56 -0
  647. hikyuu/include/hikyuu/trade_manage/imp/FixedATradeCost.h +88 -0
  648. hikyuu/include/hikyuu/trade_manage/imp/TradeCostStub.h +48 -0
  649. hikyuu/include/hikyuu/trade_manage/imp/ZeroTradeCost.h +50 -0
  650. hikyuu/include/hikyuu/trade_manage/imp/__init__.py +1 -0
  651. hikyuu/include/hikyuu/trade_sys/__init__.py +1 -0
  652. hikyuu/include/hikyuu/trade_sys/all.h +24 -0
  653. hikyuu/include/hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h +229 -0
  654. hikyuu/include/hikyuu/trade_sys/allocatefunds/__init__.py +1 -0
  655. hikyuu/include/hikyuu/trade_sys/allocatefunds/build_in.h +17 -0
  656. hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_EqualWeight.h +25 -0
  657. hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_FixedWeight.h +26 -0
  658. hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_FixedWeightList.h +22 -0
  659. hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_MultiFactor.h +21 -0
  660. hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/__init__.py +1 -0
  661. hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/EqualWeightAllocateFunds.h +27 -0
  662. hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/FixedWeightAllocateFunds.h +28 -0
  663. hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/FixedWeightListAllocateFunds.h +25 -0
  664. hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/MultiFactorAllocaterFunds.h +26 -0
  665. hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/__init__.py +1 -0
  666. hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +244 -0
  667. hikyuu/include/hikyuu/trade_sys/condition/__init__.py +1 -0
  668. hikyuu/include/hikyuu/trade_sys/condition/build_in.h +17 -0
  669. hikyuu/include/hikyuu/trade_sys/condition/crt/CN_Bool.h +22 -0
  670. hikyuu/include/hikyuu/trade_sys/condition/crt/CN_Logic.h +35 -0
  671. hikyuu/include/hikyuu/trade_sys/condition/crt/CN_Manual.h +20 -0
  672. hikyuu/include/hikyuu/trade_sys/condition/crt/CN_OPLine.h +26 -0
  673. hikyuu/include/hikyuu/trade_sys/condition/crt/__init__.py +1 -0
  674. hikyuu/include/hikyuu/trade_sys/condition/imp/BoolCondition.h +40 -0
  675. hikyuu/include/hikyuu/trade_sys/condition/imp/ManualCondition.h +23 -0
  676. hikyuu/include/hikyuu/trade_sys/condition/imp/OPLineCondition.h +44 -0
  677. hikyuu/include/hikyuu/trade_sys/condition/imp/__init__.py +1 -0
  678. hikyuu/include/hikyuu/trade_sys/condition/imp/logic/AddCondition.h +42 -0
  679. hikyuu/include/hikyuu/trade_sys/condition/imp/logic/AndCondition.h +42 -0
  680. hikyuu/include/hikyuu/trade_sys/condition/imp/logic/DivCondition.h +42 -0
  681. hikyuu/include/hikyuu/trade_sys/condition/imp/logic/MultiCondition.h +42 -0
  682. hikyuu/include/hikyuu/trade_sys/condition/imp/logic/OrCondition.h +42 -0
  683. hikyuu/include/hikyuu/trade_sys/condition/imp/logic/SubCondition.h +42 -0
  684. hikyuu/include/hikyuu/trade_sys/condition/imp/logic/__init__.py +1 -0
  685. hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +192 -0
  686. hikyuu/include/hikyuu/trade_sys/environment/__init__.py +1 -0
  687. hikyuu/include/hikyuu/trade_sys/environment/build_in.h +17 -0
  688. hikyuu/include/hikyuu/trade_sys/environment/crt/EV_Bool.h +23 -0
  689. hikyuu/include/hikyuu/trade_sys/environment/crt/EV_Logic.h +35 -0
  690. hikyuu/include/hikyuu/trade_sys/environment/crt/EV_Manual.h +20 -0
  691. hikyuu/include/hikyuu/trade_sys/environment/crt/EV_TwoLine.h +28 -0
  692. hikyuu/include/hikyuu/trade_sys/environment/crt/__init__.py +1 -0
  693. hikyuu/include/hikyuu/trade_sys/environment/imp/BoolEnvironment.h +41 -0
  694. hikyuu/include/hikyuu/trade_sys/environment/imp/ManualEnvironment.h +23 -0
  695. hikyuu/include/hikyuu/trade_sys/environment/imp/TwoLineEnvironment.h +47 -0
  696. hikyuu/include/hikyuu/trade_sys/environment/imp/__init__.py +1 -0
  697. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/AddEnvironment.h +42 -0
  698. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/AndEnvironment.h +42 -0
  699. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/DivEnvironment.h +42 -0
  700. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/MultiEnvironment.h +42 -0
  701. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/OrEnvironment.h +42 -0
  702. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/SubEnvironment.h +42 -0
  703. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/__init__.py +1 -0
  704. hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +243 -0
  705. hikyuu/include/hikyuu/trade_sys/moneymanager/__init__.py +1 -0
  706. hikyuu/include/hikyuu/trade_sys/moneymanager/build_in.h +22 -0
  707. hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedCapital.h +26 -0
  708. hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedCapitalFunds.h +26 -0
  709. hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedCount.h +28 -0
  710. hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedCountTps.h +27 -0
  711. hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedPercent.h +27 -0
  712. hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedRisk.h +26 -0
  713. hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedUnits.h +26 -0
  714. hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_Nothing.h +24 -0
  715. hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_WilliamsFixedRisk.h +27 -0
  716. hikyuu/include/hikyuu/trade_sys/moneymanager/crt/__init__.py +1 -0
  717. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCapitalFundsMM.h +28 -0
  718. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCapitalMoneyManager.h +28 -0
  719. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCountMoneyManager.h +38 -0
  720. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCountTpsMM.h +44 -0
  721. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedPercentMoneyManager.h +34 -0
  722. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedRiskMoneyManager.h +28 -0
  723. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedUnitsMoneyManager.h +28 -0
  724. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/NotMoneyManager.h +30 -0
  725. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/WilliamsFixedRiskMoneyManager.h +28 -0
  726. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/__init__.py +1 -0
  727. hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +275 -0
  728. hikyuu/include/hikyuu/trade_sys/multifactor/ScoreRecord.h +51 -0
  729. hikyuu/include/hikyuu/trade_sys/multifactor/__init__.py +1 -0
  730. hikyuu/include/hikyuu/trade_sys/multifactor/build_in.h +13 -0
  731. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_EqualWeight.h +29 -0
  732. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_ICIRWeight.h +30 -0
  733. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_ICWeight.h +30 -0
  734. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_Weight.h +30 -0
  735. hikyuu/include/hikyuu/trade_sys/multifactor/crt/__init__.py +1 -0
  736. hikyuu/include/hikyuu/trade_sys/multifactor/imp/EqualWeightMultiFactor.h +25 -0
  737. hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICIRMultiFactor.h +27 -0
  738. hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICMultiFactor.h +27 -0
  739. hikyuu/include/hikyuu/trade_sys/multifactor/imp/WeightMultiFactor.h +41 -0
  740. hikyuu/include/hikyuu/trade_sys/multifactor/imp/__init__.py +1 -0
  741. hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +253 -0
  742. hikyuu/include/hikyuu/trade_sys/portfolio/__init__.py +1 -0
  743. hikyuu/include/hikyuu/trade_sys/portfolio/build_in.h +15 -0
  744. hikyuu/include/hikyuu/trade_sys/portfolio/crt/PF_Simple.h +47 -0
  745. hikyuu/include/hikyuu/trade_sys/portfolio/crt/PF_WithoutAF.h +50 -0
  746. hikyuu/include/hikyuu/trade_sys/portfolio/crt/__init__.py +1 -0
  747. hikyuu/include/hikyuu/trade_sys/portfolio/imp/SimplePortfolio.h +53 -0
  748. hikyuu/include/hikyuu/trade_sys/portfolio/imp/WithoutAFPortfolio.h +57 -0
  749. hikyuu/include/hikyuu/trade_sys/portfolio/imp/__init__.py +1 -0
  750. hikyuu/include/hikyuu/trade_sys/profitgoal/ProfitGoalBase.h +189 -0
  751. hikyuu/include/hikyuu/trade_sys/profitgoal/__init__.py +1 -0
  752. hikyuu/include/hikyuu/trade_sys/profitgoal/build_in.h +16 -0
  753. hikyuu/include/hikyuu/trade_sys/profitgoal/crt/PG_FixedHoldDays.h +26 -0
  754. hikyuu/include/hikyuu/trade_sys/profitgoal/crt/PG_FixedPercent.h +25 -0
  755. hikyuu/include/hikyuu/trade_sys/profitgoal/crt/PG_NoGoal.h +24 -0
  756. hikyuu/include/hikyuu/trade_sys/profitgoal/crt/__init__.py +1 -0
  757. hikyuu/include/hikyuu/trade_sys/profitgoal/imp/FixedHoldDays.h +29 -0
  758. hikyuu/include/hikyuu/trade_sys/profitgoal/imp/FixedPercentProfitGoal.h +28 -0
  759. hikyuu/include/hikyuu/trade_sys/profitgoal/imp/NoGoalProfitGoal.h +27 -0
  760. hikyuu/include/hikyuu/trade_sys/profitgoal/imp/__init__.py +1 -0
  761. hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +245 -0
  762. hikyuu/include/hikyuu/trade_sys/selector/SystemWeight.h +70 -0
  763. hikyuu/include/hikyuu/trade_sys/selector/__init__.py +1 -0
  764. hikyuu/include/hikyuu/trade_sys/selector/build_in.h +18 -0
  765. hikyuu/include/hikyuu/trade_sys/selector/crt/SE_Fixed.h +38 -0
  766. hikyuu/include/hikyuu/trade_sys/selector/crt/SE_Logic.h +43 -0
  767. hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor.h +40 -0
  768. hikyuu/include/hikyuu/trade_sys/selector/crt/SE_Optimal.h +26 -0
  769. hikyuu/include/hikyuu/trade_sys/selector/crt/SE_Signal.h +30 -0
  770. hikyuu/include/hikyuu/trade_sys/selector/crt/__init__.py +1 -0
  771. hikyuu/include/hikyuu/trade_sys/selector/imp/FixedSelector.h +28 -0
  772. hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +59 -0
  773. hikyuu/include/hikyuu/trade_sys/selector/imp/SignalSelector.h +30 -0
  774. hikyuu/include/hikyuu/trade_sys/selector/imp/__init__.py +1 -0
  775. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorAddSelector.h +19 -0
  776. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorAddValueSelector.h +19 -0
  777. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorDivSelector.h +19 -0
  778. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorDivValueSelector.h +19 -0
  779. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorInvertDivValueSelector.h +19 -0
  780. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorInvertSubValueSelector.h +19 -0
  781. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorMulSelector.h +19 -0
  782. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorMulValueSelector.h +19 -0
  783. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorSelector.h +108 -0
  784. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorSubSelector.h +19 -0
  785. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorSubValueSelector.h +19 -0
  786. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorValueSelector.h +94 -0
  787. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/__init__.py +1 -0
  788. hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/MaxFundsOptimalSelector.h +27 -0
  789. hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/OptimalSelectorBase.h +86 -0
  790. hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/PerformanceOptimalSelector.h +42 -0
  791. hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/__init__.py +1 -0
  792. hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +289 -0
  793. hikyuu/include/hikyuu/trade_sys/signal/__init__.py +1 -0
  794. hikyuu/include/hikyuu/trade_sys/signal/build_in.h +24 -0
  795. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_AllwaysBuy.h +20 -0
  796. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Band.h +37 -0
  797. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Bool.h +29 -0
  798. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Cross.h +28 -0
  799. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_CrossGold.h +29 -0
  800. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Cycle.h +20 -0
  801. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Flex.h +29 -0
  802. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Logic.h +127 -0
  803. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Manual.h +20 -0
  804. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_OneSide.h +38 -0
  805. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Single.h +56 -0
  806. hikyuu/include/hikyuu/trade_sys/signal/crt/__init__.py +1 -0
  807. hikyuu/include/hikyuu/trade_sys/signal/imp/AllwaysBuySignal.h +25 -0
  808. hikyuu/include/hikyuu/trade_sys/signal/imp/BandSignal.h +46 -0
  809. hikyuu/include/hikyuu/trade_sys/signal/imp/BandSignal2.h +47 -0
  810. hikyuu/include/hikyuu/trade_sys/signal/imp/BoolSignal.h +46 -0
  811. hikyuu/include/hikyuu/trade_sys/signal/imp/CrossGoldSignal.h +46 -0
  812. hikyuu/include/hikyuu/trade_sys/signal/imp/CrossSignal.h +46 -0
  813. hikyuu/include/hikyuu/trade_sys/signal/imp/CycleSignal.h +25 -0
  814. hikyuu/include/hikyuu/trade_sys/signal/imp/ManualSignal.h +23 -0
  815. hikyuu/include/hikyuu/trade_sys/signal/imp/OneSideSignal.h +46 -0
  816. hikyuu/include/hikyuu/trade_sys/signal/imp/SingleSignal.h +45 -0
  817. hikyuu/include/hikyuu/trade_sys/signal/imp/SingleSignal2.h +45 -0
  818. hikyuu/include/hikyuu/trade_sys/signal/imp/__init__.py +1 -0
  819. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddSignal.h +19 -0
  820. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddValueSignal.h +19 -0
  821. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AndSignal.h +19 -0
  822. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivSignal.h +19 -0
  823. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivValueSignal.h +22 -0
  824. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulSignal.h +19 -0
  825. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulValueSignal.h +19 -0
  826. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorSignal.h +70 -0
  827. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorValueSignal.h +68 -0
  828. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OrSignal.h +19 -0
  829. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubSignal.h +19 -0
  830. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubValueSignal.h +22 -0
  831. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/__init__.py +1 -0
  832. hikyuu/include/hikyuu/trade_sys/slippage/SlippageBase.h +170 -0
  833. hikyuu/include/hikyuu/trade_sys/slippage/__init__.py +1 -0
  834. hikyuu/include/hikyuu/trade_sys/slippage/build_in.h +15 -0
  835. hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_FixedPercent.h +26 -0
  836. hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_FixedValue.h +26 -0
  837. hikyuu/include/hikyuu/trade_sys/slippage/crt/__init__.py +1 -0
  838. hikyuu/include/hikyuu/trade_sys/slippage/imp/FixedPercentSlippage.h +28 -0
  839. hikyuu/include/hikyuu/trade_sys/slippage/imp/FixedValueSlippage.h +28 -0
  840. hikyuu/include/hikyuu/trade_sys/slippage/imp/__init__.py +1 -0
  841. hikyuu/include/hikyuu/trade_sys/stoploss/StoplossBase.h +199 -0
  842. hikyuu/include/hikyuu/trade_sys/stoploss/__init__.py +1 -0
  843. hikyuu/include/hikyuu/trade_sys/stoploss/build_in.h +16 -0
  844. hikyuu/include/hikyuu/trade_sys/stoploss/crt/ST_FixedPercent.h +25 -0
  845. hikyuu/include/hikyuu/trade_sys/stoploss/crt/ST_Indicator.h +21 -0
  846. hikyuu/include/hikyuu/trade_sys/stoploss/crt/ST_Saftyloss.h +37 -0
  847. hikyuu/include/hikyuu/trade_sys/stoploss/crt/__init__.py +1 -0
  848. hikyuu/include/hikyuu/trade_sys/stoploss/imp/FixedPercentStoploss.h +30 -0
  849. hikyuu/include/hikyuu/trade_sys/stoploss/imp/IndicatorStoploss.h +49 -0
  850. hikyuu/include/hikyuu/trade_sys/stoploss/imp/__init__.py +1 -0
  851. hikyuu/include/hikyuu/trade_sys/system/System.h +639 -0
  852. hikyuu/include/hikyuu/trade_sys/system/SystemPart.h +54 -0
  853. hikyuu/include/hikyuu/trade_sys/system/TradeRequest.h +94 -0
  854. hikyuu/include/hikyuu/trade_sys/system/__init__.py +1 -0
  855. hikyuu/include/hikyuu/trade_sys/system/build_in.h +15 -0
  856. hikyuu/include/hikyuu/trade_sys/system/crt/SYS_Simple.h +50 -0
  857. hikyuu/include/hikyuu/trade_sys/system/crt/SYS_WalkForward.h +21 -0
  858. hikyuu/include/hikyuu/trade_sys/system/crt/__init__.py +1 -0
  859. hikyuu/include/hikyuu/trade_sys/system/imp/DelegateSystem.h +51 -0
  860. hikyuu/include/hikyuu/trade_sys/system/imp/WalkForwardSystem.h +70 -0
  861. hikyuu/include/hikyuu/trade_sys/system/imp/WalkForwardTradeManager.h +465 -0
  862. hikyuu/include/hikyuu/trade_sys/system/imp/__init__.py +1 -0
  863. hikyuu/include/hikyuu/utilities/ConnectPool.h +163 -0
  864. hikyuu/include/hikyuu/utilities/FilterNode.h +267 -0
  865. hikyuu/include/hikyuu/utilities/LRUCache11.h +230 -0
  866. hikyuu/include/hikyuu/utilities/Log.h +438 -0
  867. hikyuu/include/hikyuu/utilities/Null.h +176 -0
  868. hikyuu/include/hikyuu/utilities/Parameter.h +511 -0
  869. hikyuu/include/hikyuu/utilities/ResourcePool.h +636 -0
  870. hikyuu/include/hikyuu/utilities/SpendTimer.h +305 -0
  871. hikyuu/include/hikyuu/utilities/TimerManager.h +552 -0
  872. hikyuu/include/hikyuu/utilities/__init__.py +1 -0
  873. hikyuu/include/hikyuu/utilities/any_to_string.h +142 -0
  874. hikyuu/include/hikyuu/utilities/arithmetic.h +401 -0
  875. hikyuu/include/hikyuu/utilities/base64.h +52 -0
  876. hikyuu/include/hikyuu/utilities/config.h +41 -0
  877. hikyuu/include/hikyuu/utilities/cppdef.h +25 -0
  878. hikyuu/include/hikyuu/utilities/datetime/Datetime.h +439 -0
  879. hikyuu/include/hikyuu/utilities/datetime/TimeDelta.h +351 -0
  880. hikyuu/include/hikyuu/utilities/datetime/__init__.py +1 -0
  881. hikyuu/include/hikyuu/utilities/db_connect/AutoTransAction.h +124 -0
  882. hikyuu/include/hikyuu/utilities/db_connect/DBCondition.h +252 -0
  883. hikyuu/include/hikyuu/utilities/db_connect/DBConnect.h +30 -0
  884. hikyuu/include/hikyuu/utilities/db_connect/DBConnectBase.h +658 -0
  885. hikyuu/include/hikyuu/utilities/db_connect/DBUpgrade.h +28 -0
  886. hikyuu/include/hikyuu/utilities/db_connect/SQLException.h +62 -0
  887. hikyuu/include/hikyuu/utilities/db_connect/SQLResultSet.h +248 -0
  888. hikyuu/include/hikyuu/utilities/db_connect/SQLStatementBase.h +305 -0
  889. hikyuu/include/hikyuu/utilities/db_connect/TableMacro.h +2579 -0
  890. hikyuu/include/hikyuu/utilities/db_connect/__init__.py +1 -0
  891. hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLConnect.h +60 -0
  892. hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLStatement.h +88 -0
  893. hikyuu/include/hikyuu/utilities/db_connect/mysql/__init__.py +1 -0
  894. hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteConnect.h +89 -0
  895. hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteStatement.h +71 -0
  896. hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteUtil.h +80 -0
  897. hikyuu/include/hikyuu/utilities/db_connect/sqlite/__init__.py +1 -0
  898. hikyuu/include/hikyuu/utilities/exception.h +52 -0
  899. hikyuu/include/hikyuu/utilities/http_client/HttpClient.h +229 -0
  900. hikyuu/include/hikyuu/utilities/http_client/__init__.py +1 -0
  901. hikyuu/include/hikyuu/utilities/http_client/nng_wrap.h +517 -0
  902. hikyuu/include/hikyuu/utilities/http_client/url.h +25 -0
  903. hikyuu/include/hikyuu/utilities/ini_parser/IniParser.h +104 -0
  904. hikyuu/include/hikyuu/utilities/ini_parser/__init__.py +1 -0
  905. hikyuu/include/hikyuu/utilities/md5.h +41 -0
  906. hikyuu/include/hikyuu/utilities/mo/__init__.py +1 -0
  907. hikyuu/include/hikyuu/utilities/mo/mo.h +48 -0
  908. hikyuu/include/hikyuu/utilities/mo/moFileReader.h +836 -0
  909. hikyuu/include/hikyuu/utilities/node/NodeClient.h +175 -0
  910. hikyuu/include/hikyuu/utilities/node/NodeError.h +66 -0
  911. hikyuu/include/hikyuu/utilities/node/NodeMessage.h +80 -0
  912. hikyuu/include/hikyuu/utilities/node/NodeServer.h +246 -0
  913. hikyuu/include/hikyuu/utilities/node/__init__.py +1 -0
  914. hikyuu/include/hikyuu/utilities/os.h +102 -0
  915. hikyuu/include/hikyuu/utilities/osdef.h +159 -0
  916. hikyuu/include/hikyuu/utilities/plugin/PluginBase.h +47 -0
  917. hikyuu/include/hikyuu/utilities/plugin/PluginClient.h +55 -0
  918. hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +64 -0
  919. hikyuu/include/hikyuu/utilities/plugin/__init__.py +1 -0
  920. hikyuu/include/hikyuu/utilities/runtimeinfo.h +35 -0
  921. hikyuu/include/hikyuu/utilities/snowflake.h +110 -0
  922. hikyuu/include/hikyuu/utilities/string_view.h +70 -0
  923. hikyuu/include/hikyuu/utilities/thread/FuncWrapper.h +85 -0
  924. hikyuu/include/hikyuu/utilities/thread/InterruptFlag.h +30 -0
  925. hikyuu/include/hikyuu/utilities/thread/MQStealQueue.h +112 -0
  926. hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +315 -0
  927. hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +275 -0
  928. hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +309 -0
  929. hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +231 -0
  930. hikyuu/include/hikyuu/utilities/thread/ThreadSafeQueue.h +101 -0
  931. hikyuu/include/hikyuu/utilities/thread/WorkStealQueue.h +105 -0
  932. hikyuu/include/hikyuu/utilities/thread/__init__.py +1 -0
  933. hikyuu/include/hikyuu/utilities/thread/algorithm.h +116 -0
  934. hikyuu/include/hikyuu/utilities/thread/thread.h +10 -0
  935. hikyuu/include/hikyuu/version.h +24 -0
  936. hikyuu/indicator/__init__.py +29 -0
  937. hikyuu/indicator/indicator.py +159 -0
  938. hikyuu/indicator/pyind.py +47 -0
  939. hikyuu/indicator/talib_wrap.py +1273 -0
  940. hikyuu/interactive.py +68 -0
  941. hikyuu/plugin/libbacktest.dylib +0 -0
  942. hikyuu/plugin/libdevice.dylib +0 -0
  943. hikyuu/setup.py +104 -0
  944. hikyuu/shell/__init__.py +0 -0
  945. hikyuu/shell/cmdserver.py +126 -0
  946. hikyuu/shell/hkucmd.py +110 -0
  947. hikyuu/shell/hkushell.py +20 -0
  948. hikyuu/strategy/__init__.py +2 -0
  949. hikyuu/strategy/strategy_demo1.py +54 -0
  950. hikyuu/strategy/strategy_demo2.py +47 -0
  951. hikyuu/strategy/strategy_demo3.py +24 -0
  952. hikyuu/test/AllocateFunds.py +25 -0
  953. hikyuu/test/Condition.py +95 -0
  954. hikyuu/test/Datetime.py +61 -0
  955. hikyuu/test/Environment.py +88 -0
  956. hikyuu/test/Indicator.py +233 -0
  957. hikyuu/test/KData.py +64 -0
  958. hikyuu/test/MarketInfo.py +26 -0
  959. hikyuu/test/MoneyManager.py +88 -0
  960. hikyuu/test/Parameter.py +62 -0
  961. hikyuu/test/ProfitGoal.py +83 -0
  962. hikyuu/test/Signal.py +160 -0
  963. hikyuu/test/Slippage.py +88 -0
  964. hikyuu/test/Stock.py +127 -0
  965. hikyuu/test/StockTypeInfo.py +47 -0
  966. hikyuu/test/Stoploss.py +86 -0
  967. hikyuu/test/TradeCost.py +71 -0
  968. hikyuu/test/__init__.py +0 -0
  969. hikyuu/test/test.py +63 -0
  970. hikyuu/test/test_init.py +36 -0
  971. hikyuu/tools/__init__.py +1 -0
  972. hikyuu/tools/copy_file.py +16 -0
  973. hikyuu/tools/delete_index.py +50 -0
  974. hikyuu/tools/fenge.py +139 -0
  975. hikyuu/tools/h5_data_clear.py +163 -0
  976. hikyuu/tools/mysql_clear_last_day_data.py +61 -0
  977. hikyuu/tools/update_block_info.py +168 -0
  978. hikyuu/trade_manage/__init__.py +30 -0
  979. hikyuu/trade_manage/__init__.pyi +740 -0
  980. hikyuu/trade_manage/broker.py +95 -0
  981. hikyuu/trade_manage/broker.pyi +54 -0
  982. hikyuu/trade_manage/broker_easytrader.py +63 -0
  983. hikyuu/trade_manage/broker_easytrader.pyi +21 -0
  984. hikyuu/trade_manage/broker_mail.py +101 -0
  985. hikyuu/trade_manage/broker_mail.pyi +55 -0
  986. hikyuu/trade_manage/trade.py +111 -0
  987. hikyuu/trade_manage/trade.pyi +746 -0
  988. hikyuu/trade_sys/__init__.py +27 -0
  989. hikyuu/trade_sys/trade_sys.py +252 -0
  990. hikyuu/util/__init__.py +49 -0
  991. hikyuu/util/__init__.pyi +55 -0
  992. hikyuu/util/check.py +153 -0
  993. hikyuu/util/check.pyi +59 -0
  994. hikyuu/util/mylog.py +264 -0
  995. hikyuu/util/mylog.pyi +70 -0
  996. hikyuu/util/notebook.py +47 -0
  997. hikyuu/util/notebook.pyi +23 -0
  998. hikyuu/util/singleton.py +29 -0
  999. hikyuu/util/singleton.pyi +18 -0
  1000. hikyuu/util/slice.py +43 -0
  1001. hikyuu/util/slice.pyi +8 -0
  1002. hikyuu/util/timeout.py +83 -0
  1003. hikyuu-2.5.6.dist-info/LICENSE +201 -0
  1004. hikyuu-2.5.6.dist-info/METADATA +152 -0
  1005. hikyuu-2.5.6.dist-info/RECORD +1008 -0
  1006. hikyuu-2.5.6.dist-info/WHEEL +5 -0
  1007. hikyuu-2.5.6.dist-info/entry_points.txt +3 -0
  1008. hikyuu-2.5.6.dist-info/top_level.txt +119 -0
@@ -0,0 +1,2579 @@
1
+ /*
2
+ * TableMacro.h
3
+ *
4
+ * Copyright (c) 2019, hikyuu.org
5
+ *
6
+ * Created on: 2019-7-14
7
+ * Author: fasiondog
8
+ */
9
+ #pragma once
10
+ #ifndef HIKYUU_DB_CONNECT_TABLE_MACRO_H
11
+ #define HIKYUU_DB_CONNECT_TABLE_MACRO_H
12
+
13
+ #include "DBConnectBase.h"
14
+ #include "SQLStatementBase.h"
15
+
16
+ namespace hku {
17
+
18
+ #define TABLE_BIND0(TableT, table) \
19
+ public: \
20
+ TableT() = default; \
21
+ TableT(const TableT&) = default; \
22
+ TableT& operator=(const TableT&) = default; \
23
+ TableT(TableT&& rv) : m_id(rv.m_id) { \
24
+ rv.m_id = 0; \
25
+ } \
26
+ TableT& operator=(TableT&& rv) { \
27
+ if (this == &rv) \
28
+ return *this; \
29
+ m_id = rv.m_id; \
30
+ rv.m_id = 0; \
31
+ return *this; \
32
+ } \
33
+ \
34
+ private: \
35
+ uint64_t m_id = 0; \
36
+ \
37
+ public: \
38
+ bool valid() const { \
39
+ return m_id != 0; \
40
+ } \
41
+ uint64_t id() const { \
42
+ return m_id; \
43
+ } \
44
+ void id(uint64_t id) { \
45
+ m_id = id; \
46
+ } \
47
+ uint64_t rowid() const { \
48
+ return m_id; \
49
+ } \
50
+ void rowid(uint64_t id) { \
51
+ m_id = id; \
52
+ } \
53
+ static std::string getTableName() { \
54
+ return #table; \
55
+ } \
56
+ static const char* getSelectSQL() { \
57
+ return "select `id` from `" #table "`"; \
58
+ } \
59
+ void load(const SQLStatementPtr& st) { \
60
+ st->getColumn(0, m_id); \
61
+ }
62
+
63
+ #define TABLE_BIND1(TableT, table, f1) \
64
+ public: \
65
+ TableT() = default; \
66
+ TableT(const TableT&) = default; \
67
+ TableT& operator=(const TableT&) = default; \
68
+ TableT(TableT&& rv) : m_id(rv.m_id), f1(std::move(rv.f1)) { \
69
+ rv.m_id = 0; \
70
+ } \
71
+ TableT& operator=(TableT&& rv) { \
72
+ if (this == &rv) \
73
+ return *this; \
74
+ m_id = rv.m_id; \
75
+ f1 = std::move(rv.f1); \
76
+ rv.m_id = 0; \
77
+ return *this; \
78
+ } \
79
+ \
80
+ private: \
81
+ uint64_t m_id = 0; \
82
+ \
83
+ public: \
84
+ bool valid() const { \
85
+ return m_id != 0; \
86
+ } \
87
+ uint64_t id() const { \
88
+ return m_id; \
89
+ } \
90
+ void id(uint64_t id) { \
91
+ m_id = id; \
92
+ } \
93
+ uint64_t rowid() const { \
94
+ return m_id; \
95
+ } \
96
+ void rowid(uint64_t id) { \
97
+ m_id = id; \
98
+ } \
99
+ static std::string getTableName() { \
100
+ return #table; \
101
+ } \
102
+ static const char* getInsertSQL() { \
103
+ return "insert into `" #table "` (`" #f1 "`) values (?)"; \
104
+ } \
105
+ static const char* getUpdateSQL() { \
106
+ return "update `" #table "` set `" #f1 "`=? where `id`=?"; \
107
+ } \
108
+ static const char* getSelectSQL() { \
109
+ return "select `id`,`" #f1 "` from `" #table "`"; \
110
+ } \
111
+ void save(const SQLStatementPtr& st) const { \
112
+ st->bind(0, f1); \
113
+ } \
114
+ void update(const SQLStatementPtr& st) const { \
115
+ st->bind(0, f1, m_id); \
116
+ } \
117
+ void load(const SQLStatementPtr& st) { \
118
+ st->getColumn(0, m_id, f1); \
119
+ }
120
+
121
+ #define TABLE_BIND2(TableT, table, f1, f2) \
122
+ public: \
123
+ TableT() = default; \
124
+ TableT(const TableT&) = default; \
125
+ TableT& operator=(const TableT&) = default; \
126
+ TableT(TableT&& rv) : m_id(rv.m_id), f1(std::move(rv.f1)), f2(std::move(rv.f2)) { \
127
+ rv.m_id = 0; \
128
+ } \
129
+ TableT& operator=(TableT&& rv) { \
130
+ if (this == &rv) \
131
+ return *this; \
132
+ m_id = rv.m_id; \
133
+ rv.m_id = 0; \
134
+ f1 = std::move(rv.f1); \
135
+ f2 = std::move(rv.f2); \
136
+ return *this; \
137
+ } \
138
+ \
139
+ private: \
140
+ uint64_t m_id = 0; \
141
+ \
142
+ public: \
143
+ bool valid() const { \
144
+ return m_id != 0; \
145
+ } \
146
+ uint64_t id() const { \
147
+ return m_id; \
148
+ } \
149
+ void id(uint64_t id) { \
150
+ m_id = id; \
151
+ } \
152
+ uint64_t rowid() const { \
153
+ return m_id; \
154
+ } \
155
+ void rowid(uint64_t id) { \
156
+ m_id = id; \
157
+ } \
158
+ static std::string getTableName() { \
159
+ return #table; \
160
+ } \
161
+ static const char* getInsertSQL() { \
162
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`) values (?,?)"; \
163
+ } \
164
+ static const char* getUpdateSQL() { \
165
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=? where `id`=?"; \
166
+ } \
167
+ static const char* getSelectSQL() { \
168
+ return "select `id`,`" #f1 "`,`" #f2 "` from `" #table "`"; \
169
+ } \
170
+ void save(const SQLStatementPtr& st) const { \
171
+ st->bind(0, f1, f2); \
172
+ } \
173
+ void update(const SQLStatementPtr& st) const { \
174
+ st->bind(0, f1, f2, m_id); \
175
+ } \
176
+ void load(const SQLStatementPtr& st) { \
177
+ st->getColumn(0, m_id, f1, f2); \
178
+ }
179
+
180
+ #define TABLE_BIND3(TableT, table, f1, f2, f3) \
181
+ public: \
182
+ TableT() = default; \
183
+ TableT(const TableT&) = default; \
184
+ TableT& operator=(const TableT&) = default; \
185
+ TableT(TableT&& rv) \
186
+ : m_id(rv.m_id), f1(std::move(rv.f1)), f2(std::move(rv.f2)), f3(std::move(rv.f3)) { \
187
+ rv.m_id = 0; \
188
+ } \
189
+ TableT& operator=(TableT&& rv) { \
190
+ if (this == &rv) \
191
+ return *this; \
192
+ m_id = rv.m_id; \
193
+ f1 = std::move(rv.f1); \
194
+ f2 = std::move(rv.f2); \
195
+ f3 = std::move(rv.f3); \
196
+ rv.m_id = 0; \
197
+ return *this; \
198
+ } \
199
+ \
200
+ private: \
201
+ uint64_t m_id = 0; \
202
+ \
203
+ public: \
204
+ bool valid() const { \
205
+ return m_id != 0; \
206
+ } \
207
+ uint64_t id() const { \
208
+ return m_id; \
209
+ } \
210
+ void id(uint64_t id) { \
211
+ m_id = id; \
212
+ } \
213
+ uint64_t rowid() const { \
214
+ return m_id; \
215
+ } \
216
+ void rowid(uint64_t id) { \
217
+ m_id = id; \
218
+ } \
219
+ static std::string getTableName() { \
220
+ return #table; \
221
+ } \
222
+ static const char* getInsertSQL() { \
223
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`) values (?,?,?)"; \
224
+ } \
225
+ static const char* getUpdateSQL() { \
226
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=? where `id`=?"; \
227
+ } \
228
+ static const char* getSelectSQL() { \
229
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "` from `" #table "`"; \
230
+ } \
231
+ void save(const SQLStatementPtr& st) const { \
232
+ st->bind(0, f1, f2, f3); \
233
+ } \
234
+ void update(const SQLStatementPtr& st) const { \
235
+ st->bind(0, f1, f2, f3, m_id); \
236
+ } \
237
+ void load(const SQLStatementPtr& st) { \
238
+ st->getColumn(0, m_id, f1, f2, f3); \
239
+ }
240
+
241
+ #define TABLE_BIND4(TableT, table, f1, f2, f3, f4) \
242
+ public: \
243
+ TableT() = default; \
244
+ TableT(const TableT&) = default; \
245
+ TableT& operator=(const TableT&) = default; \
246
+ TableT(TableT&& rv) \
247
+ : m_id(rv.m_id), \
248
+ f1(std::move(rv.f1)), \
249
+ f2(std::move(rv.f2)), \
250
+ f3(std::move(rv.f3)), \
251
+ f4(std::move(rv.f4)) { \
252
+ rv.m_id = 0; \
253
+ } \
254
+ TableT& operator=(TableT&& rv) { \
255
+ if (this == &rv) \
256
+ return *this; \
257
+ m_id = rv.m_id; \
258
+ f1 = std::move(rv.f1); \
259
+ f2 = std::move(rv.f2); \
260
+ f3 = std::move(rv.f3); \
261
+ f4 = std::move(rv.f4); \
262
+ rv.m_id = 0; \
263
+ return *this; \
264
+ } \
265
+ \
266
+ private: \
267
+ uint64_t m_id = 0; \
268
+ \
269
+ public: \
270
+ bool valid() const { \
271
+ return m_id != 0; \
272
+ } \
273
+ uint64_t id() const { \
274
+ return m_id; \
275
+ } \
276
+ void id(uint64_t id) { \
277
+ m_id = id; \
278
+ } \
279
+ uint64_t rowid() const { \
280
+ return m_id; \
281
+ } \
282
+ void rowid(uint64_t id) { \
283
+ m_id = id; \
284
+ } \
285
+ static std::string getTableName() { \
286
+ return #table; \
287
+ } \
288
+ static const char* getInsertSQL() { \
289
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 \
290
+ "`) values (?,?,?,?)"; \
291
+ } \
292
+ static const char* getUpdateSQL() { \
293
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 \
294
+ "`=? where `id`=?"; \
295
+ } \
296
+ static const char* getSelectSQL() { \
297
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "` from `" #table "`"; \
298
+ } \
299
+ void save(const SQLStatementPtr& st) const { \
300
+ st->bind(0, f1, f2, f3, f4); \
301
+ } \
302
+ void update(const SQLStatementPtr& st) const { \
303
+ st->bind(0, f1, f2, f3, f4, m_id); \
304
+ } \
305
+ void load(const SQLStatementPtr& st) { \
306
+ st->getColumn(0, m_id, f1, f2, f3, f4); \
307
+ }
308
+
309
+ #define TABLE_BIND5(TableT, table, f1, f2, f3, f4, f5) \
310
+ public: \
311
+ TableT() = default; \
312
+ TableT(const TableT&) = default; \
313
+ TableT& operator=(const TableT&) = default; \
314
+ TableT(TableT&& rv) \
315
+ : m_id(rv.m_id), \
316
+ f1(std::move(rv.f1)), \
317
+ f2(std::move(rv.f2)), \
318
+ f3(std::move(rv.f3)), \
319
+ f4(std::move(rv.f4)), \
320
+ f5(std::move(rv.f5)) { \
321
+ rv.m_id = 0; \
322
+ } \
323
+ TableT& operator=(TableT&& rv) { \
324
+ if (this == &rv) \
325
+ return *this; \
326
+ m_id = rv.m_id; \
327
+ f1 = std::move(rv.f1); \
328
+ f2 = std::move(rv.f2); \
329
+ f3 = std::move(rv.f3); \
330
+ f4 = std::move(rv.f4); \
331
+ f5 = std::move(rv.f5); \
332
+ rv.m_id = 0; \
333
+ return *this; \
334
+ } \
335
+ \
336
+ private: \
337
+ uint64_t m_id = 0; \
338
+ \
339
+ public: \
340
+ bool valid() const { \
341
+ return m_id != 0; \
342
+ } \
343
+ uint64_t id() const { \
344
+ return m_id; \
345
+ } \
346
+ void id(uint64_t id) { \
347
+ m_id = id; \
348
+ } \
349
+ uint64_t rowid() const { \
350
+ return m_id; \
351
+ } \
352
+ void rowid(uint64_t id) { \
353
+ m_id = id; \
354
+ } \
355
+ static std::string getTableName() { \
356
+ return #table; \
357
+ } \
358
+ static const char* getInsertSQL() { \
359
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 \
360
+ "`) values (?,?,?,?,?)"; \
361
+ } \
362
+ static const char* getUpdateSQL() { \
363
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
364
+ "`=? where `id`=?"; \
365
+ } \
366
+ static const char* getSelectSQL() { \
367
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "` from `" #table "`"; \
368
+ } \
369
+ void save(const SQLStatementPtr& st) const { \
370
+ st->bind(0, f1, f2, f3, f4, f5); \
371
+ } \
372
+ void update(const SQLStatementPtr& st) const { \
373
+ st->bind(0, f1, f2, f3, f4, f5, m_id); \
374
+ } \
375
+ void load(const SQLStatementPtr& st) { \
376
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5); \
377
+ }
378
+
379
+ #define TABLE_BIND6(TableT, table, f1, f2, f3, f4, f5, f6) \
380
+ public: \
381
+ TableT() = default; \
382
+ TableT(const TableT&) = default; \
383
+ TableT& operator=(const TableT&) = default; \
384
+ TableT(TableT&& rv) \
385
+ : m_id(rv.m_id), \
386
+ f1(std::move(rv.f1)), \
387
+ f2(std::move(rv.f2)), \
388
+ f3(std::move(rv.f3)), \
389
+ f4(std::move(rv.f4)), \
390
+ f5(std::move(rv.f5)), \
391
+ f6(std::move(rv.f6)) { \
392
+ rv.m_id = 0; \
393
+ } \
394
+ TableT& operator=(TableT&& rv) { \
395
+ if (this == &rv) \
396
+ return *this; \
397
+ m_id = rv.m_id; \
398
+ f1 = std::move(rv.f1); \
399
+ f2 = std::move(rv.f2); \
400
+ f3 = std::move(rv.f3); \
401
+ f4 = std::move(rv.f4); \
402
+ f5 = std::move(rv.f5); \
403
+ f6 = std::move(rv.f6); \
404
+ rv.m_id = 0; \
405
+ return *this; \
406
+ } \
407
+ \
408
+ private: \
409
+ uint64_t m_id = 0; \
410
+ \
411
+ public: \
412
+ bool valid() const { \
413
+ return m_id != 0; \
414
+ } \
415
+ uint64_t id() const { \
416
+ return m_id; \
417
+ } \
418
+ void id(uint64_t id) { \
419
+ m_id = id; \
420
+ } \
421
+ uint64_t rowid() const { \
422
+ return m_id; \
423
+ } \
424
+ void rowid(uint64_t id) { \
425
+ m_id = id; \
426
+ } \
427
+ static std::string getTableName() { \
428
+ return #table; \
429
+ } \
430
+ static const char* getInsertSQL() { \
431
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
432
+ "`) values (?,?,?,?,?,?)"; \
433
+ } \
434
+ static const char* getUpdateSQL() { \
435
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
436
+ "`=?,`" #f6 "`=? where `id`=?"; \
437
+ } \
438
+ static const char* getSelectSQL() { \
439
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
440
+ "` from `" #table "`"; \
441
+ } \
442
+ void save(const SQLStatementPtr& st) const { \
443
+ st->bind(0, f1, f2, f3, f4, f5, f6); \
444
+ } \
445
+ void update(const SQLStatementPtr& st) const { \
446
+ st->bind(0, f1, f2, f3, f4, f5, f6, m_id); \
447
+ } \
448
+ void load(const SQLStatementPtr& st) { \
449
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6); \
450
+ }
451
+
452
+ #define TABLE_BIND7(TableT, table, f1, f2, f3, f4, f5, f6, f7) \
453
+ public: \
454
+ TableT() = default; \
455
+ TableT(const TableT&) = default; \
456
+ TableT& operator=(const TableT&) = default; \
457
+ TableT(TableT&& rv) \
458
+ : m_id(rv.m_id), \
459
+ f1(std::move(rv.f1)), \
460
+ f2(std::move(rv.f2)), \
461
+ f3(std::move(rv.f3)), \
462
+ f4(std::move(rv.f4)), \
463
+ f5(std::move(rv.f5)), \
464
+ f6(std::move(rv.f6)), \
465
+ f7(std::move(rv.f7)) { \
466
+ rv.m_id = 0; \
467
+ } \
468
+ TableT& operator=(TableT&& rv) { \
469
+ if (this == &rv) \
470
+ return *this; \
471
+ m_id = rv.m_id; \
472
+ f1 = std::move(rv.f1); \
473
+ f2 = std::move(rv.f2); \
474
+ f3 = std::move(rv.f3); \
475
+ f4 = std::move(rv.f4); \
476
+ f5 = std::move(rv.f5); \
477
+ f6 = std::move(rv.f6); \
478
+ f7 = std::move(rv.f7); \
479
+ rv.m_id = 0; \
480
+ return *this; \
481
+ } \
482
+ \
483
+ private: \
484
+ uint64_t m_id = 0; \
485
+ \
486
+ public: \
487
+ bool valid() const { \
488
+ return m_id != 0; \
489
+ } \
490
+ uint64_t id() const { \
491
+ return m_id; \
492
+ } \
493
+ void id(uint64_t id) { \
494
+ m_id = id; \
495
+ } \
496
+ uint64_t rowid() const { \
497
+ return m_id; \
498
+ } \
499
+ void rowid(uint64_t id) { \
500
+ m_id = id; \
501
+ } \
502
+ static std::string getTableName() { \
503
+ return #table; \
504
+ } \
505
+ static const char* getInsertSQL() { \
506
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
507
+ "`,`" #f7 "`) values (?,?,?,?,?,?,?)"; \
508
+ } \
509
+ static const char* getUpdateSQL() { \
510
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
511
+ "`=?,`" #f6 "`=?,`" #f7 "`=? where `id`=?"; \
512
+ } \
513
+ static const char* getSelectSQL() { \
514
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
515
+ "` from `" #table "`"; \
516
+ } \
517
+ void save(const SQLStatementPtr& st) const { \
518
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7); \
519
+ } \
520
+ void update(const SQLStatementPtr& st) const { \
521
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, m_id); \
522
+ } \
523
+ void load(const SQLStatementPtr& st) { \
524
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7); \
525
+ }
526
+
527
+ #define TABLE_BIND8(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8) \
528
+ public: \
529
+ TableT() = default; \
530
+ TableT(const TableT&) = default; \
531
+ TableT& operator=(const TableT&) = default; \
532
+ TableT(TableT&& rv) \
533
+ : m_id(rv.m_id), \
534
+ f1(std::move(rv.f1)), \
535
+ f2(std::move(rv.f2)), \
536
+ f3(std::move(rv.f3)), \
537
+ f4(std::move(rv.f4)), \
538
+ f5(std::move(rv.f5)), \
539
+ f6(std::move(rv.f6)), \
540
+ f7(std::move(rv.f7)), \
541
+ f8(std::move(rv.f8)) { \
542
+ rv.m_id = 0; \
543
+ } \
544
+ TableT& operator=(TableT&& rv) { \
545
+ if (this == &rv) \
546
+ return *this; \
547
+ m_id = rv.m_id; \
548
+ f1 = std::move(rv.f1); \
549
+ f2 = std::move(rv.f2); \
550
+ f3 = std::move(rv.f3); \
551
+ f4 = std::move(rv.f4); \
552
+ f5 = std::move(rv.f5); \
553
+ f6 = std::move(rv.f6); \
554
+ f7 = std::move(rv.f7); \
555
+ f8 = std::move(rv.f8); \
556
+ rv.m_id = 0; \
557
+ return *this; \
558
+ } \
559
+ \
560
+ private: \
561
+ uint64_t m_id = 0; \
562
+ \
563
+ public: \
564
+ bool valid() const { \
565
+ return m_id != 0; \
566
+ } \
567
+ uint64_t id() const { \
568
+ return m_id; \
569
+ } \
570
+ void id(uint64_t id) { \
571
+ m_id = id; \
572
+ } \
573
+ uint64_t rowid() const { \
574
+ return m_id; \
575
+ } \
576
+ void rowid(uint64_t id) { \
577
+ m_id = id; \
578
+ } \
579
+ static std::string getTableName() { \
580
+ return #table; \
581
+ } \
582
+ static const char* getInsertSQL() { \
583
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
584
+ "`,`" #f7 "`,`" #f8 "`) values (?,?,?,?,?,?,?,?)"; \
585
+ } \
586
+ static const char* getUpdateSQL() { \
587
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
588
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=? where `id`=?"; \
589
+ } \
590
+ static const char* getSelectSQL() { \
591
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
592
+ "`,`" #f8 "` from `" #table "`"; \
593
+ } \
594
+ void save(const SQLStatementPtr& st) const { \
595
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8); \
596
+ } \
597
+ void update(const SQLStatementPtr& st) const { \
598
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, m_id); \
599
+ } \
600
+ void load(const SQLStatementPtr& st) { \
601
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8); \
602
+ }
603
+
604
+ #define TABLE_BIND9(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
605
+ public: \
606
+ TableT() = default; \
607
+ TableT(const TableT&) = default; \
608
+ TableT& operator=(const TableT&) = default; \
609
+ TableT(TableT&& rv) \
610
+ : m_id(rv.m_id), \
611
+ f1(std::move(rv.f1)), \
612
+ f2(std::move(rv.f2)), \
613
+ f3(std::move(rv.f3)), \
614
+ f4(std::move(rv.f4)), \
615
+ f5(std::move(rv.f5)), \
616
+ f6(std::move(rv.f6)), \
617
+ f7(std::move(rv.f7)), \
618
+ f8(std::move(rv.f8)), \
619
+ f9(std::move(rv.f9)) { \
620
+ rv.m_id = 0; \
621
+ } \
622
+ TableT& operator=(TableT&& rv) { \
623
+ if (this == &rv) \
624
+ return *this; \
625
+ m_id = rv.m_id; \
626
+ f1 = std::move(rv.f1); \
627
+ f2 = std::move(rv.f2); \
628
+ f3 = std::move(rv.f3); \
629
+ f4 = std::move(rv.f4); \
630
+ f5 = std::move(rv.f5); \
631
+ f6 = std::move(rv.f6); \
632
+ f7 = std::move(rv.f7); \
633
+ f8 = std::move(rv.f8); \
634
+ f9 = std::move(rv.f9); \
635
+ rv.m_id = 0; \
636
+ return *this; \
637
+ } \
638
+ \
639
+ private: \
640
+ uint64_t m_id = 0; \
641
+ \
642
+ public: \
643
+ bool valid() const { \
644
+ return m_id != 0; \
645
+ } \
646
+ uint64_t id() const { \
647
+ return m_id; \
648
+ } \
649
+ void id(uint64_t id) { \
650
+ m_id = id; \
651
+ } \
652
+ uint64_t rowid() const { \
653
+ return m_id; \
654
+ } \
655
+ void rowid(uint64_t id) { \
656
+ m_id = id; \
657
+ } \
658
+ static std::string getTableName() { \
659
+ return #table; \
660
+ } \
661
+ static const char* getInsertSQL() { \
662
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
663
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`) values (?,?,?,?,?,?,?,?,?)"; \
664
+ } \
665
+ static const char* getUpdateSQL() { \
666
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
667
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=? where `id`=?"; \
668
+ } \
669
+ static const char* getSelectSQL() { \
670
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
671
+ "`,`" #f8 "`,`" #f9 "` from `" #table "`"; \
672
+ } \
673
+ void save(const SQLStatementPtr& st) const { \
674
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9); \
675
+ } \
676
+ void update(const SQLStatementPtr& st) const { \
677
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, m_id); \
678
+ } \
679
+ void load(const SQLStatementPtr& st) { \
680
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9); \
681
+ }
682
+
683
+ #define TABLE_BIND10(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \
684
+ public: \
685
+ TableT() = default; \
686
+ TableT(const TableT&) = default; \
687
+ TableT& operator=(const TableT&) = default; \
688
+ TableT(TableT&& rv) \
689
+ : m_id(rv.m_id), \
690
+ f1(std::move(rv.f1)), \
691
+ f2(std::move(rv.f2)), \
692
+ f3(std::move(rv.f3)), \
693
+ f4(std::move(rv.f4)), \
694
+ f5(std::move(rv.f5)), \
695
+ f6(std::move(rv.f6)), \
696
+ f7(std::move(rv.f7)), \
697
+ f8(std::move(rv.f8)), \
698
+ f9(std::move(rv.f9)), \
699
+ f10(std::move(rv.f10)) { \
700
+ rv.m_id = 0; \
701
+ } \
702
+ TableT& operator=(TableT&& rv) { \
703
+ if (this == &rv) \
704
+ return *this; \
705
+ m_id = rv.m_id; \
706
+ f1 = std::move(rv.f1); \
707
+ f2 = std::move(rv.f2); \
708
+ f3 = std::move(rv.f3); \
709
+ f4 = std::move(rv.f4); \
710
+ f5 = std::move(rv.f5); \
711
+ f6 = std::move(rv.f6); \
712
+ f7 = std::move(rv.f7); \
713
+ f8 = std::move(rv.f8); \
714
+ f9 = std::move(rv.f9); \
715
+ f10 = std::move(rv.f10); \
716
+ rv.m_id = 0; \
717
+ return *this; \
718
+ } \
719
+ \
720
+ private: \
721
+ uint64_t m_id = 0; \
722
+ \
723
+ public: \
724
+ bool valid() const { \
725
+ return m_id != 0; \
726
+ } \
727
+ uint64_t id() const { \
728
+ return m_id; \
729
+ } \
730
+ void id(uint64_t id) { \
731
+ m_id = id; \
732
+ } \
733
+ uint64_t rowid() const { \
734
+ return m_id; \
735
+ } \
736
+ void rowid(uint64_t id) { \
737
+ m_id = id; \
738
+ } \
739
+ static std::string getTableName() { \
740
+ return #table; \
741
+ } \
742
+ static const char* getInsertSQL() { \
743
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
744
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`) values (?,?,?,?,?,?,?,?,?,?)"; \
745
+ } \
746
+ static const char* getUpdateSQL() { \
747
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
748
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=? where `id`=?"; \
749
+ } \
750
+ static const char* getSelectSQL() { \
751
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
752
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "` from `" #table "`"; \
753
+ } \
754
+ void save(const SQLStatementPtr& st) const { \
755
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10); \
756
+ } \
757
+ void update(const SQLStatementPtr& st) const { \
758
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, m_id); \
759
+ } \
760
+ void load(const SQLStatementPtr& st) { \
761
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10); \
762
+ }
763
+
764
+ #define TABLE_BIND11(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11) \
765
+ public: \
766
+ TableT() = default; \
767
+ TableT(const TableT&) = default; \
768
+ TableT& operator=(const TableT&) = default; \
769
+ TableT(TableT&& rv) \
770
+ : m_id(rv.m_id), \
771
+ f1(std::move(rv.f1)), \
772
+ f2(std::move(rv.f2)), \
773
+ f3(std::move(rv.f3)), \
774
+ f4(std::move(rv.f4)), \
775
+ f5(std::move(rv.f5)), \
776
+ f6(std::move(rv.f6)), \
777
+ f7(std::move(rv.f7)), \
778
+ f8(std::move(rv.f8)), \
779
+ f9(std::move(rv.f9)), \
780
+ f10(std::move(rv.f10)), \
781
+ f11(std::move(rv.f11)) { \
782
+ rv.m_id = 0; \
783
+ } \
784
+ TableT& operator=(TableT&& rv) { \
785
+ if (this == &rv) \
786
+ return *this; \
787
+ m_id = rv.m_id; \
788
+ f1 = std::move(rv.f1); \
789
+ f2 = std::move(rv.f2); \
790
+ f3 = std::move(rv.f3); \
791
+ f4 = std::move(rv.f4); \
792
+ f5 = std::move(rv.f5); \
793
+ f6 = std::move(rv.f6); \
794
+ f7 = std::move(rv.f7); \
795
+ f8 = std::move(rv.f8); \
796
+ f9 = std::move(rv.f9); \
797
+ f10 = std::move(rv.f10); \
798
+ f11 = std::move(rv.f11); \
799
+ rv.m_id = 0; \
800
+ return *this; \
801
+ } \
802
+ \
803
+ private: \
804
+ uint64_t m_id = 0; \
805
+ \
806
+ public: \
807
+ bool valid() const { \
808
+ return m_id != 0; \
809
+ } \
810
+ uint64_t id() const { \
811
+ return m_id; \
812
+ } \
813
+ void id(uint64_t id) { \
814
+ m_id = id; \
815
+ } \
816
+ uint64_t rowid() const { \
817
+ return m_id; \
818
+ } \
819
+ void rowid(uint64_t id) { \
820
+ m_id = id; \
821
+ } \
822
+ static std::string getTableName() { \
823
+ return #table; \
824
+ } \
825
+ static const char* getInsertSQL() { \
826
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
827
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 \
828
+ "`) values (?,?,?,?,?,?,?,?,?,?,?)"; \
829
+ } \
830
+ static const char* getUpdateSQL() { \
831
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
832
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
833
+ "`=? where `id`=?"; \
834
+ } \
835
+ static const char* getSelectSQL() { \
836
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
837
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "` from `" #table "`"; \
838
+ } \
839
+ void save(const SQLStatementPtr& st) const { \
840
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11); \
841
+ } \
842
+ void update(const SQLStatementPtr& st) const { \
843
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, m_id); \
844
+ } \
845
+ void load(const SQLStatementPtr& st) { \
846
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11); \
847
+ }
848
+
849
+ #define TABLE_BIND12(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12) \
850
+ public: \
851
+ TableT() = default; \
852
+ TableT(const TableT&) = default; \
853
+ TableT& operator=(const TableT&) = default; \
854
+ TableT(TableT&& rv) \
855
+ : m_id(rv.m_id), \
856
+ f1(std::move(rv.f1)), \
857
+ f2(std::move(rv.f2)), \
858
+ f3(std::move(rv.f3)), \
859
+ f4(std::move(rv.f4)), \
860
+ f5(std::move(rv.f5)), \
861
+ f6(std::move(rv.f6)), \
862
+ f7(std::move(rv.f7)), \
863
+ f8(std::move(rv.f8)), \
864
+ f9(std::move(rv.f9)), \
865
+ f10(std::move(rv.f10)), \
866
+ f11(std::move(rv.f11)), \
867
+ f12(std::move(rv.f12)) { \
868
+ rv.m_id = 0; \
869
+ } \
870
+ TableT& operator=(TableT&& rv) { \
871
+ if (this == &rv) \
872
+ return *this; \
873
+ m_id = rv.m_id; \
874
+ f1 = std::move(rv.f1); \
875
+ f2 = std::move(rv.f2); \
876
+ f3 = std::move(rv.f3); \
877
+ f4 = std::move(rv.f4); \
878
+ f5 = std::move(rv.f5); \
879
+ f6 = std::move(rv.f6); \
880
+ f7 = std::move(rv.f7); \
881
+ f8 = std::move(rv.f8); \
882
+ f9 = std::move(rv.f9); \
883
+ f10 = std::move(rv.f10); \
884
+ f11 = std::move(rv.f11); \
885
+ f12 = std::move(rv.f12); \
886
+ rv.m_id = 0; \
887
+ return *this; \
888
+ } \
889
+ \
890
+ private: \
891
+ uint64_t m_id = 0; \
892
+ \
893
+ public: \
894
+ bool valid() const { \
895
+ return m_id != 0; \
896
+ } \
897
+ uint64_t id() const { \
898
+ return m_id; \
899
+ } \
900
+ void id(uint64_t id) { \
901
+ m_id = id; \
902
+ } \
903
+ uint64_t rowid() const { \
904
+ return m_id; \
905
+ } \
906
+ void rowid(uint64_t id) { \
907
+ m_id = id; \
908
+ } \
909
+ static std::string getTableName() { \
910
+ return #table; \
911
+ } \
912
+ static const char* getInsertSQL() { \
913
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
914
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 \
915
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?)"; \
916
+ } \
917
+ static const char* getUpdateSQL() { \
918
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
919
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
920
+ "`=?,`" #f12 "`=? where `id`=?"; \
921
+ } \
922
+ static const char* getSelectSQL() { \
923
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
924
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "` from `" #table "`"; \
925
+ } \
926
+ void save(const SQLStatementPtr& st) const { \
927
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12); \
928
+ } \
929
+ void update(const SQLStatementPtr& st) const { \
930
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, m_id); \
931
+ } \
932
+ void load(const SQLStatementPtr& st) { \
933
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12); \
934
+ }
935
+
936
+ #define TABLE_BIND13(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13) \
937
+ public: \
938
+ TableT() = default; \
939
+ TableT(const TableT&) = default; \
940
+ TableT& operator=(const TableT&) = default; \
941
+ TableT(TableT&& rv) \
942
+ : m_id(rv.m_id), \
943
+ f1(std::move(rv.f1)), \
944
+ f2(std::move(rv.f2)), \
945
+ f3(std::move(rv.f3)), \
946
+ f4(std::move(rv.f4)), \
947
+ f5(std::move(rv.f5)), \
948
+ f6(std::move(rv.f6)), \
949
+ f7(std::move(rv.f7)), \
950
+ f8(std::move(rv.f8)), \
951
+ f9(std::move(rv.f9)), \
952
+ f10(std::move(rv.f10)), \
953
+ f11(std::move(rv.f11)), \
954
+ f12(std::move(rv.f12)), \
955
+ f13(std::move(rv.f13)) { \
956
+ rv.m_id = 0; \
957
+ } \
958
+ TableT& operator=(TableT&& rv) { \
959
+ if (this == &rv) \
960
+ return *this; \
961
+ m_id = rv.m_id; \
962
+ f1 = std::move(rv.f1); \
963
+ f2 = std::move(rv.f2); \
964
+ f3 = std::move(rv.f3); \
965
+ f4 = std::move(rv.f4); \
966
+ f5 = std::move(rv.f5); \
967
+ f6 = std::move(rv.f6); \
968
+ f7 = std::move(rv.f7); \
969
+ f8 = std::move(rv.f8); \
970
+ f9 = std::move(rv.f9); \
971
+ f10 = std::move(rv.f10); \
972
+ f11 = std::move(rv.f11); \
973
+ f12 = std::move(rv.f12); \
974
+ f13 = std::move(rv.f13); \
975
+ rv.m_id = 0; \
976
+ return *this; \
977
+ } \
978
+ \
979
+ private: \
980
+ uint64_t m_id = 0; \
981
+ \
982
+ public: \
983
+ bool valid() const { \
984
+ return m_id != 0; \
985
+ } \
986
+ uint64_t id() const { \
987
+ return m_id; \
988
+ } \
989
+ void id(uint64_t id) { \
990
+ m_id = id; \
991
+ } \
992
+ uint64_t rowid() const { \
993
+ return m_id; \
994
+ } \
995
+ void rowid(uint64_t id) { \
996
+ m_id = id; \
997
+ } \
998
+ static std::string getTableName() { \
999
+ return #table; \
1000
+ } \
1001
+ static const char* getInsertSQL() { \
1002
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
1003
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
1004
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
1005
+ } \
1006
+ static const char* getUpdateSQL() { \
1007
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1008
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
1009
+ "`=?,`" #f12 "`=?,`" #f13 "`=? where `id`=?"; \
1010
+ } \
1011
+ static const char* getSelectSQL() { \
1012
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
1013
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "` from `" #table \
1014
+ "`"; \
1015
+ } \
1016
+ void save(const SQLStatementPtr& st) const { \
1017
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13); \
1018
+ } \
1019
+ void update(const SQLStatementPtr& st) const { \
1020
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, m_id); \
1021
+ } \
1022
+ void load(const SQLStatementPtr& st) { \
1023
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13); \
1024
+ }
1025
+
1026
+ #define TABLE_BIND14(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14) \
1027
+ public: \
1028
+ TableT() = default; \
1029
+ TableT(const TableT&) = default; \
1030
+ TableT& operator=(const TableT&) = default; \
1031
+ TableT(TableT&& rv) \
1032
+ : m_id(rv.m_id), \
1033
+ f1(std::move(rv.f1)), \
1034
+ f2(std::move(rv.f2)), \
1035
+ f3(std::move(rv.f3)), \
1036
+ f4(std::move(rv.f4)), \
1037
+ f5(std::move(rv.f5)), \
1038
+ f6(std::move(rv.f6)), \
1039
+ f7(std::move(rv.f7)), \
1040
+ f8(std::move(rv.f8)), \
1041
+ f9(std::move(rv.f9)), \
1042
+ f10(std::move(rv.f10)), \
1043
+ f11(std::move(rv.f11)), \
1044
+ f12(std::move(rv.f12)), \
1045
+ f13(std::move(rv.f13)), \
1046
+ f14(std::move(rv.f14)) { \
1047
+ rv.m_id = 0; \
1048
+ } \
1049
+ TableT& operator=(TableT&& rv) { \
1050
+ if (this == &rv) \
1051
+ return *this; \
1052
+ m_id = rv.m_id; \
1053
+ f1 = std::move(rv.f1); \
1054
+ f2 = std::move(rv.f2); \
1055
+ f3 = std::move(rv.f3); \
1056
+ f4 = std::move(rv.f4); \
1057
+ f5 = std::move(rv.f5); \
1058
+ f6 = std::move(rv.f6); \
1059
+ f7 = std::move(rv.f7); \
1060
+ f8 = std::move(rv.f8); \
1061
+ f9 = std::move(rv.f9); \
1062
+ f10 = std::move(rv.f10); \
1063
+ f11 = std::move(rv.f11); \
1064
+ f12 = std::move(rv.f12); \
1065
+ f13 = std::move(rv.f13); \
1066
+ f14 = std::move(rv.f14); \
1067
+ rv.m_id = 0; \
1068
+ return *this; \
1069
+ } \
1070
+ \
1071
+ private: \
1072
+ uint64_t m_id = 0; \
1073
+ \
1074
+ public: \
1075
+ bool valid() const { \
1076
+ return m_id != 0; \
1077
+ } \
1078
+ uint64_t id() const { \
1079
+ return m_id; \
1080
+ } \
1081
+ void id(uint64_t id) { \
1082
+ m_id = id; \
1083
+ } \
1084
+ uint64_t rowid() const { \
1085
+ return m_id; \
1086
+ } \
1087
+ void rowid(uint64_t id) { \
1088
+ m_id = id; \
1089
+ } \
1090
+ static std::string getTableName() { \
1091
+ return #table; \
1092
+ } \
1093
+ static const char* getInsertSQL() { \
1094
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
1095
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
1096
+ "`,`" #f14 "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
1097
+ } \
1098
+ static const char* getUpdateSQL() { \
1099
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1100
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
1101
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=? where `id`=?"; \
1102
+ } \
1103
+ static const char* getSelectSQL() { \
1104
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
1105
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
1106
+ "` from `" #table "`"; \
1107
+ } \
1108
+ void save(const SQLStatementPtr& st) const { \
1109
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14); \
1110
+ } \
1111
+ void update(const SQLStatementPtr& st) const { \
1112
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, m_id); \
1113
+ } \
1114
+ void load(const SQLStatementPtr& st) { \
1115
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14); \
1116
+ }
1117
+
1118
+ #define TABLE_BIND15(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, \
1119
+ f15) \
1120
+ public: \
1121
+ TableT() = default; \
1122
+ TableT(const TableT&) = default; \
1123
+ TableT& operator=(const TableT&) = default; \
1124
+ TableT(TableT&& rv) \
1125
+ : m_id(rv.m_id), \
1126
+ f1(std::move(rv.f1)), \
1127
+ f2(std::move(rv.f2)), \
1128
+ f3(std::move(rv.f3)), \
1129
+ f4(std::move(rv.f4)), \
1130
+ f5(std::move(rv.f5)), \
1131
+ f6(std::move(rv.f6)), \
1132
+ f7(std::move(rv.f7)), \
1133
+ f8(std::move(rv.f8)), \
1134
+ f9(std::move(rv.f9)), \
1135
+ f10(std::move(rv.f10)), \
1136
+ f11(std::move(rv.f11)), \
1137
+ f12(std::move(rv.f12)), \
1138
+ f13(std::move(rv.f13)), \
1139
+ f14(std::move(rv.f14)), \
1140
+ f15(std::move(rv.f15)) { \
1141
+ rv.m_id = 0; \
1142
+ } \
1143
+ TableT& operator=(TableT&& rv) { \
1144
+ if (this == &rv) \
1145
+ return *this; \
1146
+ m_id = rv.m_id; \
1147
+ f1 = std::move(rv.f1); \
1148
+ f2 = std::move(rv.f2); \
1149
+ f3 = std::move(rv.f3); \
1150
+ f4 = std::move(rv.f4); \
1151
+ f5 = std::move(rv.f5); \
1152
+ f6 = std::move(rv.f6); \
1153
+ f7 = std::move(rv.f7); \
1154
+ f8 = std::move(rv.f8); \
1155
+ f9 = std::move(rv.f9); \
1156
+ f10 = std::move(rv.f10); \
1157
+ f11 = std::move(rv.f11); \
1158
+ f12 = std::move(rv.f12); \
1159
+ f13 = std::move(rv.f13); \
1160
+ f14 = std::move(rv.f14); \
1161
+ f15 = std::move(rv.f15); \
1162
+ rv.m_id = 0; \
1163
+ return *this; \
1164
+ } \
1165
+ \
1166
+ private: \
1167
+ uint64_t m_id = 0; \
1168
+ \
1169
+ public: \
1170
+ bool valid() const { \
1171
+ return m_id != 0; \
1172
+ } \
1173
+ uint64_t id() const { \
1174
+ return m_id; \
1175
+ } \
1176
+ void id(uint64_t id) { \
1177
+ m_id = id; \
1178
+ } \
1179
+ uint64_t rowid() const { \
1180
+ return m_id; \
1181
+ } \
1182
+ void rowid(uint64_t id) { \
1183
+ m_id = id; \
1184
+ } \
1185
+ static std::string getTableName() { \
1186
+ return #table; \
1187
+ } \
1188
+ static const char* getInsertSQL() { \
1189
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
1190
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
1191
+ "`,`" #f14 "`,`" #f15 "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
1192
+ } \
1193
+ static const char* getUpdateSQL() { \
1194
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1195
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
1196
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=? where `id`=?"; \
1197
+ } \
1198
+ static const char* getSelectSQL() { \
1199
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
1200
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
1201
+ "`,`" #f15 "` from `" #table "`"; \
1202
+ } \
1203
+ void save(const SQLStatementPtr& st) const { \
1204
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15); \
1205
+ } \
1206
+ void update(const SQLStatementPtr& st) const { \
1207
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, m_id); \
1208
+ } \
1209
+ void load(const SQLStatementPtr& st) { \
1210
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15); \
1211
+ }
1212
+
1213
+ #define TABLE_BIND16(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, \
1214
+ f15, f16) \
1215
+ public: \
1216
+ TableT() = default; \
1217
+ TableT(const TableT&) = default; \
1218
+ TableT& operator=(const TableT&) = default; \
1219
+ TableT(TableT&& rv) \
1220
+ : m_id(rv.m_id), \
1221
+ f1(std::move(rv.f1)), \
1222
+ f2(std::move(rv.f2)), \
1223
+ f3(std::move(rv.f3)), \
1224
+ f4(std::move(rv.f4)), \
1225
+ f5(std::move(rv.f5)), \
1226
+ f6(std::move(rv.f6)), \
1227
+ f7(std::move(rv.f7)), \
1228
+ f8(std::move(rv.f8)), \
1229
+ f9(std::move(rv.f9)), \
1230
+ f10(std::move(rv.f10)), \
1231
+ f11(std::move(rv.f11)), \
1232
+ f12(std::move(rv.f12)), \
1233
+ f13(std::move(rv.f13)), \
1234
+ f14(std::move(rv.f14)), \
1235
+ f15(std::move(rv.f15)), \
1236
+ f16(std::move(rv.f16)) { \
1237
+ rv.m_id = 0; \
1238
+ } \
1239
+ TableT& operator=(TableT&& rv) { \
1240
+ if (this == &rv) \
1241
+ return *this; \
1242
+ m_id = rv.m_id; \
1243
+ f1 = std::move(rv.f1); \
1244
+ f2 = std::move(rv.f2); \
1245
+ f3 = std::move(rv.f3); \
1246
+ f4 = std::move(rv.f4); \
1247
+ f5 = std::move(rv.f5); \
1248
+ f6 = std::move(rv.f6); \
1249
+ f7 = std::move(rv.f7); \
1250
+ f8 = std::move(rv.f8); \
1251
+ f9 = std::move(rv.f9); \
1252
+ f10 = std::move(rv.f10); \
1253
+ f11 = std::move(rv.f11); \
1254
+ f12 = std::move(rv.f12); \
1255
+ f13 = std::move(rv.f13); \
1256
+ f14 = std::move(rv.f14); \
1257
+ f15 = std::move(rv.f15); \
1258
+ f16 = std::move(rv.f16); \
1259
+ rv.m_id = 0; \
1260
+ return *this; \
1261
+ } \
1262
+ \
1263
+ private: \
1264
+ uint64_t m_id = 0; \
1265
+ \
1266
+ public: \
1267
+ bool valid() const { \
1268
+ return m_id != 0; \
1269
+ } \
1270
+ uint64_t id() const { \
1271
+ return m_id; \
1272
+ } \
1273
+ void id(uint64_t id) { \
1274
+ m_id = id; \
1275
+ } \
1276
+ uint64_t rowid() const { \
1277
+ return m_id; \
1278
+ } \
1279
+ void rowid(uint64_t id) { \
1280
+ m_id = id; \
1281
+ } \
1282
+ static std::string getTableName() { \
1283
+ return #table; \
1284
+ } \
1285
+ static const char* getInsertSQL() { \
1286
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
1287
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
1288
+ "`,`" #f14 "`,`" #f15 "`,`" #f16 "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
1289
+ } \
1290
+ static const char* getUpdateSQL() { \
1291
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1292
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
1293
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=?,`" #f16 \
1294
+ "`=? where `id`=?"; \
1295
+ } \
1296
+ static const char* getSelectSQL() { \
1297
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
1298
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
1299
+ "`,`" #f15 "`,`" #f16 "` from `" #table "`"; \
1300
+ } \
1301
+ void save(const SQLStatementPtr& st) const { \
1302
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16); \
1303
+ } \
1304
+ void update(const SQLStatementPtr& st) const { \
1305
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, m_id); \
1306
+ } \
1307
+ void load(const SQLStatementPtr& st) { \
1308
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, \
1309
+ f16); \
1310
+ }
1311
+
1312
+ #define TABLE_BIND17(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, \
1313
+ f15, f16, f17) \
1314
+ public: \
1315
+ TableT() = default; \
1316
+ TableT(const TableT&) = default; \
1317
+ TableT& operator=(const TableT&) = default; \
1318
+ TableT(TableT&& rv) \
1319
+ : m_id(rv.m_id), \
1320
+ f1(std::move(rv.f1)), \
1321
+ f2(std::move(rv.f2)), \
1322
+ f3(std::move(rv.f3)), \
1323
+ f4(std::move(rv.f4)), \
1324
+ f5(std::move(rv.f5)), \
1325
+ f6(std::move(rv.f6)), \
1326
+ f7(std::move(rv.f7)), \
1327
+ f8(std::move(rv.f8)), \
1328
+ f9(std::move(rv.f9)), \
1329
+ f10(std::move(rv.f10)), \
1330
+ f11(std::move(rv.f11)), \
1331
+ f12(std::move(rv.f12)), \
1332
+ f13(std::move(rv.f13)), \
1333
+ f14(std::move(rv.f14)), \
1334
+ f15(std::move(rv.f15)), \
1335
+ f16(std::move(rv.f16)), \
1336
+ f17(std::move(rv.f17)) { \
1337
+ rv.m_id = 0; \
1338
+ } \
1339
+ TableT& operator=(TableT&& rv) { \
1340
+ if (this == &rv) \
1341
+ return *this; \
1342
+ m_id = rv.m_id; \
1343
+ f1 = std::move(rv.f1); \
1344
+ f2 = std::move(rv.f2); \
1345
+ f3 = std::move(rv.f3); \
1346
+ f4 = std::move(rv.f4); \
1347
+ f5 = std::move(rv.f5); \
1348
+ f6 = std::move(rv.f6); \
1349
+ f7 = std::move(rv.f7); \
1350
+ f8 = std::move(rv.f8); \
1351
+ f9 = std::move(rv.f9); \
1352
+ f10 = std::move(rv.f10); \
1353
+ f11 = std::move(rv.f11); \
1354
+ f12 = std::move(rv.f12); \
1355
+ f13 = std::move(rv.f13); \
1356
+ f14 = std::move(rv.f14); \
1357
+ f15 = std::move(rv.f15); \
1358
+ f16 = std::move(rv.f16); \
1359
+ f17 = std::move(rv.f17); \
1360
+ rv.m_id = 0; \
1361
+ return *this; \
1362
+ } \
1363
+ \
1364
+ private: \
1365
+ uint64_t m_id = 0; \
1366
+ \
1367
+ public: \
1368
+ bool valid() const { \
1369
+ return m_id != 0; \
1370
+ } \
1371
+ uint64_t id() const { \
1372
+ return m_id; \
1373
+ } \
1374
+ void id(uint64_t id) { \
1375
+ m_id = id; \
1376
+ } \
1377
+ uint64_t rowid() const { \
1378
+ return m_id; \
1379
+ } \
1380
+ void rowid(uint64_t id) { \
1381
+ m_id = id; \
1382
+ } \
1383
+ static std::string getTableName() { \
1384
+ return #table; \
1385
+ } \
1386
+ static const char* getInsertSQL() { \
1387
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
1388
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
1389
+ "`,`" #f14 "`,`" #f15 "`,`" #f16 "`,`" #f17 \
1390
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
1391
+ } \
1392
+ static const char* getUpdateSQL() { \
1393
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1394
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
1395
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=?,`" #f16 "`=?,`" #f17 \
1396
+ "`=? where `id`=?"; \
1397
+ } \
1398
+ static const char* getSelectSQL() { \
1399
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
1400
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
1401
+ "`,`" #f15 "`,`" #f16 "`,`" #f17 "` from `" #table "`"; \
1402
+ } \
1403
+ void save(const SQLStatementPtr& st) const { \
1404
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17); \
1405
+ } \
1406
+ void update(const SQLStatementPtr& st) const { \
1407
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
1408
+ m_id); \
1409
+ } \
1410
+ void load(const SQLStatementPtr& st) { \
1411
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, \
1412
+ f16, f17); \
1413
+ }
1414
+
1415
+ #define TABLE_BIND18(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, \
1416
+ f15, f16, f17, f18) \
1417
+ public: \
1418
+ TableT() = default; \
1419
+ TableT(const TableT&) = default; \
1420
+ TableT& operator=(const TableT&) = default; \
1421
+ TableT(TableT&& rv) \
1422
+ : m_id(rv.m_id), \
1423
+ f1(std::move(rv.f1)), \
1424
+ f2(std::move(rv.f2)), \
1425
+ f3(std::move(rv.f3)), \
1426
+ f4(std::move(rv.f4)), \
1427
+ f5(std::move(rv.f5)), \
1428
+ f6(std::move(rv.f6)), \
1429
+ f7(std::move(rv.f7)), \
1430
+ f8(std::move(rv.f8)), \
1431
+ f9(std::move(rv.f9)), \
1432
+ f10(std::move(rv.f10)), \
1433
+ f11(std::move(rv.f11)), \
1434
+ f12(std::move(rv.f12)), \
1435
+ f13(std::move(rv.f13)), \
1436
+ f14(std::move(rv.f14)), \
1437
+ f15(std::move(rv.f15)), \
1438
+ f16(std::move(rv.f16)), \
1439
+ f17(std::move(rv.f17)), \
1440
+ f18(std::move(rv.f18)) { \
1441
+ rv.m_id = 0; \
1442
+ } \
1443
+ TableT& operator=(TableT&& rv) { \
1444
+ if (this == &rv) \
1445
+ return *this; \
1446
+ m_id = rv.m_id; \
1447
+ f1 = std::move(rv.f1); \
1448
+ f2 = std::move(rv.f2); \
1449
+ f3 = std::move(rv.f3); \
1450
+ f4 = std::move(rv.f4); \
1451
+ f5 = std::move(rv.f5); \
1452
+ f6 = std::move(rv.f6); \
1453
+ f7 = std::move(rv.f7); \
1454
+ f8 = std::move(rv.f8); \
1455
+ f9 = std::move(rv.f9); \
1456
+ f10 = std::move(rv.f10); \
1457
+ f11 = std::move(rv.f11); \
1458
+ f12 = std::move(rv.f12); \
1459
+ f13 = std::move(rv.f13); \
1460
+ f14 = std::move(rv.f14); \
1461
+ f15 = std::move(rv.f15); \
1462
+ f16 = std::move(rv.f16); \
1463
+ f17 = std::move(rv.f17); \
1464
+ f18 = std::move(rv.f18); \
1465
+ rv.m_id = 0; \
1466
+ return *this; \
1467
+ } \
1468
+ \
1469
+ private: \
1470
+ uint64_t m_id = 0; \
1471
+ \
1472
+ public: \
1473
+ bool valid() const { \
1474
+ return m_id != 0; \
1475
+ } \
1476
+ uint64_t id() const { \
1477
+ return m_id; \
1478
+ } \
1479
+ void id(uint64_t id) { \
1480
+ m_id = id; \
1481
+ } \
1482
+ uint64_t rowid() const { \
1483
+ return m_id; \
1484
+ } \
1485
+ void rowid(uint64_t id) { \
1486
+ m_id = id; \
1487
+ } \
1488
+ static std::string getTableName() { \
1489
+ return #table; \
1490
+ } \
1491
+ static const char* getInsertSQL() { \
1492
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
1493
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
1494
+ "`,`" #f14 "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 \
1495
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
1496
+ } \
1497
+ static const char* getUpdateSQL() { \
1498
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1499
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
1500
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=?,`" #f16 "`=?,`" #f17 \
1501
+ "`=?,`" #f18 "`=? where `id`=?"; \
1502
+ } \
1503
+ static const char* getSelectSQL() { \
1504
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
1505
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
1506
+ "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 "` from `" #table "`"; \
1507
+ } \
1508
+ void save(const SQLStatementPtr& st) const { \
1509
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
1510
+ f18); \
1511
+ } \
1512
+ void update(const SQLStatementPtr& st) const { \
1513
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
1514
+ f18, m_id); \
1515
+ } \
1516
+ void load(const SQLStatementPtr& st) { \
1517
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, \
1518
+ f16, f17, f18); \
1519
+ }
1520
+
1521
+ #define TABLE_BIND19(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, \
1522
+ f15, f16, f17, f18, f19) \
1523
+ public: \
1524
+ TableT() = default; \
1525
+ TableT(const TableT&) = default; \
1526
+ TableT& operator=(const TableT&) = default; \
1527
+ TableT(TableT&& rv) \
1528
+ : m_id(rv.m_id), \
1529
+ f1(std::move(rv.f1)), \
1530
+ f2(std::move(rv.f2)), \
1531
+ f3(std::move(rv.f3)), \
1532
+ f4(std::move(rv.f4)), \
1533
+ f5(std::move(rv.f5)), \
1534
+ f6(std::move(rv.f6)), \
1535
+ f7(std::move(rv.f7)), \
1536
+ f8(std::move(rv.f8)), \
1537
+ f9(std::move(rv.f9)), \
1538
+ f10(std::move(rv.f10)), \
1539
+ f11(std::move(rv.f11)), \
1540
+ f12(std::move(rv.f12)), \
1541
+ f13(std::move(rv.f13)), \
1542
+ f14(std::move(rv.f14)), \
1543
+ f15(std::move(rv.f15)), \
1544
+ f16(std::move(rv.f16)), \
1545
+ f17(std::move(rv.f17)), \
1546
+ f18(std::move(rv.f18)), \
1547
+ f19(std::move(rv.f19)) { \
1548
+ rv.m_id = 0; \
1549
+ } \
1550
+ TableT& operator=(TableT&& rv) { \
1551
+ if (this == &rv) \
1552
+ return *this; \
1553
+ m_id = rv.m_id; \
1554
+ f1 = std::move(rv.f1); \
1555
+ f2 = std::move(rv.f2); \
1556
+ f3 = std::move(rv.f3); \
1557
+ f4 = std::move(rv.f4); \
1558
+ f5 = std::move(rv.f5); \
1559
+ f6 = std::move(rv.f6); \
1560
+ f7 = std::move(rv.f7); \
1561
+ f8 = std::move(rv.f8); \
1562
+ f9 = std::move(rv.f9); \
1563
+ f10 = std::move(rv.f10); \
1564
+ f11 = std::move(rv.f11); \
1565
+ f12 = std::move(rv.f12); \
1566
+ f13 = std::move(rv.f13); \
1567
+ f14 = std::move(rv.f14); \
1568
+ f15 = std::move(rv.f15); \
1569
+ f16 = std::move(rv.f16); \
1570
+ f17 = std::move(rv.f17); \
1571
+ f18 = std::move(rv.f18); \
1572
+ f19 = std::move(rv.f19); \
1573
+ rv.m_id = 0; \
1574
+ return *this; \
1575
+ } \
1576
+ \
1577
+ private: \
1578
+ uint64_t m_id = 0; \
1579
+ \
1580
+ public: \
1581
+ bool valid() const { \
1582
+ return m_id != 0; \
1583
+ } \
1584
+ uint64_t id() const { \
1585
+ return m_id; \
1586
+ } \
1587
+ void id(uint64_t id) { \
1588
+ m_id = id; \
1589
+ } \
1590
+ uint64_t rowid() const { \
1591
+ return m_id; \
1592
+ } \
1593
+ void rowid(uint64_t id) { \
1594
+ m_id = id; \
1595
+ } \
1596
+ static std::string getTableName() { \
1597
+ return #table; \
1598
+ } \
1599
+ static const char* getInsertSQL() { \
1600
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
1601
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
1602
+ "`,`" #f14 "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 "`,`" #f19 \
1603
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
1604
+ } \
1605
+ static const char* getUpdateSQL() { \
1606
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1607
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
1608
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=?,`" #f16 "`=?,`" #f17 \
1609
+ "`=?,`" #f18 "`=?,`" #f19 "`=? where `id`=?"; \
1610
+ } \
1611
+ static const char* getSelectSQL() { \
1612
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
1613
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
1614
+ "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 "`,`" #f19 "` from `" #table "`"; \
1615
+ } \
1616
+ void save(const SQLStatementPtr& st) const { \
1617
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
1618
+ f18, f19); \
1619
+ } \
1620
+ void update(const SQLStatementPtr& st) const { \
1621
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
1622
+ f18, f19, m_id); \
1623
+ } \
1624
+ void load(const SQLStatementPtr& st) { \
1625
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, \
1626
+ f16, f17, f18, f19); \
1627
+ }
1628
+
1629
+ #define TABLE_BIND20(TableT, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, \
1630
+ f15, f16, f17, f18, f19, f20) \
1631
+ public: \
1632
+ TableT() = default; \
1633
+ TableT(const TableT&) = default; \
1634
+ TableT& operator=(const TableT&) = default; \
1635
+ TableT(TableT&& rv) \
1636
+ : m_id(rv.m_id), \
1637
+ f1(std::move(rv.f1)), \
1638
+ f2(std::move(rv.f2)), \
1639
+ f3(std::move(rv.f3)), \
1640
+ f4(std::move(rv.f4)), \
1641
+ f5(std::move(rv.f5)), \
1642
+ f6(std::move(rv.f6)), \
1643
+ f7(std::move(rv.f7)), \
1644
+ f8(std::move(rv.f8)), \
1645
+ f9(std::move(rv.f9)), \
1646
+ f10(std::move(rv.f10)), \
1647
+ f11(std::move(rv.f11)), \
1648
+ f12(std::move(rv.f12)), \
1649
+ f13(std::move(rv.f13)), \
1650
+ f14(std::move(rv.f14)), \
1651
+ f15(std::move(rv.f15)), \
1652
+ f16(std::move(rv.f16)), \
1653
+ f17(std::move(rv.f17)), \
1654
+ f18(std::move(rv.f18)), \
1655
+ f19(std::move(rv.f19)), \
1656
+ f20(std::move(rv.f20)) { \
1657
+ rv.m_id = 0; \
1658
+ } \
1659
+ TableT& operator=(TableT&& rv) { \
1660
+ if (this == &rv) \
1661
+ return *this; \
1662
+ m_id = rv.m_id; \
1663
+ f1 = std::move(rv.f1); \
1664
+ f2 = std::move(rv.f2); \
1665
+ f3 = std::move(rv.f3); \
1666
+ f4 = std::move(rv.f4); \
1667
+ f5 = std::move(rv.f5); \
1668
+ f6 = std::move(rv.f6); \
1669
+ f7 = std::move(rv.f7); \
1670
+ f8 = std::move(rv.f8); \
1671
+ f9 = std::move(rv.f9); \
1672
+ f10 = std::move(rv.f10); \
1673
+ f11 = std::move(rv.f11); \
1674
+ f12 = std::move(rv.f12); \
1675
+ f13 = std::move(rv.f13); \
1676
+ f14 = std::move(rv.f14); \
1677
+ f15 = std::move(rv.f15); \
1678
+ f16 = std::move(rv.f16); \
1679
+ f17 = std::move(rv.f17); \
1680
+ f18 = std::move(rv.f18); \
1681
+ f19 = std::move(rv.f19); \
1682
+ f20 = std::move(rv.f20); \
1683
+ rv.m_id = 0; \
1684
+ return *this; \
1685
+ } \
1686
+ \
1687
+ private: \
1688
+ uint64_t m_id = 0; \
1689
+ \
1690
+ public: \
1691
+ bool valid() const { \
1692
+ return m_id != 0; \
1693
+ } \
1694
+ uint64_t id() const { \
1695
+ return m_id; \
1696
+ } \
1697
+ void id(uint64_t id) { \
1698
+ m_id = id; \
1699
+ } \
1700
+ uint64_t rowid() const { \
1701
+ return m_id; \
1702
+ } \
1703
+ void rowid(uint64_t id) { \
1704
+ m_id = id; \
1705
+ } \
1706
+ static std::string getTableName() { \
1707
+ return #table; \
1708
+ } \
1709
+ static const char* getInsertSQL() { \
1710
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
1711
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
1712
+ "`,`" #f14 "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 "`,`" #f19 "`,`" #f20 \
1713
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
1714
+ } \
1715
+ static const char* getUpdateSQL() { \
1716
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1717
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
1718
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=?,`" #f16 "`=?,`" #f17 \
1719
+ "`=?,`" #f18 "`=?,`" #f19 "`=?,`" #f20 "`=? where `id`=?"; \
1720
+ } \
1721
+ static const char* getSelectSQL() { \
1722
+ return "select `id`,`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
1723
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
1724
+ "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 "`,`" #f19 "`,`" #f20 "` from `" #table \
1725
+ "`"; \
1726
+ } \
1727
+ void save(const SQLStatementPtr& st) const { \
1728
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
1729
+ f18, f19, f20); \
1730
+ } \
1731
+ void update(const SQLStatementPtr& st) const { \
1732
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
1733
+ f18, f19, f20, m_id); \
1734
+ } \
1735
+ void load(const SQLStatementPtr& st) { \
1736
+ st->getColumn(0, m_id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, \
1737
+ f16, f17, f18, f19, f20); \
1738
+ }
1739
+
1740
+ //-------------------------------------------------------------------
1741
+ //
1742
+ // 不带自增ID的表绑定
1743
+ // ROWID:由于 MYSQL 和 SQLITE 语法不一样,需明确指定
1744
+ // MYSQL: _rowid
1745
+ // sqlite: rowid
1746
+ //
1747
+ //-------------------------------------------------------------------
1748
+
1749
+ #define TABLE_NO_AUTOID_BIND1(ROWID, table, f1) \
1750
+ private: \
1751
+ uint64_t m_rowid = 0; \
1752
+ \
1753
+ public: \
1754
+ bool valid() const { \
1755
+ return m_rowid != 0; \
1756
+ } \
1757
+ uint64_t rowid() const { \
1758
+ return m_rowid; \
1759
+ } \
1760
+ void rowid(uint64_t id) { \
1761
+ m_rowid = id; \
1762
+ } \
1763
+ static std::string getTableName() { \
1764
+ return #table; \
1765
+ } \
1766
+ static const char* getInsertSQL() { \
1767
+ return "insert into `" #table "` (`" #f1 "`) values (?)"; \
1768
+ } \
1769
+ static const char* getUpdateSQL() { \
1770
+ return "update `" #table "` set `" #f1 "`=? where `" #ROWID "`=?"; \
1771
+ } \
1772
+ static const char* getSelectSQL() { \
1773
+ return "select `" #f1 "` from `" #table "`"; \
1774
+ } \
1775
+ void save(const SQLStatementPtr& st) const { \
1776
+ st->bind(0, f1); \
1777
+ } \
1778
+ void update(const SQLStatementPtr& st) const { \
1779
+ st->bind(0, f1, m_rowid); \
1780
+ } \
1781
+ void load(const SQLStatementPtr& st) { \
1782
+ st->getColumn(0, f1); \
1783
+ }
1784
+
1785
+ #define TABLE_NO_AUTOID_BIND2(ROWID, table, f1, f2) \
1786
+ private: \
1787
+ uint64_t m_rowid = 0; \
1788
+ \
1789
+ public: \
1790
+ bool valid() const { \
1791
+ return m_rowid != 0; \
1792
+ } \
1793
+ uint64_t rowid() const { \
1794
+ return m_rowid; \
1795
+ } \
1796
+ void rowid(uint64_t id) { \
1797
+ m_rowid = id; \
1798
+ } \
1799
+ static std::string getTableName() { \
1800
+ return #table; \
1801
+ } \
1802
+ static const char* getInsertSQL() { \
1803
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`) values (?,?)"; \
1804
+ } \
1805
+ static const char* getUpdateSQL() { \
1806
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=? where `" #ROWID "`=?"; \
1807
+ } \
1808
+ static const char* getSelectSQL() { \
1809
+ return "select `" #f1 "`,`" #f2 "` from `" #table "`"; \
1810
+ } \
1811
+ void save(const SQLStatementPtr& st) const { \
1812
+ st->bind(0, f1, f2); \
1813
+ } \
1814
+ void update(const SQLStatementPtr& st) const { \
1815
+ st->bind(0, f1, f2, m_rowid); \
1816
+ } \
1817
+ void load(const SQLStatementPtr& st) { \
1818
+ st->getColumn(0, f1, f2); \
1819
+ }
1820
+
1821
+ #define TABLE_NO_AUTOID_BIND3(ROWID, table, f1, f2, f3) \
1822
+ private: \
1823
+ uint64_t m_rowid = 0; \
1824
+ \
1825
+ public: \
1826
+ bool valid() const { \
1827
+ return m_rowid != 0; \
1828
+ } \
1829
+ uint64_t rowid() const { \
1830
+ return m_rowid; \
1831
+ } \
1832
+ void rowid(uint64_t id) { \
1833
+ m_rowid = id; \
1834
+ } \
1835
+ static std::string getTableName() { \
1836
+ return #table; \
1837
+ } \
1838
+ static const char* getInsertSQL() { \
1839
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`) values (?,?,?)"; \
1840
+ } \
1841
+ static const char* getUpdateSQL() { \
1842
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=? where `" #ROWID "`=?"; \
1843
+ } \
1844
+ static const char* getSelectSQL() { \
1845
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "` from `" #table "`"; \
1846
+ } \
1847
+ void save(const SQLStatementPtr& st) const { \
1848
+ st->bind(0, f1, f2, f3); \
1849
+ } \
1850
+ void update(const SQLStatementPtr& st) const { \
1851
+ st->bind(0, f1, f2, f3, m_rowid); \
1852
+ } \
1853
+ void load(const SQLStatementPtr& st) { \
1854
+ st->getColumn(0, f1, f2, f3); \
1855
+ }
1856
+
1857
+ #define TABLE_NO_AUTOID_BIND4(ROWID, table, f1, f2, f3, f4) \
1858
+ private: \
1859
+ uint64_t m_rowid = 0; \
1860
+ \
1861
+ public: \
1862
+ bool valid() const { \
1863
+ return m_rowid != 0; \
1864
+ } \
1865
+ uint64_t rowid() const { \
1866
+ return m_rowid; \
1867
+ } \
1868
+ void rowid(uint64_t id) { \
1869
+ m_rowid = id; \
1870
+ } \
1871
+ static std::string getTableName() { \
1872
+ return #table; \
1873
+ } \
1874
+ static const char* getInsertSQL() { \
1875
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 \
1876
+ "`) values (?,?,?,?)"; \
1877
+ } \
1878
+ static const char* getUpdateSQL() { \
1879
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 \
1880
+ "`=? where `" #ROWID "`=?"; \
1881
+ } \
1882
+ static const char* getSelectSQL() { \
1883
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "` from `" #table "`"; \
1884
+ } \
1885
+ void save(const SQLStatementPtr& st) const { \
1886
+ st->bind(0, f1, f2, f3, f4); \
1887
+ } \
1888
+ void update(const SQLStatementPtr& st) const { \
1889
+ st->bind(0, f1, f2, f3, m_rowid); \
1890
+ } \
1891
+ void load(const SQLStatementPtr& st) { \
1892
+ st->getColumn(0, f1, f2, f3); \
1893
+ }
1894
+
1895
+ #define TABLE_NO_AUTOID_BIND5(ROWID, table, f1, f2, f3, f4, f5) \
1896
+ private: \
1897
+ uint64_t m_rowid = 0; \
1898
+ \
1899
+ public: \
1900
+ bool valid() const { \
1901
+ return m_rowid != 0; \
1902
+ } \
1903
+ uint64_t rowid() const { \
1904
+ return m_rowid; \
1905
+ } \
1906
+ void rowid(uint64_t id) { \
1907
+ m_rowid = id; \
1908
+ } \
1909
+ static std::string getTableName() { \
1910
+ return #table; \
1911
+ } \
1912
+ static const char* getInsertSQL() { \
1913
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 \
1914
+ "`) values (?,?,?,?,?)"; \
1915
+ } \
1916
+ static const char* getUpdateSQL() { \
1917
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1918
+ "`=? where `" #ROWID "`=?"; \
1919
+ } \
1920
+ static const char* getSelectSQL() { \
1921
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "` from `" #table "`"; \
1922
+ } \
1923
+ void save(const SQLStatementPtr& st) const { \
1924
+ st->bind(0, f1, f2, f3, f4, f5); \
1925
+ } \
1926
+ void update(const SQLStatementPtr& st) const { \
1927
+ st->bind(0, f1, f2, f3, f4, f5, m_rowid); \
1928
+ } \
1929
+ void load(const SQLStatementPtr& st) { \
1930
+ st->getColumn(0, f1, f2, f3, f4, f5); \
1931
+ }
1932
+
1933
+ #define TABLE_NO_AUTOID_BIND6(ROWID, table, f1, f2, f3, f4, f5, f6) \
1934
+ private: \
1935
+ uint64_t m_rowid = 0; \
1936
+ \
1937
+ public: \
1938
+ bool valid() const { \
1939
+ return m_rowid != 0; \
1940
+ } \
1941
+ uint64_t rowid() const { \
1942
+ return m_rowid; \
1943
+ } \
1944
+ void rowid(uint64_t id) { \
1945
+ m_rowid = id; \
1946
+ } \
1947
+ static std::string getTableName() { \
1948
+ return #table; \
1949
+ } \
1950
+ static const char* getInsertSQL() { \
1951
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
1952
+ "`) values (?,?,?,?,?,?)"; \
1953
+ } \
1954
+ static const char* getUpdateSQL() { \
1955
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1956
+ "`=?,`" #f6 "`=? where `" #ROWID "`=?"; \
1957
+ } \
1958
+ static const char* getSelectSQL() { \
1959
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "` from `" #table \
1960
+ "`"; \
1961
+ } \
1962
+ void save(const SQLStatementPtr& st) const { \
1963
+ st->bind(0, f1, f2, f3, f4, f5, f6); \
1964
+ } \
1965
+ void update(const SQLStatementPtr& st) const { \
1966
+ st->bind(0, f1, f2, f3, f4, f5, f6, m_rowid); \
1967
+ } \
1968
+ void load(const SQLStatementPtr& st) { \
1969
+ st->getColumn(0, f1, f2, f3, f4, f5, f6); \
1970
+ }
1971
+
1972
+ #define TABLE_NO_AUTOID_BIND7(ROWID, table, f1, f2, f3, f4, f5, f6, f7) \
1973
+ private: \
1974
+ uint64_t m_rowid = 0; \
1975
+ \
1976
+ public: \
1977
+ bool valid() const { \
1978
+ return m_rowid != 0; \
1979
+ } \
1980
+ uint64_t rowid() const { \
1981
+ return m_rowid; \
1982
+ } \
1983
+ void rowid(uint64_t id) { \
1984
+ m_rowid = id; \
1985
+ } \
1986
+ static std::string getTableName() { \
1987
+ return #table; \
1988
+ } \
1989
+ static const char* getInsertSQL() { \
1990
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
1991
+ "`,`" #f7 "`) values (?,?,?,?,?,?,?)"; \
1992
+ } \
1993
+ static const char* getUpdateSQL() { \
1994
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
1995
+ "`=?,`" #f6 "`=?,`" #f7 "`=? where `" #ROWID "`=?"; \
1996
+ } \
1997
+ static const char* getSelectSQL() { \
1998
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
1999
+ "` from `" #table "`"; \
2000
+ } \
2001
+ void save(const SQLStatementPtr& st) const { \
2002
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7); \
2003
+ } \
2004
+ void update(const SQLStatementPtr& st) const { \
2005
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, m_rowid); \
2006
+ } \
2007
+ void load(const SQLStatementPtr& st) { \
2008
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7); \
2009
+ }
2010
+
2011
+ #define TABLE_NO_AUTOID_BIND8(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8) \
2012
+ private: \
2013
+ uint64_t m_rowid = 0; \
2014
+ \
2015
+ public: \
2016
+ bool valid() const { \
2017
+ return m_rowid != 0; \
2018
+ } \
2019
+ uint64_t rowid() const { \
2020
+ return m_rowid; \
2021
+ } \
2022
+ void rowid(uint64_t id) { \
2023
+ m_rowid = id; \
2024
+ } \
2025
+ static std::string getTableName() { \
2026
+ return #table; \
2027
+ } \
2028
+ static const char* getInsertSQL() { \
2029
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2030
+ "`,`" #f7 "`,`" #f8 "`) values (?,?,?,?,?,?,?,?)"; \
2031
+ } \
2032
+ static const char* getUpdateSQL() { \
2033
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2034
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=? where `" #ROWID "`=?"; \
2035
+ } \
2036
+ static const char* getSelectSQL() { \
2037
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2038
+ "`,`" #f8 "` from `" #table "`"; \
2039
+ } \
2040
+ void save(const SQLStatementPtr& st) const { \
2041
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8); \
2042
+ } \
2043
+ void update(const SQLStatementPtr& st) const { \
2044
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, m_rowid); \
2045
+ } \
2046
+ void load(const SQLStatementPtr& st) { \
2047
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8); \
2048
+ }
2049
+
2050
+ #define TABLE_NO_AUTOID_BIND9(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
2051
+ private: \
2052
+ uint64_t m_rowid = 0; \
2053
+ \
2054
+ public: \
2055
+ bool valid() const { \
2056
+ return m_rowid != 0; \
2057
+ } \
2058
+ uint64_t rowid() const { \
2059
+ return m_rowid; \
2060
+ } \
2061
+ void rowid(uint64_t id) { \
2062
+ m_rowid = id; \
2063
+ } \
2064
+ static std::string getTableName() { \
2065
+ return #table; \
2066
+ } \
2067
+ static const char* getInsertSQL() { \
2068
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2069
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`) values (?,?,?,?,?,?,?,?,?)"; \
2070
+ } \
2071
+ static const char* getUpdateSQL() { \
2072
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2073
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=? where `" #ROWID "`=?"; \
2074
+ } \
2075
+ static const char* getSelectSQL() { \
2076
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2077
+ "`,`" #f8 "`,`" #f9 "` from `" #table "`"; \
2078
+ } \
2079
+ void save(const SQLStatementPtr& st) const { \
2080
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9); \
2081
+ } \
2082
+ void update(const SQLStatementPtr& st) const { \
2083
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, m_rowid); \
2084
+ } \
2085
+ void load(const SQLStatementPtr& st) { \
2086
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9); \
2087
+ }
2088
+
2089
+ #define TABLE_NO_AUTOID_BIND10(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \
2090
+ private: \
2091
+ uint64_t m_rowid = 0; \
2092
+ \
2093
+ public: \
2094
+ bool valid() const { \
2095
+ return m_rowid != 0; \
2096
+ } \
2097
+ uint64_t rowid() const { \
2098
+ return m_rowid; \
2099
+ } \
2100
+ void rowid(uint64_t id) { \
2101
+ m_rowid = id; \
2102
+ } \
2103
+ static std::string getTableName() { \
2104
+ return #table; \
2105
+ } \
2106
+ static const char* getInsertSQL() { \
2107
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2108
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`) values (?,?,?,?,?,?,?,?,?,?)"; \
2109
+ } \
2110
+ static const char* getUpdateSQL() { \
2111
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2112
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=? where `" #ROWID \
2113
+ "`=?"; \
2114
+ } \
2115
+ static const char* getSelectSQL() { \
2116
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2117
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "` from `" #table "`"; \
2118
+ } \
2119
+ void save(const SQLStatementPtr& st) const { \
2120
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10); \
2121
+ } \
2122
+ void update(const SQLStatementPtr& st) const { \
2123
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, m_rowid); \
2124
+ } \
2125
+ void load(const SQLStatementPtr& st) { \
2126
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10); \
2127
+ }
2128
+
2129
+ #define TABLE_NO_AUTOID_BIND11(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11) \
2130
+ private: \
2131
+ uint64_t m_rowid = 0; \
2132
+ \
2133
+ public: \
2134
+ bool valid() const { \
2135
+ return m_rowid != 0; \
2136
+ } \
2137
+ uint64_t rowid() const { \
2138
+ return m_rowid; \
2139
+ } \
2140
+ void rowid(uint64_t id) { \
2141
+ m_rowid = id; \
2142
+ } \
2143
+ static std::string getTableName() { \
2144
+ return #table; \
2145
+ } \
2146
+ static const char* getInsertSQL() { \
2147
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2148
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 \
2149
+ "`) values (?,?,?,?,?,?,?,?,?,?,?)"; \
2150
+ } \
2151
+ static const char* getUpdateSQL() { \
2152
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2153
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
2154
+ "`=? where `" #ROWID "`=?"; \
2155
+ } \
2156
+ static const char* getSelectSQL() { \
2157
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2158
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "` from `" #table "`"; \
2159
+ } \
2160
+ void save(const SQLStatementPtr& st) const { \
2161
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11); \
2162
+ } \
2163
+ void update(const SQLStatementPtr& st) const { \
2164
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, m_rowid); \
2165
+ } \
2166
+ void load(const SQLStatementPtr& st) { \
2167
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11); \
2168
+ }
2169
+
2170
+ #define TABLE_NO_AUTOID_BIND12(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12) \
2171
+ private: \
2172
+ uint64_t m_rowid = 0; \
2173
+ \
2174
+ public: \
2175
+ bool valid() const { \
2176
+ return m_rowid != 0; \
2177
+ } \
2178
+ uint64_t rowid() const { \
2179
+ return m_rowid; \
2180
+ } \
2181
+ void rowid(uint64_t id) { \
2182
+ m_rowid = id; \
2183
+ } \
2184
+ static std::string getTableName() { \
2185
+ return #table; \
2186
+ } \
2187
+ static const char* getInsertSQL() { \
2188
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2189
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 \
2190
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?)"; \
2191
+ } \
2192
+ static const char* getUpdateSQL() { \
2193
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2194
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
2195
+ "`=?,`" #f12 "`=? where `" #ROWID "`=?"; \
2196
+ } \
2197
+ static const char* getSelectSQL() { \
2198
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2199
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "` from `" #table "`"; \
2200
+ } \
2201
+ void save(const SQLStatementPtr& st) const { \
2202
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12); \
2203
+ } \
2204
+ void update(const SQLStatementPtr& st) const { \
2205
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, m_rowid); \
2206
+ } \
2207
+ void load(const SQLStatementPtr& st) { \
2208
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12); \
2209
+ }
2210
+
2211
+ #define TABLE_NO_AUTOID_BIND13(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, \
2212
+ f13) \
2213
+ private: \
2214
+ uint64_t m_rowid = 0; \
2215
+ \
2216
+ public: \
2217
+ bool valid() const { \
2218
+ return m_rowid != 0; \
2219
+ } \
2220
+ uint64_t rowid() const { \
2221
+ return m_rowid; \
2222
+ } \
2223
+ void rowid(uint64_t id) { \
2224
+ m_rowid = id; \
2225
+ } \
2226
+ static std::string getTableName() { \
2227
+ return #table; \
2228
+ } \
2229
+ static const char* getInsertSQL() { \
2230
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2231
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
2232
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
2233
+ } \
2234
+ static const char* getUpdateSQL() { \
2235
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2236
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
2237
+ "`=?,`" #f12 "`=?,`" #f13 "`=? where `" #ROWID "`=?"; \
2238
+ } \
2239
+ static const char* getSelectSQL() { \
2240
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2241
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "` from `" #table \
2242
+ "`"; \
2243
+ } \
2244
+ void save(const SQLStatementPtr& st) const { \
2245
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13); \
2246
+ } \
2247
+ void update(const SQLStatementPtr& st) const { \
2248
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, m_rowid); \
2249
+ } \
2250
+ void load(const SQLStatementPtr& st) { \
2251
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13); \
2252
+ }
2253
+
2254
+ #define TABLE_NO_AUTOID_BIND14(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, \
2255
+ f13, f14) \
2256
+ private: \
2257
+ uint64_t m_rowid = 0; \
2258
+ \
2259
+ public: \
2260
+ bool valid() const { \
2261
+ return m_rowid != 0; \
2262
+ } \
2263
+ uint64_t rowid() const { \
2264
+ return m_rowid; \
2265
+ } \
2266
+ void rowid(uint64_t id) { \
2267
+ m_rowid = id; \
2268
+ } \
2269
+ static std::string getTableName() { \
2270
+ return #table; \
2271
+ } \
2272
+ static const char* getInsertSQL() { \
2273
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2274
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
2275
+ "`,`" #f14 "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
2276
+ } \
2277
+ static const char* getUpdateSQL() { \
2278
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2279
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
2280
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=? where `" #ROWID "`=?"; \
2281
+ } \
2282
+ static const char* getSelectSQL() { \
2283
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2284
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
2285
+ "` from `" #table "`"; \
2286
+ } \
2287
+ void save(const SQLStatementPtr& st) const { \
2288
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14); \
2289
+ } \
2290
+ void update(const SQLStatementPtr& st) const { \
2291
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, m_rowid); \
2292
+ } \
2293
+ void load(const SQLStatementPtr& st) { \
2294
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14); \
2295
+ }
2296
+
2297
+ #define TABLE_NO_AUTOID_BIND15(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, \
2298
+ f13, f14, f15) \
2299
+ private: \
2300
+ uint64_t m_rowid = 0; \
2301
+ \
2302
+ public: \
2303
+ bool valid() const { \
2304
+ return m_rowid != 0; \
2305
+ } \
2306
+ uint64_t rowid() const { \
2307
+ return m_rowid; \
2308
+ } \
2309
+ void rowid(uint64_t id) { \
2310
+ m_rowid = id; \
2311
+ } \
2312
+ static std::string getTableName() { \
2313
+ return #table; \
2314
+ } \
2315
+ static const char* getInsertSQL() { \
2316
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2317
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
2318
+ "`,`" #f14 "`,`" #f15 "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
2319
+ } \
2320
+ static const char* getUpdateSQL() { \
2321
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2322
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
2323
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=? where `" #ROWID "`=?"; \
2324
+ } \
2325
+ static const char* getSelectSQL() { \
2326
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2327
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
2328
+ "`,`" #f15 "` from `" #table "`"; \
2329
+ } \
2330
+ void save(const SQLStatementPtr& st) const { \
2331
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15); \
2332
+ } \
2333
+ void update(const SQLStatementPtr& st) const { \
2334
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, m_rowid); \
2335
+ } \
2336
+ void load(const SQLStatementPtr& st) { \
2337
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15); \
2338
+ }
2339
+
2340
+ #define TABLE_NO_AUTOID_BIND16(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, \
2341
+ f13, f14, f15, f16) \
2342
+ private: \
2343
+ uint64_t m_rowid = 0; \
2344
+ \
2345
+ public: \
2346
+ bool valid() const { \
2347
+ return m_rowid != 0; \
2348
+ } \
2349
+ uint64_t rowid() const { \
2350
+ return m_rowid; \
2351
+ } \
2352
+ void rowid(uint64_t id) { \
2353
+ m_rowid = id; \
2354
+ } \
2355
+ static std::string getTableName() { \
2356
+ return #table; \
2357
+ } \
2358
+ static const char* getInsertSQL() { \
2359
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2360
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
2361
+ "`,`" #f14 "`,`" #f15 "`,`" #f16 "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
2362
+ } \
2363
+ static const char* getUpdateSQL() { \
2364
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2365
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
2366
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=?,`" #f16 \
2367
+ "`=? where `" #ROWID "`=?"; \
2368
+ } \
2369
+ static const char* getSelectSQL() { \
2370
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2371
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
2372
+ "`,`" #f15 "`,`" #f16 "` from `" #table "`"; \
2373
+ } \
2374
+ void save(const SQLStatementPtr& st) const { \
2375
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16); \
2376
+ } \
2377
+ void update(const SQLStatementPtr& st) const { \
2378
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, \
2379
+ m_rowid); \
2380
+ } \
2381
+ void load(const SQLStatementPtr& st) { \
2382
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16); \
2383
+ }
2384
+
2385
+ #define TABLE_NO_AUTOID_BIND17(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, \
2386
+ f13, f14, f15, f16, f17) \
2387
+ private: \
2388
+ uint64_t m_rowid = 0; \
2389
+ \
2390
+ public: \
2391
+ bool valid() const { \
2392
+ return m_rowid != 0; \
2393
+ } \
2394
+ uint64_t rowid() const { \
2395
+ return m_rowid; \
2396
+ } \
2397
+ void rowid(uint64_t id) { \
2398
+ m_rowid = id; \
2399
+ } \
2400
+ static std::string getTableName() { \
2401
+ return #table; \
2402
+ } \
2403
+ static const char* getInsertSQL() { \
2404
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2405
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
2406
+ "`,`" #f14 "`,`" #f15 "`,`" #f16 "`,`" #f17 \
2407
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
2408
+ } \
2409
+ static const char* getUpdateSQL() { \
2410
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2411
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
2412
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=?,`" #f16 "`=?,`" #f17 \
2413
+ "`=? where `" #ROWID "`=?"; \
2414
+ } \
2415
+ static const char* getSelectSQL() { \
2416
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2417
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
2418
+ "`,`" #f15 "`,`" #f16 "`,`" #f17 "` from `" #table "`"; \
2419
+ } \
2420
+ void save(const SQLStatementPtr& st) const { \
2421
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17); \
2422
+ } \
2423
+ void update(const SQLStatementPtr& st) const { \
2424
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
2425
+ m_rowid); \
2426
+ } \
2427
+ void load(const SQLStatementPtr& st) { \
2428
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, \
2429
+ f17); \
2430
+ }
2431
+
2432
+ #define TABLE_NO_AUTOID_BIND18(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, \
2433
+ f13, f14, f15, f16, f17, f18) \
2434
+ private: \
2435
+ uint64_t m_rowid = 0; \
2436
+ \
2437
+ public: \
2438
+ bool valid() const { \
2439
+ return m_rowid != 0; \
2440
+ } \
2441
+ uint64_t rowid() const { \
2442
+ return m_rowid; \
2443
+ } \
2444
+ void rowid(uint64_t id) { \
2445
+ m_rowid = id; \
2446
+ } \
2447
+ static std::string getTableName() { \
2448
+ return #table; \
2449
+ } \
2450
+ static const char* getInsertSQL() { \
2451
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2452
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
2453
+ "`,`" #f14 "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 \
2454
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
2455
+ } \
2456
+ static const char* getUpdateSQL() { \
2457
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2458
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
2459
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=?,`" #f16 "`=?,`" #f17 \
2460
+ "`=?,`" #f18 "`=? where `" #ROWID "`=?"; \
2461
+ } \
2462
+ static const char* getSelectSQL() { \
2463
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2464
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
2465
+ "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 "` from `" #table "`"; \
2466
+ } \
2467
+ void save(const SQLStatementPtr& st) const { \
2468
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
2469
+ f18); \
2470
+ } \
2471
+ void update(const SQLStatementPtr& st) const { \
2472
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
2473
+ f18, m_rowid); \
2474
+ } \
2475
+ void load(const SQLStatementPtr& st) { \
2476
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, \
2477
+ f17, f18); \
2478
+ }
2479
+
2480
+ #define TABLE_NO_AUTOID_BIND19(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, \
2481
+ f13, f14, f15, f16, f17, f18, f19) \
2482
+ private: \
2483
+ uint64_t m_rowid = 0; \
2484
+ \
2485
+ public: \
2486
+ bool valid() const { \
2487
+ return m_rowid != 0; \
2488
+ } \
2489
+ uint64_t rowid() const { \
2490
+ return m_rowid; \
2491
+ } \
2492
+ void rowid(uint64_t id) { \
2493
+ m_rowid = id; \
2494
+ } \
2495
+ static std::string getTableName() { \
2496
+ return #table; \
2497
+ } \
2498
+ static const char* getInsertSQL() { \
2499
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2500
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
2501
+ "`,`" #f14 "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 "`,`" #f19 \
2502
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
2503
+ } \
2504
+ static const char* getUpdateSQL() { \
2505
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2506
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
2507
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=?,`" #f16 "`=?,`" #f17 \
2508
+ "`=?,`" #f18 "`=?,`" #f19 "`=? where `" #ROWID "`=?"; \
2509
+ } \
2510
+ static const char* getSelectSQL() { \
2511
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2512
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
2513
+ "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 "`,`" #f19 "` from `" #table "`"; \
2514
+ } \
2515
+ void save(const SQLStatementPtr& st) const { \
2516
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
2517
+ f18, f19); \
2518
+ } \
2519
+ void update(const SQLStatementPtr& st) const { \
2520
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
2521
+ f18, f19, m_rowid); \
2522
+ } \
2523
+ void load(const SQLStatementPtr& st) { \
2524
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, \
2525
+ f17, f18, f19); \
2526
+ }
2527
+
2528
+ #define TABLE_NO_AUTOID_BIND20(ROWID, table, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, \
2529
+ f13, f14, f15, f16, f17, f18, f19, f20) \
2530
+ private: \
2531
+ uint64_t m_rowid = 0; \
2532
+ \
2533
+ public: \
2534
+ bool valid() const { \
2535
+ return m_rowid != 0; \
2536
+ } \
2537
+ uint64_t rowid() const { \
2538
+ return m_rowid; \
2539
+ } \
2540
+ void rowid(uint64_t id) { \
2541
+ m_rowid = id; \
2542
+ } \
2543
+ static std::string getTableName() { \
2544
+ return #table; \
2545
+ } \
2546
+ static const char* getInsertSQL() { \
2547
+ return "insert into `" #table "` (`" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 \
2548
+ "`,`" #f7 "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 \
2549
+ "`,`" #f14 "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 "`,`" #f19 "`,`" #f20 \
2550
+ "`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; \
2551
+ } \
2552
+ static const char* getUpdateSQL() { \
2553
+ return "update `" #table "` set `" #f1 "`=?,`" #f2 "`=?,`" #f3 "`=?,`" #f4 "`=?,`" #f5 \
2554
+ "`=?,`" #f6 "`=?,`" #f7 "`=?,`" #f8 "`=?,`" #f9 "`=?,`" #f10 "`=?,`" #f11 \
2555
+ "`=?,`" #f12 "`=?,`" #f13 "`=?,`" #f14 "`=?,`" #f15 "`=?,`" #f16 "`=?,`" #f17 \
2556
+ "`=?,`" #f18 "`=?,`" #f19 "`=?,`" #f20 "`=? where `" #ROWID "`=?"; \
2557
+ } \
2558
+ static const char* getSelectSQL() { \
2559
+ return "select `" #f1 "`,`" #f2 "`,`" #f3 "`,`" #f4 "`,`" #f5 "`,`" #f6 "`,`" #f7 \
2560
+ "`,`" #f8 "`,`" #f9 "`,`" #f10 "`,`" #f11 "`,`" #f12 "`,`" #f13 "`,`" #f14 \
2561
+ "`,`" #f15 "`,`" #f16 "`,`" #f17 "`,`" #f18 "`,`" #f19 "`,`" #f20 "` from `" #table \
2562
+ "`"; \
2563
+ } \
2564
+ void save(const SQLStatementPtr& st) const { \
2565
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
2566
+ f18, f19, f20); \
2567
+ } \
2568
+ void update(const SQLStatementPtr& st) const { \
2569
+ st->bind(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, \
2570
+ f18, f19, f20, m_rowid); \
2571
+ } \
2572
+ void load(const SQLStatementPtr& st) { \
2573
+ st->getColumn(0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, \
2574
+ f17, f18, f19, f20); \
2575
+ }
2576
+
2577
+ } // namespace hku
2578
+
2579
+ #endif /* HIKYUU_DB_CONNECT_TABLE_MACRO_H */