DescSpec.cpp
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:29k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. /* Copyright (C) 2003 MySQL AB
  2.    This program is free software; you can redistribute it and/or modify
  3.    it under the terms of the GNU General Public License as published by
  4.    the Free Software Foundation; either version 2 of the License, or
  5.    (at your option) any later version.
  6.    This program is distributed in the hope that it will be useful,
  7.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9.    GNU General Public License for more details.
  10.    You should have received a copy of the GNU General Public License
  11.    along with this program; if not, write to the Free Software
  12.    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
  13. #include "HandleDbc.hpp"
  14. #include "HandleDesc.hpp"
  15. static void
  16. callback_SQL_DESC_ALLOC_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  17. {
  18.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  19.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  20. }
  21. static void
  22. callback_SQL_DESC_ALLOC_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  23. {
  24.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  25.     ctx_assert(pDesc != 0);
  26.     data.setValue();
  27. }
  28. static void
  29. callback_SQL_DESC_ARRAY_SIZE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  30. {
  31.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  32.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Uinteger);
  33. }
  34. static void
  35. callback_SQL_DESC_ARRAY_SIZE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  36. {
  37.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  38.     ctx_assert(pDesc != 0);
  39.     data.setValue();
  40. }
  41. static void
  42. callback_SQL_DESC_ARRAY_STATUS_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  43. {
  44.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  45.     ctx_assert(pDesc != 0 && data.type() == OdbcData::UsmallintPtr);
  46. }
  47. static void
  48. callback_SQL_DESC_ARRAY_STATUS_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  49. {
  50.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  51.     ctx_assert(pDesc != 0);
  52.     data.setValue();
  53. }
  54. static void
  55. callback_SQL_DESC_BIND_OFFSET_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  56. {
  57.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  58.     ctx_assert(pDesc != 0 && data.type() == OdbcData::IntegerPtr);
  59. }
  60. static void
  61. callback_SQL_DESC_BIND_OFFSET_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  62. {
  63.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  64.     ctx_assert(pDesc != 0);
  65.     data.setValue();
  66. }
  67. static void
  68. callback_SQL_DESC_BIND_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  69. {
  70.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  71.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer);
  72. }
  73. static void
  74. callback_SQL_DESC_BIND_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  75. {
  76.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  77.     ctx_assert(pDesc != 0);
  78.     data.setValue();
  79. }
  80. static void
  81. callback_SQL_DESC_COUNT_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  82. {
  83.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  84.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  85. }
  86. static void
  87. callback_SQL_DESC_COUNT_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  88. {
  89.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  90.     ctx_assert(pDesc != 0);
  91.     data.setValue();
  92. }
  93. static void
  94. callback_SQL_DESC_ROWS_PROCESSED_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  95. {
  96.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  97.     ctx_assert(pDesc != 0 && data.type() == OdbcData::UintegerPtr);
  98. }
  99. static void
  100. callback_SQL_DESC_ROWS_PROCESSED_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  101. {
  102.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  103.     ctx_assert(pDesc != 0);
  104.     data.setValue();
  105. }
  106. static void
  107. callback_SQL_DESC_AUTO_UNIQUE_VALUE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  108. {
  109.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  110.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer);
  111. }
  112. static void
  113. callback_SQL_DESC_AUTO_UNIQUE_VALUE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  114. {
  115.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  116.     ctx_assert(pDesc != 0);
  117.     data.setValue();
  118. }
  119. static void
  120. callback_SQL_DESC_BASE_COLUMN_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  121. {
  122.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  123.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  124. }
  125. static void
  126. callback_SQL_DESC_BASE_COLUMN_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  127. {
  128.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  129.     ctx_assert(pDesc != 0);
  130.     data.setValue();
  131. }
  132. static void
  133. callback_SQL_DESC_BASE_TABLE_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  134. {
  135.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  136.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  137. }
  138. static void
  139. callback_SQL_DESC_BASE_TABLE_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  140. {
  141.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  142.     ctx_assert(pDesc != 0);
  143.     data.setValue();
  144. }
  145. static void
  146. callback_SQL_DESC_CASE_SENSITIVE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  147. {
  148.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  149.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer);
  150. }
  151. static void
  152. callback_SQL_DESC_CASE_SENSITIVE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  153. {
  154.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  155.     ctx_assert(pDesc != 0);
  156.     data.setValue();
  157. }
  158. static void
  159. callback_SQL_DESC_CATALOG_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  160. {
  161.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  162.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  163. }
  164. static void
  165. callback_SQL_DESC_CATALOG_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  166. {
  167.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  168.     ctx_assert(pDesc != 0);
  169.     data.setValue();
  170. }
  171. static void
  172. callback_SQL_DESC_CONCISE_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  173. {
  174.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  175.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  176. }
  177. static void
  178. callback_SQL_DESC_CONCISE_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  179. {
  180.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  181.     ctx_assert(pDesc != 0);
  182.     data.setValue();
  183. }
  184. static void
  185. callback_SQL_DESC_DATA_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  186. {
  187.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  188.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Pointer);
  189. }
  190. static void
  191. callback_SQL_DESC_DATA_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  192. {
  193.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  194.     ctx_assert(pDesc != 0);
  195.     data.setValue();
  196. }
  197. static void
  198. callback_SQL_DESC_DATETIME_INTERVAL_CODE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  199. {
  200.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  201.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  202. }
  203. static void
  204. callback_SQL_DESC_DATETIME_INTERVAL_CODE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  205. {
  206.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  207.     ctx_assert(pDesc != 0);
  208.     data.setValue();
  209. }
  210. static void
  211. callback_SQL_DESC_DATETIME_INTERVAL_PRECISION_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  212. {
  213.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  214.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer);
  215. }
  216. static void
  217. callback_SQL_DESC_DATETIME_INTERVAL_PRECISION_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  218. {
  219.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  220.     ctx_assert(pDesc != 0);
  221.     data.setValue();
  222. }
  223. static void
  224. callback_SQL_DESC_DISPLAY_SIZE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  225. {
  226.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  227.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer);
  228. }
  229. static void
  230. callback_SQL_DESC_DISPLAY_SIZE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  231. {
  232.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  233.     ctx_assert(pDesc != 0);
  234.     data.setValue();
  235. }
  236. static void
  237. callback_SQL_DESC_FIXED_PREC_SCALE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  238. {
  239.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  240.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  241. }
  242. static void
  243. callback_SQL_DESC_FIXED_PREC_SCALE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  244. {
  245.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  246.     ctx_assert(pDesc != 0);
  247.     data.setValue();
  248. }
  249. static void
  250. callback_SQL_DESC_INDICATOR_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  251. {
  252.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  253.     ctx_assert(pDesc != 0 && data.type() == OdbcData::IntegerPtr);
  254. }
  255. static void
  256. callback_SQL_DESC_INDICATOR_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  257. {
  258.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  259.     ctx_assert(pDesc != 0);
  260.     data.setValue();
  261. }
  262. static void
  263. callback_SQL_DESC_LABEL_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  264. {
  265.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  266.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  267. }
  268. static void
  269. callback_SQL_DESC_LABEL_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  270. {
  271.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  272.     ctx_assert(pDesc != 0);
  273.     data.setValue();
  274. }
  275. static void
  276. callback_SQL_DESC_LENGTH_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  277. {
  278.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  279.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Uinteger);
  280. }
  281. static void
  282. callback_SQL_DESC_LENGTH_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  283. {
  284.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  285.     ctx_assert(pDesc != 0);
  286.     data.setValue();
  287. }
  288. static void
  289. callback_SQL_DESC_LITERAL_PREFIX_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  290. {
  291.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  292.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  293. }
  294. static void
  295. callback_SQL_DESC_LITERAL_PREFIX_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  296. {
  297.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  298.     ctx_assert(pDesc != 0);
  299.     data.setValue();
  300. }
  301. static void
  302. callback_SQL_DESC_LITERAL_SUFFIX_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  303. {
  304.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  305.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  306. }
  307. static void
  308. callback_SQL_DESC_LITERAL_SUFFIX_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  309. {
  310.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  311.     ctx_assert(pDesc != 0);
  312.     data.setValue();
  313. }
  314. static void
  315. callback_SQL_DESC_LOCAL_TYPE_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  316. {
  317.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  318.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  319. }
  320. static void
  321. callback_SQL_DESC_LOCAL_TYPE_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  322. {
  323.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  324.     ctx_assert(pDesc != 0);
  325.     data.setValue();
  326. }
  327. static void
  328. callback_SQL_DESC_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  329. {
  330.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  331.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  332. }
  333. static void
  334. callback_SQL_DESC_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  335. {
  336.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  337.     ctx_assert(pDesc != 0);
  338.     data.setValue();
  339. }
  340. static void
  341. callback_SQL_DESC_NULLABLE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  342. {
  343.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  344.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  345. }
  346. static void
  347. callback_SQL_DESC_NULLABLE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  348. {
  349.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  350.     ctx_assert(pDesc != 0);
  351.     data.setValue();
  352. }
  353. static void
  354. callback_SQL_DESC_NUM_PREC_RADIX_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  355. {
  356.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  357.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer);
  358. }
  359. static void
  360. callback_SQL_DESC_NUM_PREC_RADIX_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  361. {
  362.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  363.     ctx_assert(pDesc != 0);
  364.     data.setValue();
  365. }
  366. static void
  367. callback_SQL_DESC_OCTET_LENGTH_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  368. {
  369.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  370.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Integer);
  371. }
  372. static void
  373. callback_SQL_DESC_OCTET_LENGTH_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  374. {
  375.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  376.     ctx_assert(pDesc != 0);
  377.     data.setValue();
  378. }
  379. static void
  380. callback_SQL_DESC_OCTET_LENGTH_PTR_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  381. {
  382.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  383.     ctx_assert(pDesc != 0 && data.type() == OdbcData::IntegerPtr);
  384. }
  385. static void
  386. callback_SQL_DESC_OCTET_LENGTH_PTR_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  387. {
  388.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  389.     ctx_assert(pDesc != 0);
  390.     data.setValue();
  391. }
  392. static void
  393. callback_SQL_DESC_PARAMETER_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  394. {
  395.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  396.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  397. }
  398. static void
  399. callback_SQL_DESC_PARAMETER_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  400. {
  401.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  402.     ctx_assert(pDesc != 0);
  403.     data.setValue();
  404. }
  405. static void
  406. callback_SQL_DESC_PRECISION_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  407. {
  408.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  409.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  410. }
  411. static void
  412. callback_SQL_DESC_PRECISION_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  413. {
  414.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  415.     ctx_assert(pDesc != 0);
  416.     data.setValue();
  417. }
  418. static void
  419. callback_SQL_DESC_ROWVER_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  420. {
  421.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  422.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  423. }
  424. static void
  425. callback_SQL_DESC_ROWVER_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  426. {
  427.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  428.     ctx_assert(pDesc != 0);
  429.     data.setValue();
  430. }
  431. static void
  432. callback_SQL_DESC_SCALE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  433. {
  434.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  435.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  436. }
  437. static void
  438. callback_SQL_DESC_SCALE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  439. {
  440.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  441.     ctx_assert(pDesc != 0);
  442.     data.setValue();
  443. }
  444. static void
  445. callback_SQL_DESC_SCHEMA_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  446. {
  447.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  448.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  449. }
  450. static void
  451. callback_SQL_DESC_SCHEMA_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  452. {
  453.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  454.     ctx_assert(pDesc != 0);
  455.     data.setValue();
  456. }
  457. static void
  458. callback_SQL_DESC_SEARCHABLE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  459. {
  460.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  461.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  462. }
  463. static void
  464. callback_SQL_DESC_SEARCHABLE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  465. {
  466.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  467.     ctx_assert(pDesc != 0);
  468.     data.setValue();
  469. }
  470. static void
  471. callback_SQL_DESC_TABLE_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  472. {
  473.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  474.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  475. }
  476. static void
  477. callback_SQL_DESC_TABLE_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  478. {
  479.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  480.     ctx_assert(pDesc != 0);
  481.     data.setValue();
  482. }
  483. static void
  484. callback_SQL_DESC_TYPE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  485. {
  486.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  487.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  488. }
  489. static void
  490. callback_SQL_DESC_TYPE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  491. {
  492.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  493.     ctx_assert(pDesc != 0);
  494.     data.setValue();
  495. }
  496. static void
  497. callback_SQL_DESC_TYPE_NAME_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  498. {
  499.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  500.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Sqlchar);
  501. }
  502. static void
  503. callback_SQL_DESC_TYPE_NAME_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  504. {
  505.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  506.     ctx_assert(pDesc != 0);
  507.     data.setValue();
  508. }
  509. static void
  510. callback_SQL_DESC_UNNAMED_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  511. {
  512.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  513.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  514. }
  515. static void
  516. callback_SQL_DESC_UNNAMED_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  517. {
  518.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  519.     ctx_assert(pDesc != 0);
  520.     data.setValue();
  521. }
  522. static void
  523. callback_SQL_DESC_UNSIGNED_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  524. {
  525.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  526.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  527. }
  528. static void
  529. callback_SQL_DESC_UNSIGNED_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  530. {
  531.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  532.     ctx_assert(pDesc != 0);
  533.     data.setValue();
  534. }
  535. static void
  536. callback_SQL_DESC_UPDATABLE_set(Ctx& ctx, HandleBase* self, const OdbcData& data)
  537. {
  538.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  539.     ctx_assert(pDesc != 0 && data.type() == OdbcData::Smallint);
  540. }
  541. static void
  542. callback_SQL_DESC_UPDATABLE_default(Ctx& ctx, HandleBase* self, OdbcData& data)
  543. {
  544.     HandleDesc* pDesc = static_cast<HandleDesc*>(self);
  545.     ctx_assert(pDesc != 0);
  546.     data.setValue();
  547. }
  548. DescSpec HandleDesc::m_descSpec[] = {
  549.     {   Desc_pos_header,
  550. SQL_DESC_ALLOC_TYPE,
  551. OdbcData::Smallint,
  552. {   Desc_mode_undef,
  553.     Desc_mode_readonly,
  554.     Desc_mode_readonly,
  555.     Desc_mode_readonly,
  556.     Desc_mode_readonly,
  557. },
  558. callback_SQL_DESC_ALLOC_TYPE_set,
  559. callback_SQL_DESC_ALLOC_TYPE_default,
  560.     },
  561.     {   Desc_pos_header,
  562. SQL_DESC_ARRAY_SIZE,
  563. OdbcData::Uinteger,
  564. {   Desc_mode_undef,
  565.     Desc_mode_unused,
  566.     Desc_mode_readwrite,
  567.     Desc_mode_unused,
  568.     Desc_mode_readwrite
  569. },
  570. callback_SQL_DESC_ARRAY_SIZE_set,
  571. callback_SQL_DESC_ARRAY_SIZE_default,
  572.     },
  573.     {   Desc_pos_header,
  574. SQL_DESC_ARRAY_STATUS_PTR,
  575. OdbcData::UsmallintPtr,
  576. {   Desc_mode_undef,
  577.     Desc_mode_readwrite,
  578.     Desc_mode_readwrite,
  579.     Desc_mode_readwrite,
  580.     Desc_mode_readwrite
  581. },
  582. callback_SQL_DESC_ARRAY_STATUS_PTR_set,
  583. callback_SQL_DESC_ARRAY_STATUS_PTR_default,
  584.     },
  585.     {   Desc_pos_header,
  586. SQL_DESC_BIND_OFFSET_PTR,
  587. OdbcData::IntegerPtr,
  588. {   Desc_mode_undef,
  589.     Desc_mode_unused,
  590.     Desc_mode_readwrite,
  591.     Desc_mode_unused,
  592.     Desc_mode_readwrite
  593. },
  594. callback_SQL_DESC_BIND_OFFSET_PTR_set,
  595. callback_SQL_DESC_BIND_OFFSET_PTR_default,
  596.     },
  597.     {   Desc_pos_header,
  598. SQL_DESC_BIND_TYPE,
  599. OdbcData::Integer,
  600. {   Desc_mode_undef,
  601.     Desc_mode_unused,
  602.     Desc_mode_readwrite,
  603.     Desc_mode_unused,
  604.     Desc_mode_readwrite
  605. },
  606. callback_SQL_DESC_BIND_TYPE_set,
  607. callback_SQL_DESC_BIND_TYPE_default,
  608.     },
  609.     {   Desc_pos_header,
  610. SQL_DESC_COUNT,
  611. OdbcData::Smallint,
  612. {   Desc_mode_undef,
  613.     Desc_mode_readwrite,
  614.     Desc_mode_readwrite,
  615.     Desc_mode_readonly,
  616.     Desc_mode_readwrite
  617. },
  618. callback_SQL_DESC_COUNT_set,
  619. callback_SQL_DESC_COUNT_default,
  620.     },
  621.     {   Desc_pos_header,
  622. SQL_DESC_ROWS_PROCESSED_PTR,
  623. OdbcData::UintegerPtr,
  624. {   Desc_mode_undef,
  625.     Desc_mode_readwrite,
  626.     Desc_mode_unused,
  627.     Desc_mode_readwrite,
  628.     Desc_mode_unused
  629. },
  630. callback_SQL_DESC_ROWS_PROCESSED_PTR_set,
  631. callback_SQL_DESC_ROWS_PROCESSED_PTR_default,
  632.     },
  633.     {   Desc_pos_record,
  634. SQL_DESC_AUTO_UNIQUE_VALUE,
  635. OdbcData::Integer,
  636. {   Desc_mode_undef,
  637.     Desc_mode_unused,
  638.     Desc_mode_unused,
  639.     Desc_mode_readonly,
  640.     Desc_mode_unused
  641. },
  642. callback_SQL_DESC_AUTO_UNIQUE_VALUE_set,
  643. callback_SQL_DESC_AUTO_UNIQUE_VALUE_default,
  644.     },
  645.     {   Desc_pos_record,
  646. SQL_DESC_BASE_COLUMN_NAME,
  647. OdbcData::Sqlchar,
  648. {   Desc_mode_undef,
  649.     Desc_mode_unused,
  650.     Desc_mode_unused,
  651.     Desc_mode_readonly,
  652.     Desc_mode_unused
  653. },
  654. callback_SQL_DESC_BASE_COLUMN_NAME_set,
  655. callback_SQL_DESC_BASE_COLUMN_NAME_default,
  656.     },
  657.     {   Desc_pos_record,
  658. SQL_DESC_BASE_TABLE_NAME,
  659. OdbcData::Sqlchar,
  660. {   Desc_mode_undef,
  661.     Desc_mode_unused,
  662.     Desc_mode_unused,
  663.     Desc_mode_readonly,
  664.     Desc_mode_unused
  665. },
  666. callback_SQL_DESC_BASE_TABLE_NAME_set,
  667. callback_SQL_DESC_BASE_TABLE_NAME_default,
  668.     },
  669.     {   Desc_pos_record,
  670. SQL_DESC_CASE_SENSITIVE,
  671. OdbcData::Integer,
  672. {   Desc_mode_undef,
  673.     Desc_mode_readonly,
  674.     Desc_mode_unused,
  675.     Desc_mode_readonly,
  676.     Desc_mode_unused
  677. },
  678. callback_SQL_DESC_CASE_SENSITIVE_set,
  679. callback_SQL_DESC_CASE_SENSITIVE_default,
  680.     },
  681.     {   Desc_pos_record,
  682. SQL_DESC_CATALOG_NAME,
  683. OdbcData::Sqlchar,
  684. {   Desc_mode_undef,
  685.     Desc_mode_unused,
  686.     Desc_mode_unused,
  687.     Desc_mode_readonly,
  688.     Desc_mode_unused
  689. },
  690. callback_SQL_DESC_CATALOG_NAME_set,
  691. callback_SQL_DESC_CATALOG_NAME_default,
  692.     },
  693.     {   Desc_pos_record,
  694. SQL_DESC_CONCISE_TYPE,
  695. OdbcData::Smallint,
  696. {   Desc_mode_undef,
  697.     Desc_mode_readwrite,
  698.     Desc_mode_readwrite,
  699.     Desc_mode_readonly,
  700.     Desc_mode_readwrite
  701. },
  702. callback_SQL_DESC_CONCISE_TYPE_set,
  703. callback_SQL_DESC_CONCISE_TYPE_default,
  704.     },
  705.     {   Desc_pos_record,
  706. SQL_DESC_DATA_PTR,
  707. OdbcData::Pointer,
  708. {   Desc_mode_undef,
  709.     Desc_mode_unused,
  710.     Desc_mode_readwrite,
  711.     Desc_mode_unused,
  712.     Desc_mode_readwrite
  713. },
  714. callback_SQL_DESC_DATA_PTR_set,
  715. callback_SQL_DESC_DATA_PTR_default,
  716.     },
  717.     {   Desc_pos_record,
  718. SQL_DESC_DATETIME_INTERVAL_CODE,
  719. OdbcData::Smallint,
  720. {   Desc_mode_undef,
  721.     Desc_mode_readwrite,
  722.     Desc_mode_readwrite,
  723.     Desc_mode_readonly,
  724.     Desc_mode_readwrite
  725. },
  726. callback_SQL_DESC_DATETIME_INTERVAL_CODE_set,
  727. callback_SQL_DESC_DATETIME_INTERVAL_CODE_default,
  728.     },
  729.     {   Desc_pos_record,
  730. SQL_DESC_DATETIME_INTERVAL_PRECISION,
  731. OdbcData::Integer,
  732. {   Desc_mode_undef,
  733.     Desc_mode_readwrite,
  734.     Desc_mode_readwrite,
  735.     Desc_mode_readonly,
  736.     Desc_mode_readwrite
  737. },
  738. callback_SQL_DESC_DATETIME_INTERVAL_PRECISION_set,
  739. callback_SQL_DESC_DATETIME_INTERVAL_PRECISION_default,
  740.     },
  741.     {   Desc_pos_record,
  742. SQL_DESC_DISPLAY_SIZE,
  743. OdbcData::Integer,
  744. {   Desc_mode_undef,
  745.     Desc_mode_unused,
  746.     Desc_mode_unused,
  747.     Desc_mode_readonly,
  748.     Desc_mode_unused
  749. },
  750. callback_SQL_DESC_DISPLAY_SIZE_set,
  751. callback_SQL_DESC_DISPLAY_SIZE_default,
  752.     },
  753.     {   Desc_pos_record,
  754. SQL_DESC_FIXED_PREC_SCALE,
  755. OdbcData::Smallint,
  756. {   Desc_mode_undef,
  757.     Desc_mode_readonly,
  758.     Desc_mode_unused,
  759.     Desc_mode_readonly,
  760.     Desc_mode_unused
  761. },
  762. callback_SQL_DESC_FIXED_PREC_SCALE_set,
  763. callback_SQL_DESC_FIXED_PREC_SCALE_default,
  764.     },
  765.     {   Desc_pos_record,
  766. SQL_DESC_INDICATOR_PTR,
  767. OdbcData::IntegerPtr,
  768. {   Desc_mode_undef,
  769.     Desc_mode_unused,
  770.     Desc_mode_readwrite,
  771.     Desc_mode_unused,
  772.     Desc_mode_readwrite
  773. },
  774. callback_SQL_DESC_INDICATOR_PTR_set,
  775. callback_SQL_DESC_INDICATOR_PTR_default,
  776.     },
  777.     {   Desc_pos_record,
  778. SQL_DESC_LABEL,
  779. OdbcData::Sqlchar,
  780. {   Desc_mode_undef,
  781.     Desc_mode_unused,
  782.     Desc_mode_unused,
  783.     Desc_mode_readonly,
  784.     Desc_mode_unused
  785. },
  786. callback_SQL_DESC_LABEL_set,
  787. callback_SQL_DESC_LABEL_default,
  788.     },
  789.     {   Desc_pos_record,
  790. SQL_DESC_LENGTH,
  791. OdbcData::Uinteger,
  792. {   Desc_mode_undef,
  793.     Desc_mode_readwrite,
  794.     Desc_mode_readwrite,
  795.     Desc_mode_readonly,
  796.     Desc_mode_readwrite
  797. },
  798. callback_SQL_DESC_LENGTH_set,
  799. callback_SQL_DESC_LENGTH_default,
  800.     },
  801.     {   Desc_pos_record,
  802. SQL_DESC_LITERAL_PREFIX,
  803. OdbcData::Sqlchar,
  804. {   Desc_mode_undef,
  805.     Desc_mode_unused,
  806.     Desc_mode_unused,
  807.     Desc_mode_readonly,
  808.     Desc_mode_unused
  809. },
  810. callback_SQL_DESC_LITERAL_PREFIX_set,
  811. callback_SQL_DESC_LITERAL_PREFIX_default,
  812.     },
  813.     {   Desc_pos_record,
  814. SQL_DESC_LITERAL_SUFFIX,
  815. OdbcData::Sqlchar,
  816. {   Desc_mode_undef,
  817.     Desc_mode_unused,
  818.     Desc_mode_unused,
  819.     Desc_mode_readonly,
  820.     Desc_mode_unused
  821. },
  822. callback_SQL_DESC_LITERAL_SUFFIX_set,
  823. callback_SQL_DESC_LITERAL_SUFFIX_default,
  824.     },
  825.     {   Desc_pos_record,
  826. SQL_DESC_LOCAL_TYPE_NAME,
  827. OdbcData::Sqlchar,
  828. {   Desc_mode_undef,
  829.     Desc_mode_readonly,
  830.     Desc_mode_unused,
  831.     Desc_mode_readonly,
  832.     Desc_mode_unused
  833. },
  834. callback_SQL_DESC_LOCAL_TYPE_NAME_set,
  835. callback_SQL_DESC_LOCAL_TYPE_NAME_default,
  836.     },
  837.     {   Desc_pos_record,
  838. SQL_DESC_NAME,
  839. OdbcData::Sqlchar,
  840. {   Desc_mode_undef,
  841.     Desc_mode_readwrite,
  842.     Desc_mode_unused,
  843.     Desc_mode_readonly,
  844.     Desc_mode_unused
  845. },
  846. callback_SQL_DESC_NAME_set,
  847. callback_SQL_DESC_NAME_default,
  848.     },
  849.     {   Desc_pos_record,
  850. SQL_DESC_NULLABLE,
  851. OdbcData::Smallint,
  852. {   Desc_mode_undef,
  853.     Desc_mode_readonly,
  854.     Desc_mode_unused,
  855.     Desc_mode_readonly,
  856.     Desc_mode_unused
  857. },
  858. callback_SQL_DESC_NULLABLE_set,
  859. callback_SQL_DESC_NULLABLE_default,
  860.     },
  861.     {   Desc_pos_record,
  862. SQL_DESC_NUM_PREC_RADIX,
  863. OdbcData::Integer,
  864. {   Desc_mode_undef,
  865.     Desc_mode_readwrite,
  866.     Desc_mode_readwrite,
  867.     Desc_mode_readonly,
  868.     Desc_mode_readwrite
  869. },
  870. callback_SQL_DESC_NUM_PREC_RADIX_set,
  871. callback_SQL_DESC_NUM_PREC_RADIX_default,
  872.     },
  873.     {   Desc_pos_record,
  874. SQL_DESC_OCTET_LENGTH,
  875. OdbcData::Integer,
  876. {   Desc_mode_undef,
  877.     Desc_mode_readwrite,
  878.     Desc_mode_readwrite,
  879.     Desc_mode_readonly,
  880.     Desc_mode_readwrite
  881. },
  882. callback_SQL_DESC_OCTET_LENGTH_set,
  883. callback_SQL_DESC_OCTET_LENGTH_default,
  884.     },
  885.     {   Desc_pos_record,
  886. SQL_DESC_OCTET_LENGTH_PTR,
  887. OdbcData::IntegerPtr,
  888. {   Desc_mode_undef,
  889.     Desc_mode_unused,
  890.     Desc_mode_readwrite,
  891.     Desc_mode_unused,
  892.     Desc_mode_readwrite
  893. },
  894. callback_SQL_DESC_OCTET_LENGTH_PTR_set,
  895. callback_SQL_DESC_OCTET_LENGTH_PTR_default,
  896.     },
  897.     {   Desc_pos_record,
  898. SQL_DESC_PARAMETER_TYPE,
  899. OdbcData::Smallint,
  900. {   Desc_mode_undef,
  901.     Desc_mode_readwrite,
  902.     Desc_mode_unused,
  903.     Desc_mode_unused,
  904.     Desc_mode_unused
  905. },
  906. callback_SQL_DESC_PARAMETER_TYPE_set,
  907. callback_SQL_DESC_PARAMETER_TYPE_default,
  908.     },
  909.     {   Desc_pos_record,
  910. SQL_DESC_PRECISION,
  911. OdbcData::Smallint,
  912. {   Desc_mode_undef,
  913.     Desc_mode_readwrite,
  914.     Desc_mode_readwrite,
  915.     Desc_mode_readonly,
  916.     Desc_mode_readwrite
  917. },
  918. callback_SQL_DESC_PRECISION_set,
  919. callback_SQL_DESC_PRECISION_default,
  920.     },
  921.     {   Desc_pos_record,
  922. SQL_DESC_ROWVER,
  923. OdbcData::Smallint,
  924. {   Desc_mode_undef,
  925.     Desc_mode_readonly,
  926.     Desc_mode_unused,
  927.     Desc_mode_readonly,
  928.     Desc_mode_unused
  929. },
  930. callback_SQL_DESC_ROWVER_set,
  931. callback_SQL_DESC_ROWVER_default,
  932.     },
  933.     {   Desc_pos_record,
  934. SQL_DESC_SCALE,
  935. OdbcData::Smallint,
  936. {   Desc_mode_undef,
  937.     Desc_mode_readwrite,
  938.     Desc_mode_readwrite,
  939.     Desc_mode_readonly,
  940.     Desc_mode_readwrite
  941. },
  942. callback_SQL_DESC_SCALE_set,
  943. callback_SQL_DESC_SCALE_default,
  944.     },
  945.     {   Desc_pos_record,
  946. SQL_DESC_SCHEMA_NAME,
  947. OdbcData::Sqlchar,
  948. {   Desc_mode_undef,
  949.     Desc_mode_unused,
  950.     Desc_mode_unused,
  951.     Desc_mode_readonly,
  952.     Desc_mode_unused
  953. },
  954. callback_SQL_DESC_SCHEMA_NAME_set,
  955. callback_SQL_DESC_SCHEMA_NAME_default,
  956.     },
  957.     {   Desc_pos_record,
  958. SQL_DESC_SEARCHABLE,
  959. OdbcData::Smallint,
  960. {   Desc_mode_undef,
  961.     Desc_mode_unused,
  962.     Desc_mode_unused,
  963.     Desc_mode_readonly,
  964.     Desc_mode_unused
  965. },
  966. callback_SQL_DESC_SEARCHABLE_set,
  967. callback_SQL_DESC_SEARCHABLE_default,
  968.     },
  969.     {   Desc_pos_record,
  970. SQL_DESC_TABLE_NAME,
  971. OdbcData::Sqlchar,
  972. {   Desc_mode_undef,
  973.     Desc_mode_unused,
  974.     Desc_mode_unused,
  975.     Desc_mode_readonly,
  976.     Desc_mode_unused
  977. },
  978. callback_SQL_DESC_TABLE_NAME_set,
  979. callback_SQL_DESC_TABLE_NAME_default,
  980.     },
  981.     {   Desc_pos_record,
  982. SQL_DESC_TYPE,
  983. OdbcData::Smallint,
  984. {   Desc_mode_undef,
  985.     Desc_mode_readwrite,
  986.     Desc_mode_readwrite,
  987.     Desc_mode_readonly,
  988.     Desc_mode_readwrite
  989. },
  990. callback_SQL_DESC_TYPE_set,
  991. callback_SQL_DESC_TYPE_default,
  992.     },
  993.     {   Desc_pos_record,
  994. SQL_DESC_TYPE_NAME,
  995. OdbcData::Sqlchar,
  996. {   Desc_mode_undef,
  997.     Desc_mode_readonly,
  998.     Desc_mode_unused,
  999.     Desc_mode_readonly,
  1000.     Desc_mode_unused
  1001. },
  1002. callback_SQL_DESC_TYPE_NAME_set,
  1003. callback_SQL_DESC_TYPE_NAME_default,
  1004.     },
  1005.     {   Desc_pos_record,
  1006. SQL_DESC_UNNAMED,
  1007. OdbcData::Smallint,
  1008. {   Desc_mode_undef,
  1009.     Desc_mode_readwrite,
  1010.     Desc_mode_unused,
  1011.     Desc_mode_readonly,
  1012.     Desc_mode_unused
  1013. },
  1014. callback_SQL_DESC_UNNAMED_set,
  1015. callback_SQL_DESC_UNNAMED_default,
  1016.     },
  1017.     {   Desc_pos_record,
  1018. SQL_DESC_UNSIGNED,
  1019. OdbcData::Smallint,
  1020. {   Desc_mode_undef,
  1021.     Desc_mode_readonly,
  1022.     Desc_mode_unused,
  1023.     Desc_mode_readonly,
  1024.     Desc_mode_unused
  1025. },
  1026. callback_SQL_DESC_UNSIGNED_set,
  1027. callback_SQL_DESC_UNSIGNED_default,
  1028.     },
  1029.     {   Desc_pos_record,
  1030. SQL_DESC_UPDATABLE,
  1031. OdbcData::Smallint,
  1032. {   Desc_mode_undef,
  1033.     Desc_mode_unused,
  1034.     Desc_mode_unused,
  1035.     Desc_mode_readonly,
  1036.     Desc_mode_unused
  1037. },
  1038. callback_SQL_DESC_UPDATABLE_set,
  1039. callback_SQL_DESC_UPDATABLE_default,
  1040.     },
  1041.     {   Desc_pos_end,
  1042. 0,
  1043. OdbcData::Undef,
  1044. {   Desc_mode_undef,
  1045.     Desc_mode_undef,
  1046.     Desc_mode_undef,
  1047.     Desc_mode_undef,
  1048.     Desc_mode_undef
  1049. },
  1050. 0,
  1051. 0
  1052.     },
  1053. };