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.
 
 
 
 

593 lines
46 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>WORM: WSql::WSqlDataType Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<script type="text/javascript">
function hasClass(ele,cls) {
return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}
function addClass(ele,cls) {
if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}
function removeClass(ele,cls) {
if (hasClass(ele,cls)) {
var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
ele.className=ele.className.replace(reg,' ');
}
}
function toggleVisibility(linkObj) {
var base = linkObj.getAttribute('id');
var summary = document.getElementById(base + '-summary');
var content = document.getElementById(base + '-content');
var trigger = document.getElementById(base + '-trigger');
if ( hasClass(linkObj,'closed') ) {
summary.style.display = 'none';
content.style.display = 'block';
trigger.src = 'open.png';
removeClass(linkObj,'closed');
addClass(linkObj,'opened');
} else if ( hasClass(linkObj,'opened') ) {
summary.style.display = 'block';
content.style.display = 'none';
trigger.src = 'closed.png';
removeClass(linkObj,'opened');
addClass(linkObj,'closed');
}
return false;
}
</script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="worm_sm.png"></td>
<td style="padding-left: 0.5em;">
<div id="projectname">WORM&#160;<span id="projectnumber">0.2</span></div>
<div id="projectbrief">A C++ DAL/ORM code generation framework</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespace_w_sql.html">WSql</a> </li>
<li class="navelem"><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html">WSqlDataType</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<h1>WSql::WSqlDataType Namespace Reference</h1> </div>
</div>
<div class="contents">
<p><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html" title="WSqlDataType namespace - Utilities and definitions of supported data types.">WSqlDataType</a> namespace - Utilities and definitions of supported data types.
<a href="#_details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11">Type</a> { <br/>
&#160;&#160;<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11afd7da9d673a98de4bfe0e81fbc683bdc">NOTYPE</a> = 0,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a2fa7f6e8be4f3f438461f01e8aacd76e">TINYINT</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a185153956d8bff78e071637d75518049">SMALLINT</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a5cd5fddf9f96a63b0e8fbab168793348">MEDIUMINT</a>,
<br/>
&#160;&#160;<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11afc4d0f8755ce336f16e9ecc467c29175">INT</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a18d7620211cfa3ba63be7f081fc0c181">BIGINT</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a82673be233e9f7a52bbb9e94f1ea526a">FLOAT</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad9d614c9575a0891342c3171fc2772e5">DOUBLE</a>,
<br/>
&#160;&#160;<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11aead2d4157138ca0913950d5efb1a2ca6">DECIMAL</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a2c6b3641a625bd3ff903a2c247b26517">DATE</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11abd11772d96be90ace717e22ba24bc71e">DATETIME</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a8f6410ee01071f02a1d75259e4a4120c">YEAR</a>,
<br/>
&#160;&#160;<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a1e863429b29d2e90ff60f8251017baef">TIME</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ab5c547c63dba19815e88b2cca05f4e32">TIMESTAMP</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad201db44c5e717fd7f5b6bb44ec2f26b">TIMESTAMPTZ</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11af83d87e0848372230d82996d24f6a0ce">CHAR</a>,
<br/>
&#160;&#160;<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad02611db29673467c36fbd4d267dccf8">VARCHAR</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a029fc7d905bf5861678e6b70243a8d3b">NCHAR</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a9ba3a20d5764d56030c82d7d3b343040">NVARCHAR</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e">TEXT</a>,
<br/>
&#160;&#160;<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a229e9a69a403ad69b83e3ffcc6cafbab">TINYTEXT</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a3ec0265b0cd32336a8cc6927706a97d6">MEDIUMTEXT</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a4c4198e10fa328e23de4cccfac355eef">LONGTEXT</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a693d7d1d546702a3efaa1e0df104e1eb">ENUM</a>,
<br/>
&#160;&#160;<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11af401375bb7dd3f09482e7a38df83230f">SET</a>,
<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a79b1e3c78a2aae4000205a6340120066">BLOB</a>
<br/>
}</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#a35fc6aeb59a9a430f53eb16069742573">toString</a> (<a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11">Type</a> type)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Covenience function - returns a string for the type. <a href="#a35fc6aeb59a9a430f53eb16069742573"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11">Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#acbadabc5065b07d87fac5fda92805847">toType</a> (std::string name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience function - translates a string to a type flag. <a href="#acbadabc5065b07d87fac5fda92805847"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aaf165908fa41cfac90c81102ebfca691">toSingular</a> (const std::string &amp;name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempt to return a singularized form of <em>name</em>. <a href="#aaf165908fa41cfac90c81102ebfca691"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#a39c84fd2f9796e1f4756cd39b1f5c8b3">toPlural</a> (const std::string &amp;name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempt to return a pluralized form of <em>name</em>. <a href="#a39c84fd2f9796e1f4756cd39b1f5c8b3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#a6e73fafea72a7bffa4b958703d66d1ef">columnNameToVariable</a> (const std::string &amp;columnname)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a suitable variable name transformed from <em>columnname</em>. <a href="#a6e73fafea72a7bffa4b958703d66d1ef"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#a7df7c11087d98b26ce4c09b03122a133">tableNameToClass</a> (const std::string &amp;tablename)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a transformed table name as a class name. <a href="#a7df7c11087d98b26ce4c09b03122a133"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const char *const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#a11608ed14a49ea34ea9b019b7d32dcdb">TypeNames</a> []</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const unsigned short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#a7df5a4da0b2d98b57550879481ecac16">number_of_datatypes</a> = 26</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of types supported. <a href="#a7df5a4da0b2d98b57550879481ecac16"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html" title="WSqlDataType namespace - Utilities and definitions of supported data types.">WSqlDataType</a> namespace - Utilities and definitions of supported data types. </p>
<p>This is a container for type flags and convenience functions for the supported SQL datatypes. In this namespace are definitions for datatypes, facilities for translating these to and from other naming conventions as well as facilities for generating transformations of datatypes into various strings used in the ORM generating classes.</p>
<p>This provides a central utility namespace for transformations and definitions related to data types as defined in DBMSs and C++, including ORM mapping of table names to class names, column names and types to variable names and types, etc.</p>
<p>Below is a list 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. Implementers of drivers can use this as a guide for translating types for a particular DBMS.</p>
<p>Writers of drivers must 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>
<p>See the following for more information on the specific data types: </p>
<div class="fragment"><pre class="fragment"> Note: these types are modeled after the MySQL data types (which seemed the broadest
and closest to ANSI standard). I include these notes <span class="keywordflow">for</span> reference only - they are
<span class="keywordflow">for</span> determining how types will be converted..(todo)
<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
allowable range is from -128 to 127. If <span class="keywordtype">unsigned</span>, the allowable range is from 0
to 255. You can specify a width of up to 4 digits.
<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
allowable range is from -32768 to 32767. If <span class="keywordtype">unsigned</span>, the allowable range is
from 0 to 65535. You can specify a width of up to 5 digits.
<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>,
the allowable range is from -8388608 to 8388607. If <span class="keywordtype">unsigned</span>, the allowable
range is from 0 to 16777215. You can specify a width of up to 9 digits.
<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
allowable range is from -2147483648 to 2147483647. If <span class="keywordtype">unsigned</span>, the allowable
range is from 0 to 4294967295. You can specify a width of up to 11 digits.
<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
allowable range is from -9223372036854775808 to 9223372036854775807. If
<span class="keywordtype">unsigned</span>, the allowable range is from 0 to 18446744073709551615. You can specify
a width of up to 11 digits.
<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
display length (M) and the number of decimals (D). This is not required and will
default to 10,2, where 2 is the number of decimals and 10 is the total number of
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>.
<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>.
You can define the display length (M) and the number of decimals (D). This is
not required and will default to 16,4, where 4 is the number of decimals.
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
<a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad9d614c9575a0891342c3171fc2772e5">DOUBLE</a>.
<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
unpacked decimals, each decimal corresponds to one byte. Defining the display
length (M) and the number of decimals (D) is required. NUMERIC is a synonym for
<a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11aead2d4157138ca0913950d5efb1a2ca6">DECIMAL</a>.
Date and Time Types:
<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
example, December 30th, 1973 would be stored as 1973-12-30.
<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
1000-01-01 00:00:00 and 9999-12-31 23:59:59. For example, 3:30 in the afternoon
on December 30th, 1973 would be stored as 1973-12-30 15:30:00.
<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.
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
numbers; 3:30 in the afternoon on December 30th, 1973 would be stored as
19731230153000 ( YYYYMMDDHHMMSS ).
<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.
<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
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
is specified as 4, YEAR can be 1901 to 2155. The default length is 4.
String Types:
<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
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.
Defining a length is not required, but the default is 1.
<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;
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.
<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
&quot;Binary Large Objects&quot; and are used to store large amounts of binary data, such
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
amounts of data; the difference between the two is that sorts and comparisons on
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>
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>.
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
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>.
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
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>.
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
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>.
<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>,
you are creating a list of items from which the value must be selected (or it
can be NULL). For example, if you wanted your field to contain &quot;A&quot; or &quot;B&quot; or
&quot;C&quot;, you would define your ENUM as ENUM (&#39;A&#39;, &#39;B&#39;, &#39;C&#39;) and only those values
(or NULL) could ever populate that field.
</pre></div> </div><hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11"></a><!-- doxytag: member="WSql::WSqlDataType::Type" ref="aa234580d74e3dfc10946a4ec8e317d11" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11">WSql::WSqlDataType::Type</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<ul>
<li>flags representing data types The types currently supported - adjust this if/when new strings are added. </li>
</ul>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11afd7da9d673a98de4bfe0e81fbc683bdc"></a><!-- doxytag: member="NOTYPE" ref="aa234580d74e3dfc10946a4ec8e317d11afd7da9d673a98de4bfe0e81fbc683bdc" args="" -->NOTYPE</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a2fa7f6e8be4f3f438461f01e8aacd76e"></a><!-- doxytag: member="TINYINT" ref="aa234580d74e3dfc10946a4ec8e317d11a2fa7f6e8be4f3f438461f01e8aacd76e" args="" -->TINYINT</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a185153956d8bff78e071637d75518049"></a><!-- doxytag: member="SMALLINT" ref="aa234580d74e3dfc10946a4ec8e317d11a185153956d8bff78e071637d75518049" args="" -->SMALLINT</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a5cd5fddf9f96a63b0e8fbab168793348"></a><!-- doxytag: member="MEDIUMINT" ref="aa234580d74e3dfc10946a4ec8e317d11a5cd5fddf9f96a63b0e8fbab168793348" args="" -->MEDIUMINT</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11afc4d0f8755ce336f16e9ecc467c29175"></a><!-- doxytag: member="INT" ref="aa234580d74e3dfc10946a4ec8e317d11afc4d0f8755ce336f16e9ecc467c29175" args="" -->INT</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a18d7620211cfa3ba63be7f081fc0c181"></a><!-- doxytag: member="BIGINT" ref="aa234580d74e3dfc10946a4ec8e317d11a18d7620211cfa3ba63be7f081fc0c181" args="" -->BIGINT</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a82673be233e9f7a52bbb9e94f1ea526a"></a><!-- doxytag: member="FLOAT" ref="aa234580d74e3dfc10946a4ec8e317d11a82673be233e9f7a52bbb9e94f1ea526a" args="" -->FLOAT</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11ad9d614c9575a0891342c3171fc2772e5"></a><!-- doxytag: member="DOUBLE" ref="aa234580d74e3dfc10946a4ec8e317d11ad9d614c9575a0891342c3171fc2772e5" args="" -->DOUBLE</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11aead2d4157138ca0913950d5efb1a2ca6"></a><!-- doxytag: member="DECIMAL" ref="aa234580d74e3dfc10946a4ec8e317d11aead2d4157138ca0913950d5efb1a2ca6" args="" -->DECIMAL</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a2c6b3641a625bd3ff903a2c247b26517"></a><!-- doxytag: member="DATE" ref="aa234580d74e3dfc10946a4ec8e317d11a2c6b3641a625bd3ff903a2c247b26517" args="" -->DATE</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11abd11772d96be90ace717e22ba24bc71e"></a><!-- doxytag: member="DATETIME" ref="aa234580d74e3dfc10946a4ec8e317d11abd11772d96be90ace717e22ba24bc71e" args="" -->DATETIME</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a8f6410ee01071f02a1d75259e4a4120c"></a><!-- doxytag: member="YEAR" ref="aa234580d74e3dfc10946a4ec8e317d11a8f6410ee01071f02a1d75259e4a4120c" args="" -->YEAR</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a1e863429b29d2e90ff60f8251017baef"></a><!-- doxytag: member="TIME" ref="aa234580d74e3dfc10946a4ec8e317d11a1e863429b29d2e90ff60f8251017baef" args="" -->TIME</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11ab5c547c63dba19815e88b2cca05f4e32"></a><!-- doxytag: member="TIMESTAMP" ref="aa234580d74e3dfc10946a4ec8e317d11ab5c547c63dba19815e88b2cca05f4e32" args="" -->TIMESTAMP</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11ad201db44c5e717fd7f5b6bb44ec2f26b"></a><!-- doxytag: member="TIMESTAMPTZ" ref="aa234580d74e3dfc10946a4ec8e317d11ad201db44c5e717fd7f5b6bb44ec2f26b" args="" -->TIMESTAMPTZ</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11af83d87e0848372230d82996d24f6a0ce"></a><!-- doxytag: member="CHAR" ref="aa234580d74e3dfc10946a4ec8e317d11af83d87e0848372230d82996d24f6a0ce" args="" -->CHAR</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11ad02611db29673467c36fbd4d267dccf8"></a><!-- doxytag: member="VARCHAR" ref="aa234580d74e3dfc10946a4ec8e317d11ad02611db29673467c36fbd4d267dccf8" args="" -->VARCHAR</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a029fc7d905bf5861678e6b70243a8d3b"></a><!-- doxytag: member="NCHAR" ref="aa234580d74e3dfc10946a4ec8e317d11a029fc7d905bf5861678e6b70243a8d3b" args="" -->NCHAR</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a9ba3a20d5764d56030c82d7d3b343040"></a><!-- doxytag: member="NVARCHAR" ref="aa234580d74e3dfc10946a4ec8e317d11a9ba3a20d5764d56030c82d7d3b343040" args="" -->NVARCHAR</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e"></a><!-- doxytag: member="TEXT" ref="aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e" args="" -->TEXT</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a229e9a69a403ad69b83e3ffcc6cafbab"></a><!-- doxytag: member="TINYTEXT" ref="aa234580d74e3dfc10946a4ec8e317d11a229e9a69a403ad69b83e3ffcc6cafbab" args="" -->TINYTEXT</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a3ec0265b0cd32336a8cc6927706a97d6"></a><!-- doxytag: member="MEDIUMTEXT" ref="aa234580d74e3dfc10946a4ec8e317d11a3ec0265b0cd32336a8cc6927706a97d6" args="" -->MEDIUMTEXT</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a4c4198e10fa328e23de4cccfac355eef"></a><!-- doxytag: member="LONGTEXT" ref="aa234580d74e3dfc10946a4ec8e317d11a4c4198e10fa328e23de4cccfac355eef" args="" -->LONGTEXT</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a693d7d1d546702a3efaa1e0df104e1eb"></a><!-- doxytag: member="ENUM" ref="aa234580d74e3dfc10946a4ec8e317d11a693d7d1d546702a3efaa1e0df104e1eb" args="" -->ENUM</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11af401375bb7dd3f09482e7a38df83230f"></a><!-- doxytag: member="SET" ref="aa234580d74e3dfc10946a4ec8e317d11af401375bb7dd3f09482e7a38df83230f" args="" -->SET</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa234580d74e3dfc10946a4ec8e317d11a79b1e3c78a2aae4000205a6340120066"></a><!-- doxytag: member="BLOB" ref="aa234580d74e3dfc10946a4ec8e317d11a79b1e3c78a2aae4000205a6340120066" args="" -->BLOB</em>&nbsp;</td><td>
</td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="wsqldatatype_8h_source.html#l00068">68</a> of file <a class="el" href="wsqldatatype_8h_source.html">wsqldatatype.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a6e73fafea72a7bffa4b958703d66d1ef"></a><!-- doxytag: member="WSql::WSqlDataType::columnNameToVariable" ref="a6e73fafea72a7bffa4b958703d66d1ef" args="(const std::string &amp;columnname)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static std::string WSql::WSqlDataType::columnNameToVariable </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>columnname</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a suitable variable name transformed from <em>columnname</em>. </p>
<p>This translates a column name as defined in a database to a variable name. A column name should have the format "name" or "some_name", eg. "user" or "order_id" - these will be rendered as "user" and "orderId". Note that in contrast to <a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#a7df7c11087d98b26ce4c09b03122a133" title="Returns a transformed table name as a class name.">tableNameToClass()</a> the first letter is not capitalized and plural are left plural.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">std::string</td><td>- columnname - the name to transform </td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
<table class="retval">
<tr><td class="paramname">std::string</td><td>- a string suitable for a variable name </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="wsqldatatype_8h_source.html#l00212">212</a> of file <a class="el" href="wsqldatatype_8h_source.html">wsqldatatype.h</a>.</p>
</div>
</div>
<a class="anchor" id="a7df7c11087d98b26ce4c09b03122a133"></a><!-- doxytag: member="WSql::WSqlDataType::tableNameToClass" ref="a7df7c11087d98b26ce4c09b03122a133" args="(const std::string &amp;tablename)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static std::string WSql::WSqlDataType::tableNameToClass </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>tablename</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a transformed table name as a class name. </p>
<p>This translates a table name as defined in a database to a class name. A table name should have the format "names" or "some_names", eg. "users" or "phone_numbers" - these will be rendered as "User" and "PhoneNumber". Note that in keeping with accepted convention the table names are plural; these will also be singularized; this results in the table "orders" being rendered as "Order" and "order_items" as "OrderItem"</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This assumes that tables are named according to convention as found also in Rails - tablenames without this convention are left as is - they will be rendered but may cause problems with class instance declarations in generated output.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">std::string</td><td>tablename - the name to transform </td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
<table class="retval">
<tr><td class="paramname">std::string</td><td>- a string suitable for a class name </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="wsqldatatype_8h_source.html#l00244">244</a> of file <a class="el" href="wsqldatatype_8h_source.html">wsqldatatype.h</a>.</p>
</div>
</div>
<a class="anchor" id="a39c84fd2f9796e1f4756cd39b1f5c8b3"></a><!-- doxytag: member="WSql::WSqlDataType::toPlural" ref="a39c84fd2f9796e1f4756cd39b1f5c8b3" args="(const std::string &amp;name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static std::string WSql::WSqlDataType::toPlural </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Attempt to return a pluralized form of <em>name</em>. </p>
<p><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000029">Todo:</a></b></dt><dd>make me a little smarter .. people, fish, sheep etc. </dd></dl>
</p>
<p>Definition at line <a class="el" href="wsqldatatype_8h_source.html#l00183">183</a> of file <a class="el" href="wsqldatatype_8h_source.html">wsqldatatype.h</a>.</p>
</div>
</div>
<a class="anchor" id="aaf165908fa41cfac90c81102ebfca691"></a><!-- doxytag: member="WSql::WSqlDataType::toSingular" ref="aaf165908fa41cfac90c81102ebfca691" args="(const std::string &amp;name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static std::string WSql::WSqlDataType::toSingular </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Attempt to return a singularized form of <em>name</em>. </p>
<p><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000028">Todo:</a></b></dt><dd>add intelligence: std::string cmp = boost::to_lower_copy(strToReturn); if(cmp.compare("people") .. or some such .. </dd></dl>
</p>
<p>Definition at line <a class="el" href="wsqldatatype_8h_source.html#l00157">157</a> of file <a class="el" href="wsqldatatype_8h_source.html">wsqldatatype.h</a>.</p>
</div>
</div>
<a class="anchor" id="a35fc6aeb59a9a430f53eb16069742573"></a><!-- doxytag: member="WSql::WSqlDataType::toString" ref="a35fc6aeb59a9a430f53eb16069742573" args="(Type type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static std::string WSql::WSqlDataType::toString </td>
<td>(</td>
<td class="paramtype">Type&#160;</td>
<td class="paramname"><em>type</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Covenience function - returns a string for the type. </p>
<p>Definition at line <a class="el" href="wsqldatatype_8h_source.html#l00133">133</a> of file <a class="el" href="wsqldatatype_8h_source.html">wsqldatatype.h</a>.</p>
</div>
</div>
<a class="anchor" id="acbadabc5065b07d87fac5fda92805847"></a><!-- doxytag: member="WSql::WSqlDataType::toType" ref="acbadabc5065b07d87fac5fda92805847" args="(std::string name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11">Type</a> WSql::WSqlDataType::toType </td>
<td>(</td>
<td class="paramtype">std::string&#160;</td>
<td class="paramname"><em>name</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convenience function - translates a string to a type flag. </p>
<p><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000027">Todo:</a></b></dt><dd>intelligence - support more type names, translate to ours .. </dd></dl>
</p>
<p>Definition at line <a class="el" href="wsqldatatype_8h_source.html#l00144">144</a> of file <a class="el" href="wsqldatatype_8h_source.html">wsqldatatype.h</a>.</p>
</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a7df5a4da0b2d98b57550879481ecac16"></a><!-- doxytag: member="WSql::WSqlDataType::number_of_datatypes" ref="a7df5a4da0b2d98b57550879481ecac16" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const unsigned short <a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#a7df5a4da0b2d98b57550879481ecac16">WSql::WSqlDataType::number_of_datatypes</a> = 26<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Number of types supported. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Change this if you add types!! </dd></dl>
<p>Definition at line <a class="el" href="wsqldatatype_8h_source.html#l00130">130</a> of file <a class="el" href="wsqldatatype_8h_source.html">wsqldatatype.h</a>.</p>
</div>
</div>
<a class="anchor" id="a11608ed14a49ea34ea9b019b7d32dcdb"></a><!-- doxytag: member="WSql::WSqlDataType::TypeNames" ref="a11608ed14a49ea34ea9b019b7d32dcdb" args="[]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* const <a class="el" href="namespace_w_sql_1_1_w_sql_data_type.html#a11608ed14a49ea34ea9b019b7d32dcdb">WSql::WSqlDataType::TypeNames</a>[]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment">{
<span class="stringliteral">&quot;NOTYPE&quot;</span>,
<span class="stringliteral">&quot;TINYINT&quot;</span>,
<span class="stringliteral">&quot;SMALLINT&quot;</span>,
<span class="stringliteral">&quot;MEDIUMINT&quot;</span>,
<span class="stringliteral">&quot;INT&quot;</span>,
<span class="stringliteral">&quot;BIGINT&quot;</span>,
<span class="stringliteral">&quot;FLOAT&quot;</span>,
<span class="stringliteral">&quot;DOUBLE&quot;</span>,
<span class="stringliteral">&quot;DECIMAL&quot;</span>,
<span class="stringliteral">&quot;DATE&quot;</span>,
<span class="stringliteral">&quot;DATETIME&quot;</span>,
<span class="stringliteral">&quot;TIME&quot;</span>,
<span class="stringliteral">&quot;YEAR&quot;</span>,
<span class="stringliteral">&quot;TIMESTAMP&quot;</span>,
<span class="stringliteral">&quot;TIMESTAMPTZ&quot;</span>,
<span class="stringliteral">&quot;CHAR&quot;</span>,
<span class="stringliteral">&quot;VARCHAR&quot;</span>,
<span class="stringliteral">&quot;NCHAR&quot;</span>,
<span class="stringliteral">&quot;NVARCHAR&quot;</span>,
<span class="stringliteral">&quot;TEXT&quot;</span>,
<span class="stringliteral">&quot;TINYTEXT&quot;</span>,
<span class="stringliteral">&quot;MEDIUMTEXT&quot;</span>,
<span class="stringliteral">&quot;LONGTEXT&quot;</span>,
<span class="stringliteral">&quot;ENUM&quot;</span>,
<span class="stringliteral">&quot;SET&quot;</span>,
<span class="stringliteral">&quot;BLOB&quot;</span>
}
</pre></div><p><em>TypeNames</em> - array of strings representing data types The types currently supported in handy string format - adjust this if/when new strings are added. </p>
<p>Definition at line <a class="el" href="wsqldatatype_8h_source.html#l00100">100</a> of file <a class="el" href="wsqldatatype_8h_source.html">wsqldatatype.h</a>.</p>
</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<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>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Nov 18 2011 21:01:46 for WORM by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>