|
<!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: src/sql/wsqlcolumn.cpp Source File</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 <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 Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li class="current"><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="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<h1>src/sql/wsqlcolumn.cpp</h1> </div>
|
|
</div>
|
|
<div class="contents">
|
|
<a href="wsqlcolumn_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
|
|
<a name="l00002"></a>00002 <span class="comment"> WORM - a DAL/ORM code generation framework</span>
|
|
<a name="l00003"></a>00003 <span class="comment"> Copyright (C) 2011 Erik Winn <erikwinnmail@yahoo.com></span>
|
|
<a name="l00004"></a>00004 <span class="comment"></span>
|
|
<a name="l00005"></a>00005 <span class="comment"> This program is free software: you can redistribute it and/or modify</span>
|
|
<a name="l00006"></a>00006 <span class="comment"> it under the terms of the GNU General Public License as published by</span>
|
|
<a name="l00007"></a>00007 <span class="comment"> the Free Software Foundation, either version 3 of the License, or</span>
|
|
<a name="l00008"></a>00008 <span class="comment"> (at your option) any later version.</span>
|
|
<a name="l00009"></a>00009 <span class="comment"></span>
|
|
<a name="l00010"></a>00010 <span class="comment"> This program is distributed in the hope that it will be useful,</span>
|
|
<a name="l00011"></a>00011 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
|
|
<a name="l00012"></a>00012 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
|
|
<a name="l00013"></a>00013 <span class="comment"> GNU General Public License for more details.</span>
|
|
<a name="l00014"></a>00014 <span class="comment"></span>
|
|
<a name="l00015"></a>00015 <span class="comment"> You should have received a copy of the GNU General Public License</span>
|
|
<a name="l00016"></a>00016 <span class="comment"> along with this program. If not, see <http://www.gnu.org/licenses/>.</span>
|
|
<a name="l00017"></a>00017 <span class="comment">*/</span>
|
|
<a name="l00018"></a>00018
|
|
<a name="l00020"></a>00020 <span class="comment">// also, tests ..</span>
|
|
<a name="l00022"></a>00022 <span class="comment"></span>
|
|
<a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="wsqlcolumn_8h.html">wsqlcolumn.h</a>"</span>
|
|
<a name="l00024"></a>00024
|
|
<a name="l00025"></a>00025 <span class="keyword">namespace </span>WSql{
|
|
<a name="l00026"></a>00026
|
|
<a name="l00054"></a>00054 <a class="code" href="class_w_sql_1_1_w_sql_column.html#a8bc78eb4f65d120862a0324ab42c0918">WSqlColumn::WSqlColumn</a>()
|
|
<a name="l00055"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a8bc78eb4f65d120862a0324ab42c0918">00055</a> {
|
|
<a name="l00056"></a>00056 _columnName = std::string();
|
|
<a name="l00057"></a>00057 _variableName = std::string();
|
|
<a name="l00058"></a>00058 _isAutoIncremented = <span class="keyword">false</span>;
|
|
<a name="l00059"></a>00059 _isPrimaryKey = <span class="keyword">false</span>;
|
|
<a name="l00060"></a>00060 _isUnsigned = <span class="keyword">false</span>;
|
|
<a name="l00061"></a>00061 _canBeNull = <span class="keyword">true</span>; <span class="comment">//most dbms default .. </span>
|
|
<a name="l00062"></a>00062 _precision = 2;
|
|
<a name="l00063"></a>00063 _maxLength = -1;
|
|
<a name="l00064"></a>00064 _type = <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11afd7da9d673a98de4bfe0e81fbc683bdc">WSqlDataType::NOTYPE</a>;
|
|
<a name="l00065"></a>00065 }
|
|
<a name="l00066"></a>00066
|
|
<a name="l00067"></a>00067 <a class="code" href="class_w_sql_1_1_w_sql_column.html#a8bc78eb4f65d120862a0324ab42c0918">WSqlColumn::WSqlColumn</a>( <span class="keyword">const</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html" title="The WSqlColumn class represents a column in SQL database tables.">WSqlColumn</a>& other )
|
|
<a name="l00068"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#ad90fa7cdd5fb169e29080c8a653a07d5">00068</a> {
|
|
<a name="l00069"></a>00069 _columnName = other._columnName;
|
|
<a name="l00070"></a>00070 _variableName = other._variableName;
|
|
<a name="l00071"></a>00071 _isAutoIncremented = other._isAutoIncremented;
|
|
<a name="l00072"></a>00072 _isPrimaryKey = other._isPrimaryKey;
|
|
<a name="l00073"></a>00073 _isUnsigned = other._isUnsigned;
|
|
<a name="l00074"></a>00074 _canBeNull = other._canBeNull;
|
|
<a name="l00075"></a>00075 _precision = other._precision;
|
|
<a name="l00076"></a>00076 _maxLength = other._maxLength;
|
|
<a name="l00077"></a>00077 _type = other._type;
|
|
<a name="l00079"></a>00079 _default = other._default;
|
|
<a name="l00080"></a>00080 }
|
|
<a name="l00081"></a>00081
|
|
<a name="l00082"></a>00082 <a class="code" href="class_w_sql_1_1_w_sql_column.html#a174692b6631e4acaf3cab5847640d622">WSqlColumn::~WSqlColumn</a>()
|
|
<a name="l00083"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a174692b6631e4acaf3cab5847640d622">00083</a> {
|
|
<a name="l00084"></a>00084
|
|
<a name="l00085"></a>00085 }
|
|
<a name="l00089"></a>00089 <a class="code" href="class_w_sql_1_1_w_sql_column.html" title="The WSqlColumn class represents a column in SQL database tables.">WSqlColumn</a>& <a class="code" href="class_w_sql_1_1_w_sql_column.html#a68ef13cc4d81ef4dc21ff6575bfc1cfe">WSqlColumn::operator=</a>( <span class="keyword">const</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html" title="The WSqlColumn class represents a column in SQL database tables.">WSqlColumn</a> & other )
|
|
<a name="l00090"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a68ef13cc4d81ef4dc21ff6575bfc1cfe">00090</a> {
|
|
<a name="l00091"></a>00091 _columnName = other._columnName;
|
|
<a name="l00092"></a>00092 _variableName = other._variableName;
|
|
<a name="l00093"></a>00093 _isAutoIncremented = other._isAutoIncremented;
|
|
<a name="l00094"></a>00094 _isPrimaryKey = other._isPrimaryKey;
|
|
<a name="l00095"></a>00095 _isUnsigned = other._isUnsigned;
|
|
<a name="l00096"></a>00096 _canBeNull = other._canBeNull;
|
|
<a name="l00097"></a>00097 _precision = other._precision;
|
|
<a name="l00098"></a>00098 _maxLength = other._maxLength;
|
|
<a name="l00099"></a>00099 _type = other._type;
|
|
<a name="l00100"></a>00100 _default = other._default;
|
|
<a name="l00101"></a>00101 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
|
|
<a name="l00102"></a>00102 }
|
|
<a name="l00103"></a>00103
|
|
<a name="l00113"></a>00113 <span class="keywordtype">bool</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html#a8e7eeb7567c681d0a489b6c2210866f6">WSqlColumn::operator==</a>( <span class="keyword">const</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html" title="The WSqlColumn class represents a column in SQL database tables.">WSqlColumn</a>& other )<span class="keyword"> const</span>
|
|
<a name="l00114"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a8e7eeb7567c681d0a489b6c2210866f6">00114</a> <span class="keyword"></span>{
|
|
<a name="l00115"></a>00115 <span class="keywordflow">return</span> ( _columnName == other._columnName
|
|
<a name="l00116"></a>00116 && _variableName == other._variableName
|
|
<a name="l00117"></a>00117 && _isAutoIncremented == other._isAutoIncremented
|
|
<a name="l00118"></a>00118 && _isPrimaryKey == other._isPrimaryKey
|
|
<a name="l00119"></a>00119 && _isUnsigned == other._isUnsigned
|
|
<a name="l00120"></a>00120 && _canBeNull == other._canBeNull
|
|
<a name="l00121"></a>00121 && _maxLength == other._maxLength
|
|
<a name="l00122"></a>00122 && _precision == other._precision
|
|
<a name="l00123"></a>00123 && _default == other._default
|
|
<a name="l00124"></a>00124 && _type == other._type
|
|
<a name="l00125"></a>00125 );
|
|
<a name="l00126"></a>00126 }
|
|
<a name="l00127"></a>00127
|
|
<a name="l00136"></a>00136 <span class="keywordtype">void</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html#a1c346bc7c3fff1c4733deb8b1a400aa5">WSqlColumn::setPrecision</a>(<span class="keywordtype">int</span> precision)
|
|
<a name="l00137"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a1c346bc7c3fff1c4733deb8b1a400aa5">00137</a> {
|
|
<a name="l00138"></a>00138 _precision = <a class="code" href="class_w_sql_1_1_w_sql_column.html#a1cdfad0f1e895e3e6a2b8e1d4e65e84d">precision</a>;
|
|
<a name="l00139"></a>00139 }
|
|
<a name="l00140"></a>00140
|
|
<a name="l00154"></a>00154 <span class="keywordtype">void</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html#a58d480ea870d66ed50bb09549d321ced">WSqlColumn::setDataType</a>(<a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11">WSqlDataType::Type</a> type)
|
|
<a name="l00155"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a58d480ea870d66ed50bb09549d321ced">00155</a> {
|
|
<a name="l00156"></a>00156 _type = <a class="code" href="class_w_sql_1_1_w_sql_column.html#ab95bd2f84a51643a608da0e1703cbeae">type</a>;
|
|
<a name="l00157"></a>00157 }
|
|
<a name="l00158"></a>00158
|
|
<a name="l00159"></a>00159
|
|
<a name="l00171"></a>00171 <span class="keywordtype">void</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html#afbfa7bbade6aa3ea53603181edc07a82" title="Set the column name to be name.">WSqlColumn::setColumnName</a>(<span class="keyword">const</span> std::string& name)
|
|
<a name="l00172"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#afbfa7bbade6aa3ea53603181edc07a82">00172</a> {
|
|
<a name="l00173"></a>00173 _columnName = name;
|
|
<a name="l00174"></a>00174 _variableName = <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#a6e73fafea72a7bffa4b958703d66d1ef" title="Returns a suitable variable name transformed from columnname.">WSqlDataType::columnNameToVariable</a>(name);
|
|
<a name="l00175"></a>00175 }
|
|
<a name="l00191"></a>00191 <span class="keywordtype">void</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html#a9920af02af124b3966b5f2963cd8c2d5" title="Manually set the variableName to name.">WSqlColumn::setVariableName</a>(<span class="keyword">const</span> std::string& name)
|
|
<a name="l00192"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a9920af02af124b3966b5f2963cd8c2d5">00192</a> {
|
|
<a name="l00193"></a>00193 _variableName = name;
|
|
<a name="l00194"></a>00194 }
|
|
<a name="l00195"></a>00195
|
|
<a name="l00200"></a>00200 <span class="keyword">const</span> std::string& <a class="code" href="class_w_sql_1_1_w_sql_column.html#a44843e71b5805c2287e00df46185eb71">WSqlColumn::columnName</a>()<span class="keyword"> const</span>
|
|
<a name="l00201"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a44843e71b5805c2287e00df46185eb71">00201</a> <span class="keyword"></span>{
|
|
<a name="l00202"></a>00202 <span class="keywordflow">return</span> _columnName;
|
|
<a name="l00203"></a>00203 }
|
|
<a name="l00208"></a>00208 <span class="keyword">const</span> std::string& <a class="code" href="class_w_sql_1_1_w_sql_column.html#afab2d8547585c99c4dfefaa8200e0381">WSqlColumn::variableName</a>()<span class="keyword"> const</span>
|
|
<a name="l00209"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#afab2d8547585c99c4dfefaa8200e0381">00209</a> <span class="keyword"></span>{
|
|
<a name="l00210"></a>00210 <span class="keywordflow">return</span> _variableName;
|
|
<a name="l00211"></a>00211 }
|
|
<a name="l00212"></a>00212
|
|
<a name="l00220"></a>00220 <span class="keyword">const</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11">WSqlDataType::Type</a> <a class="code" href="class_w_sql_1_1_w_sql_column.html#ab95bd2f84a51643a608da0e1703cbeae">WSqlColumn::type</a>()<span class="keyword"> const</span>
|
|
<a name="l00221"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#ab95bd2f84a51643a608da0e1703cbeae">00221</a> <span class="keyword"></span>{
|
|
<a name="l00222"></a>00222 <span class="keywordflow">return</span> _type;
|
|
<a name="l00223"></a>00223 }
|
|
<a name="l00224"></a>00224
|
|
<a name="l00232"></a>00232 <span class="keywordtype">bool</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html#a8d6cb49198c3215c1b8542ba9ea0f16b">WSqlColumn::canBeNull</a>()<span class="keyword"> const</span>
|
|
<a name="l00233"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a8d6cb49198c3215c1b8542ba9ea0f16b">00233</a> <span class="keyword"></span>{
|
|
<a name="l00234"></a>00234 <span class="keywordflow">return</span>( _isAutoIncremented || _canBeNull);
|
|
<a name="l00235"></a>00235 }
|
|
<a name="l00236"></a>00236
|
|
<a name="l00244"></a>00244 <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html#a46eac3f4c5a14bf24bbac67a02787b8b">WSqlColumn::maxLength</a>()<span class="keyword"> const</span>
|
|
<a name="l00245"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a46eac3f4c5a14bf24bbac67a02787b8b">00245</a> <span class="keyword"></span>{
|
|
<a name="l00246"></a>00246 <span class="keywordflow">return</span> _maxLength;
|
|
<a name="l00247"></a>00247 }
|
|
<a name="l00248"></a>00248
|
|
<a name="l00254"></a>00254 <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html#a1cdfad0f1e895e3e6a2b8e1d4e65e84d">WSqlColumn::precision</a>()<span class="keyword"> const</span>
|
|
<a name="l00255"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a1cdfad0f1e895e3e6a2b8e1d4e65e84d">00255</a> <span class="keyword"></span>{
|
|
<a name="l00256"></a>00256 <span class="keywordflow">return</span> _precision;
|
|
<a name="l00257"></a>00257 }
|
|
<a name="l00261"></a>00261 std::string <a class="code" href="class_w_sql_1_1_w_sql_column.html#afb004b76eddb9fb177082d216211497d" title="Returns a C++ type declaration This method returns a string suitable for a type declaration of a vari...">WSqlColumn::typeDeclaration</a>()<span class="keyword"> const</span>
|
|
<a name="l00262"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#afb004b76eddb9fb177082d216211497d">00262</a> <span class="keyword"></span>{
|
|
<a name="l00263"></a>00263 std::string strToReturn;
|
|
<a name="l00264"></a>00264 <span class="keywordflow">switch</span>(_type){
|
|
<a name="l00265"></a>00265 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a029fc7d905bf5861678e6b70243a8d3b">WSqlDataType::NCHAR</a>:
|
|
<a name="l00266"></a>00266 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11af83d87e0848372230d82996d24f6a0ce">WSqlDataType::CHAR</a>:
|
|
<a name="l00267"></a>00267 strToReturn = <span class="stringliteral">"char"</span>;
|
|
<a name="l00268"></a>00268 <span class="keywordflow">break</span>;
|
|
<a name="l00269"></a>00269 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e">WSqlDataType::TEXT</a>:
|
|
<a name="l00270"></a>00270 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a229e9a69a403ad69b83e3ffcc6cafbab">WSqlDataType::TINYTEXT</a>:
|
|
<a name="l00271"></a>00271 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a4c4198e10fa328e23de4cccfac355eef">WSqlDataType::LONGTEXT</a>:
|
|
<a name="l00272"></a>00272 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a3ec0265b0cd32336a8cc6927706a97d6">WSqlDataType::MEDIUMTEXT</a>:
|
|
<a name="l00273"></a>00273 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad02611db29673467c36fbd4d267dccf8">WSqlDataType::VARCHAR</a>:
|
|
<a name="l00274"></a>00274 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a9ba3a20d5764d56030c82d7d3b343040">WSqlDataType::NVARCHAR</a>:
|
|
<a name="l00275"></a>00275 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a2c6b3641a625bd3ff903a2c247b26517">WSqlDataType::DATE</a>:
|
|
<a name="l00276"></a>00276 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11abd11772d96be90ace717e22ba24bc71e">WSqlDataType::DATETIME</a>:
|
|
<a name="l00277"></a>00277 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a8f6410ee01071f02a1d75259e4a4120c">WSqlDataType::YEAR</a>:
|
|
<a name="l00278"></a>00278 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a1e863429b29d2e90ff60f8251017baef">WSqlDataType::TIME</a>:
|
|
<a name="l00279"></a>00279 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ab5c547c63dba19815e88b2cca05f4e32">WSqlDataType::TIMESTAMP</a>:
|
|
<a name="l00280"></a>00280 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad201db44c5e717fd7f5b6bb44ec2f26b">WSqlDataType::TIMESTAMPTZ</a>:
|
|
<a name="l00281"></a>00281 strToReturn = <span class="stringliteral">"std::string"</span>;
|
|
<a name="l00282"></a>00282 <span class="keywordflow">break</span>;
|
|
<a name="l00283"></a>00283 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a2fa7f6e8be4f3f438461f01e8aacd76e">WSqlDataType::TINYINT</a>:
|
|
<a name="l00284"></a>00284 strToReturn = <span class="stringliteral">"short"</span>;
|
|
<a name="l00285"></a>00285 <span class="keywordflow">break</span>;
|
|
<a name="l00286"></a>00286 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a185153956d8bff78e071637d75518049">WSqlDataType::SMALLINT</a>:
|
|
<a name="l00287"></a>00287 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a5cd5fddf9f96a63b0e8fbab168793348">WSqlDataType::MEDIUMINT</a>:
|
|
<a name="l00288"></a>00288 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11afc4d0f8755ce336f16e9ecc467c29175">WSqlDataType::INT</a>:
|
|
<a name="l00289"></a>00289 strToReturn = <span class="stringliteral">"int"</span>;
|
|
<a name="l00290"></a>00290 <span class="keywordflow">break</span>;
|
|
<a name="l00291"></a>00291 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a18d7620211cfa3ba63be7f081fc0c181">WSqlDataType::BIGINT</a>:
|
|
<a name="l00292"></a>00292 strToReturn = <span class="stringliteral">"long"</span>;
|
|
<a name="l00293"></a>00293 <span class="keywordflow">break</span>;
|
|
<a name="l00294"></a>00294 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a82673be233e9f7a52bbb9e94f1ea526a">WSqlDataType::FLOAT</a>:
|
|
<a name="l00295"></a>00295 strToReturn = <span class="stringliteral">"float"</span>;
|
|
<a name="l00296"></a>00296 <span class="keywordflow">break</span>;
|
|
<a name="l00297"></a>00297 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11aead2d4157138ca0913950d5efb1a2ca6">WSqlDataType::DECIMAL</a>:
|
|
<a name="l00298"></a>00298 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad9d614c9575a0891342c3171fc2772e5">WSqlDataType::DOUBLE</a>:
|
|
<a name="l00299"></a>00299 strToReturn = <span class="stringliteral">"double"</span>;
|
|
<a name="l00300"></a>00300 <span class="keywordflow">break</span>;
|
|
<a name="l00301"></a>00301 <span class="keywordflow">default</span>:
|
|
<a name="l00302"></a>00302 strToReturn = <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#a35fc6aeb59a9a430f53eb16069742573" title="Covenience function - returns a string for the type.">WSqlDataType::toString</a>(_type);
|
|
<a name="l00303"></a>00303 }
|
|
<a name="l00304"></a>00304 <span class="keywordflow">return</span> strToReturn;
|
|
<a name="l00305"></a>00305 }
|
|
<a name="l00308"></a>00308 <span class="keywordtype">bool</span> <a class="code" href="class_w_sql_1_1_w_sql_column.html#a0ffeba97afa732ae7ae9be327b6e517b" title="Returns true if the datatype of the column is supported by the ORM generator.">WSqlColumn::typeIsSupported</a>()<span class="keyword"> const</span>
|
|
<a name="l00309"></a><a class="code" href="class_w_sql_1_1_w_sql_column.html#a0ffeba97afa732ae7ae9be327b6e517b">00309</a> <span class="keyword"></span>{
|
|
<a name="l00310"></a>00310 <span class="keywordflow">switch</span>(_type){
|
|
<a name="l00311"></a>00311 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a029fc7d905bf5861678e6b70243a8d3b">WSqlDataType::NCHAR</a>:
|
|
<a name="l00312"></a>00312 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11af83d87e0848372230d82996d24f6a0ce">WSqlDataType::CHAR</a>:
|
|
<a name="l00313"></a>00313 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad0523af90d4025e99f05182cac18863e">WSqlDataType::TEXT</a>:
|
|
<a name="l00314"></a>00314 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a229e9a69a403ad69b83e3ffcc6cafbab">WSqlDataType::TINYTEXT</a>:
|
|
<a name="l00315"></a>00315 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a4c4198e10fa328e23de4cccfac355eef">WSqlDataType::LONGTEXT</a>:
|
|
<a name="l00316"></a>00316 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a3ec0265b0cd32336a8cc6927706a97d6">WSqlDataType::MEDIUMTEXT</a>:
|
|
<a name="l00317"></a>00317 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad02611db29673467c36fbd4d267dccf8">WSqlDataType::VARCHAR</a>:
|
|
<a name="l00318"></a>00318 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a9ba3a20d5764d56030c82d7d3b343040">WSqlDataType::NVARCHAR</a>:
|
|
<a name="l00319"></a>00319 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a2c6b3641a625bd3ff903a2c247b26517">WSqlDataType::DATE</a>:
|
|
<a name="l00320"></a>00320 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11abd11772d96be90ace717e22ba24bc71e">WSqlDataType::DATETIME</a>:
|
|
<a name="l00321"></a>00321 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a8f6410ee01071f02a1d75259e4a4120c">WSqlDataType::YEAR</a>:
|
|
<a name="l00322"></a>00322 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a1e863429b29d2e90ff60f8251017baef">WSqlDataType::TIME</a>:
|
|
<a name="l00323"></a>00323 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ab5c547c63dba19815e88b2cca05f4e32">WSqlDataType::TIMESTAMP</a>:
|
|
<a name="l00324"></a>00324 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad201db44c5e717fd7f5b6bb44ec2f26b">WSqlDataType::TIMESTAMPTZ</a>:
|
|
<a name="l00325"></a>00325 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a2fa7f6e8be4f3f438461f01e8aacd76e">WSqlDataType::TINYINT</a>:
|
|
<a name="l00326"></a>00326 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a185153956d8bff78e071637d75518049">WSqlDataType::SMALLINT</a>:
|
|
<a name="l00327"></a>00327 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a5cd5fddf9f96a63b0e8fbab168793348">WSqlDataType::MEDIUMINT</a>:
|
|
<a name="l00328"></a>00328 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11afc4d0f8755ce336f16e9ecc467c29175">WSqlDataType::INT</a>:
|
|
<a name="l00329"></a>00329 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a18d7620211cfa3ba63be7f081fc0c181">WSqlDataType::BIGINT</a>:
|
|
<a name="l00330"></a>00330 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11a82673be233e9f7a52bbb9e94f1ea526a">WSqlDataType::FLOAT</a>:
|
|
<a name="l00331"></a>00331 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11aead2d4157138ca0913950d5efb1a2ca6">WSqlDataType::DECIMAL</a>:
|
|
<a name="l00332"></a>00332 <span class="keywordflow">case</span> <a class="code" href="namespace_w_sql_1_1_w_sql_data_type.html#aa234580d74e3dfc10946a4ec8e317d11ad9d614c9575a0891342c3171fc2772e5">WSqlDataType::DOUBLE</a>:
|
|
<a name="l00333"></a>00333 <span class="keywordflow">return</span> <span class="keyword">true</span>;
|
|
<a name="l00334"></a>00334 <span class="keywordflow">default</span>:
|
|
<a name="l00335"></a>00335 <span class="keywordflow">return</span> <span class="keyword">false</span>;
|
|
<a name="l00336"></a>00336 }
|
|
<a name="l00337"></a>00337 }
|
|
<a name="l00338"></a>00338
|
|
<a name="l00339"></a>00339 <span class="comment">// template<> std::string WSqlColumn::defaultValue<std::string>()</span>
|
|
<a name="l00340"></a>00340 <span class="comment">// {</span>
|
|
<a name="l00341"></a>00341 <span class="comment">// return _default.data<std::string>();</span>
|
|
<a name="l00342"></a>00342 <span class="comment">// };</span>
|
|
<a name="l00343"></a>00343
|
|
<a name="l00355"></a>00355 }<span class="comment">//namespace WSql</span>
|
|
</pre></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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </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:45 for WORM by 
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
|
|
</body>
|
|
</html>
|