A C++ DAL / ORM code generation framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

225 lines
19 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <title>WORM: WSqlDataType Namespace Reference</title>
  6. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  7. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  8. <script type="text/javascript" src="search/search.js"></script>
  9. <link href="doxygen.css" rel="stylesheet" type="text/css"/>
  10. </head>
  11. <body onload='searchBox.OnSelectItem(0);'>
  12. <!-- Generated by Doxygen 1.7.3 -->
  13. <script type="text/javascript"><!--
  14. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  15. --></script>
  16. <script type="text/javascript">
  17. function hasClass(ele,cls) {
  18. return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
  19. }
  20. function addClass(ele,cls) {
  21. if (!this.hasClass(ele,cls)) ele.className += " "+cls;
  22. }
  23. function removeClass(ele,cls) {
  24. if (hasClass(ele,cls)) {
  25. var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
  26. ele.className=ele.className.replace(reg,' ');
  27. }
  28. }
  29. function toggleVisibility(linkObj) {
  30. var base = linkObj.getAttribute('id');
  31. var summary = document.getElementById(base + '-summary');
  32. var content = document.getElementById(base + '-content');
  33. var trigger = document.getElementById(base + '-trigger');
  34. if ( hasClass(linkObj,'closed') ) {
  35. summary.style.display = 'none';
  36. content.style.display = 'block';
  37. trigger.src = 'open.png';
  38. removeClass(linkObj,'closed');
  39. addClass(linkObj,'opened');
  40. } else if ( hasClass(linkObj,'opened') ) {
  41. summary.style.display = 'block';
  42. content.style.display = 'none';
  43. trigger.src = 'closed.png';
  44. removeClass(linkObj,'opened');
  45. addClass(linkObj,'closed');
  46. }
  47. return false;
  48. }
  49. </script>
  50. <div id="top">
  51. <div id="titlearea">
  52. <table cellspacing="0" cellpadding="0">
  53. <tbody>
  54. <tr style="height: 56px;">
  55. <td id="projectlogo"><img alt="Logo" src="worm_sm.png"></td>
  56. <td style="padding-left: 0.5em;">
  57. <div id="projectname">WORM&#160;<span id="projectnumber">0.2</span></div>
  58. <div id="projectbrief">A C++ DAL/ORM code generation framework</div>
  59. </td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. </div>
  64. <div id="navrow1" class="tabs">
  65. <ul class="tablist">
  66. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  67. <li><a href="modules.html"><span>Modules</span></a></li>
  68. <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
  69. <li><a href="annotated.html"><span>Classes</span></a></li>
  70. <li><a href="files.html"><span>Files</span></a></li>
  71. <li id="searchli">
  72. <div id="MSearchBox" class="MSearchBoxInactive">
  73. <span class="left">
  74. <img id="MSearchSelect" src="search/mag_sel.png"
  75. onmouseover="return searchBox.OnSearchSelectShow()"
  76. onmouseout="return searchBox.OnSearchSelectHide()"
  77. alt=""/>
  78. <input type="text" id="MSearchField" value="Search" accesskey="S"
  79. onfocus="searchBox.OnSearchFieldFocus(true)"
  80. onblur="searchBox.OnSearchFieldFocus(false)"
  81. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  82. </span><span class="right">
  83. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  84. </span>
  85. </div>
  86. </li>
  87. </ul>
  88. </div>
  89. <div id="navrow2" class="tabs2">
  90. <ul class="tablist">
  91. <li><a href="namespaces.html"><span>Namespace&#160;List</span></a></li>
  92. <li><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
  93. </ul>
  94. </div>
  95. </div>
  96. <div class="header">
  97. <div class="headertitle">
  98. <h1>WSqlDataType Namespace Reference</h1> </div>
  99. </div>
  100. <div class="contents">
  101. <p><a class="el" href="namespace_w_sql_data_type.html" title="WSqlDataType namespace - flags for supported SQL data types.">WSqlDataType</a> namespace - flags for supported SQL data types.
  102. <a href="#_details">More...</a></p>
  103. <table class="memberdecls">
  104. </table>
  105. <hr/><a name="_details"></a><h2>Detailed Description</h2>
  106. <div class="textblock"><p><a class="el" href="namespace_w_sql_data_type.html" title="WSqlDataType namespace - flags for supported SQL data types.">WSqlDataType</a> namespace - flags for supported SQL data types. </p>
  107. <p>This is a container for type flags and convenience functions for the supported SQL datatypes.</p>
  108. <p>These are the ANSI SQl standard types supported by WSQL - these will be mapped to native C++ data types in ORM class generation. For example a TINYINT column will declared as a member of type "short", a VARCHAR or TEXT as type std::string, a DECIMAL to a double, etc. The following is a list of the types with specifications - Implementers of drivers should use this as a guide for translating types for a particular DBMS.</p>
  109. <p>Writers of drivers should translate any proprietary or other data types specific to the DBMS of the driver to these types. Most DBMS metadata is returned in a string identifier of one of these types and can usually be mapped conveniently by using the functions toString(type) or toType(string).</p>
  110. <p>See the following for more information on the specific data types: </p>
  111. <div class="fragment"><pre class="fragment"> Note: these types are modeled after the MySQL data types (which seemed the broadest
  112. and closest to ANSI standard). I include these notes <span class="keywordflow">for</span> reference only - they are
  113. <span class="keywordflow">for</span> determining how types will be converted..(todo)
  114. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a2fa7f6e8be4f3f438461f01e8aacd76e">TINYINT</a> - A very small integer that can be <span class="keywordtype">signed</span> or <span class="keywordtype">unsigned</span>. If <span class="keywordtype">signed</span>, the
  115. allowable range is from -128 to 127. If <span class="keywordtype">unsigned</span>, the allowable range is from 0
  116. to 255. You can specify a width of up to 4 digits.
  117. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a185153956d8bff78e071637d75518049">SMALLINT</a> - A small integer that can be <span class="keywordtype">signed</span> or <span class="keywordtype">unsigned</span>. If <span class="keywordtype">signed</span>, the
  118. allowable range is from -32768 to 32767. If <span class="keywordtype">unsigned</span>, the allowable range is
  119. from 0 to 65535. You can specify a width of up to 5 digits.
  120. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a5cd5fddf9f96a63b0e8fbab168793348">MEDIUMINT</a> - A medium-sized integer that can be <span class="keywordtype">signed</span> or <span class="keywordtype">unsigned</span>. If <span class="keywordtype">signed</span>,
  121. the allowable range is from -8388608 to 8388607. If <span class="keywordtype">unsigned</span>, the allowable
  122. range is from 0 to 16777215. You can specify a width of up to 9 digits.
  123. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11afc4d0f8755ce336f16e9ecc467c29175">INT</a> - A normal-sized integer that can be <span class="keywordtype">signed</span> or <span class="keywordtype">unsigned</span>. If <span class="keywordtype">signed</span>, the
  124. allowable range is from -2147483648 to 2147483647. If <span class="keywordtype">unsigned</span>, the allowable
  125. range is from 0 to 4294967295. You can specify a width of up to 11 digits.
  126. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a18d7620211cfa3ba63be7f081fc0c181">BIGINT</a> - A large integer that can be <span class="keywordtype">signed</span> or <span class="keywordtype">unsigned</span>. If <span class="keywordtype">signed</span>, the
  127. allowable range is from -9223372036854775808 to 9223372036854775807. If
  128. <span class="keywordtype">unsigned</span>, the allowable range is from 0 to 18446744073709551615. You can specify
  129. a width of up to 11 digits.
  130. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a82673be233e9f7a52bbb9e94f1ea526a">FLOAT</a>(M,D) - A floating-point number that cannot be <span class="keywordtype">unsigned</span>. You can define the
  131. display length (M) and the number of decimals (D). This is not required and will
  132. default to 10,2, where 2 is the number of decimals and 10 is the total number of
  133. digits (including decimals). Decimal precision can go to 24 places for a <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a82673be233e9f7a52bbb9e94f1ea526a">FLOAT</a>.
  134. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad9d614c9575a0891342c3171fc2772e5">DOUBLE</a>(M,D) - A <span class="keywordtype">double</span> precision floating-point number that cannot be <span class="keywordtype">unsigned</span>.
  135. You can define the display length (M) and the number of decimals (D). This is
  136. not required and will default to 16,4, where 4 is the number of decimals.
  137. Decimal precision can go to 53 places for a <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad9d614c9575a0891342c3171fc2772e5">DOUBLE</a>. REAL is a synonym for
  138. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad9d614c9575a0891342c3171fc2772e5">DOUBLE</a>.
  139. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11aead2d4157138ca0913950d5efb1a2ca6">DECIMAL</a>(M,D) - An unpacked floating-point number that cannot be <span class="keywordtype">unsigned</span>. In
  140. unpacked decimals, each decimal corresponds to one byte. Defining the display
  141. length (M) and the number of decimals (D) is required. NUMERIC is a synonym for
  142. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11aead2d4157138ca0913950d5efb1a2ca6">DECIMAL</a>.
  143. Date and Time Types:
  144. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a2c6b3641a625bd3ff903a2c247b26517">DATE</a> - A date in YYYY-MM-DD format, between 1000-01-01 and 9999-12-31. For
  145. example, December 30th, 1973 would be stored as 1973-12-30.
  146. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11abd11772d96be90ace717e22ba24bc71e">DATETIME</a> - A date and time combination in YYYY-MM-DD HH:MM:SS format, between
  147. 1000-01-01 00:00:00 and 9999-12-31 23:59:59. For example, 3:30 in the afternoon
  148. on December 30th, 1973 would be stored as 1973-12-30 15:30:00.
  149. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ab5c547c63dba19815e88b2cca05f4e32">TIMESTAMP</a> - A timestamp between midnight, January 1, 1970 and sometime in 2037.
  150. This looks like the previous <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11abd11772d96be90ace717e22ba24bc71e">DATETIME</a> format, only without the hyphens between
  151. numbers; 3:30 in the afternoon on December 30th, 1973 would be stored as
  152. 19731230153000 ( YYYYMMDDHHMMSS ).
  153. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a1e863429b29d2e90ff60f8251017baef">TIME</a> - Stores the time in HH:MM:SS format.
  154. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a8f6410ee01071f02a1d75259e4a4120c">YEAR</a>(M) - Stores a year in 2-digit or 4-digit format. If the length is specified
  155. as 2 (for example <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a8f6410ee01071f02a1d75259e4a4120c">YEAR</a>(2)), YEAR can be 1970 to 2069 (70 to 69). If the length
  156. is specified as 4, YEAR can be 1901 to 2155. The default length is 4.
  157. String Types:
  158. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11af83d87e0848372230d82996d24f6a0ce">CHAR</a>(M) - A fixed-length <span class="keywordtype">string</span> between 1 and 255 characters in length (for
  159. example <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11af83d87e0848372230d82996d24f6a0ce">CHAR</a>(5)), right-padded with spaces to the specified length when stored.
  160. Defining a length is not required, but the default is 1.
  161. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad02611db29673467c36fbd4d267dccf8">VARCHAR</a>(M) - A variable-length <span class="keywordtype">string</span> between 1 and 255 characters in length;
  162. for example <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad02611db29673467c36fbd4d267dccf8">VARCHAR</a>(25). You must define a length when creating a <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad02611db29673467c36fbd4d267dccf8">VARCHAR</a> field.
  163. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a79b1e3c78a2aae4000205a6340120066">BLOB</a> or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e">TEXT</a> - A field with a maximum length of 65535 characters. BLOBs are
  164. &quot;Binary Large Objects&quot; and are used to store large amounts of binary data, such
  165. as images or other types of files. Fields defined as <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e">TEXT</a> also hold large
  166. amounts of data; the difference between the two is that sorts and comparisons on
  167. stored data are case sensitive on BLOBs and are not case sensitive in <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e">TEXT</a>
  168. fields. You do not specify a length with <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a79b1e3c78a2aae4000205a6340120066">BLOB</a> or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e">TEXT</a>.
  169. TINYBLOB or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a229e9a69a403ad69b83e3ffcc6cafbab">TINYTEXT</a> - A <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a79b1e3c78a2aae4000205a6340120066">BLOB</a> or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e">TEXT</a> column with a maximum length of 255
  170. characters. You do not specify a length with TINYBLOB or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a229e9a69a403ad69b83e3ffcc6cafbab">TINYTEXT</a>.
  171. MEDIUMBLOB or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a3ec0265b0cd32336a8cc6927706a97d6">MEDIUMTEXT</a> - A <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a79b1e3c78a2aae4000205a6340120066">BLOB</a> or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e">TEXT</a> column with a maximum length of
  172. 16777215 characters. You do not specify a length with MEDIUMBLOB or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a3ec0265b0cd32336a8cc6927706a97d6">MEDIUMTEXT</a>.
  173. LONGBLOB or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a4c4198e10fa328e23de4cccfac355eef">LONGTEXT</a> - A <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a79b1e3c78a2aae4000205a6340120066">BLOB</a> or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e">TEXT</a> column with a maximum length of 4294967295
  174. characters. You do not specify a length with LONGBLOB or <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a4c4198e10fa328e23de4cccfac355eef">LONGTEXT</a>.
  175. <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a693d7d1d546702a3efaa1e0df104e1eb">ENUM</a> - An enumeration, which is a fancy term for list. When defining an <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a693d7d1d546702a3efaa1e0df104e1eb">ENUM</a>,
  176. you are creating a list of items from which the value must be selected (or it
  177. can be NULL). For example, if you wanted your field to contain &quot;A&quot; or &quot;B&quot; or
  178. &quot;C&quot;, you would define your ENUM as ENUM (&#39;A&#39;, &#39;B&#39;, &#39;C&#39;) and only those values
  179. (or NULL) could ever populate that field.
  180. </pre></div> </div></div>
  181. <!--- window showing the filter options -->
  182. <div id="MSearchSelectWindow"
  183. onmouseover="return searchBox.OnSearchSelectShow()"
  184. onmouseout="return searchBox.OnSearchSelectHide()"
  185. onkeydown="return searchBox.OnSearchSelectKey(event)">
  186. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Defines</a></div>
  187. <!-- iframe showing the search results (closed by default) -->
  188. <div id="MSearchResultsWindow">
  189. <iframe src="" frameborder="0"
  190. name="MSearchResults" id="MSearchResults">
  191. </iframe>
  192. </div>
  193. <hr class="footer"/><address class="footer"><small>Generated on Mon Oct 31 2011 12:57:17 for WORM by&#160;
  194. <a href="http://www.doxygen.org/index.html">
  195. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
  196. </body>
  197. </html>