1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
|
<HTML>
<HEAD>
<TITLE>class toSQLParse</TITLE>
<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
<TABLE BORDER="0">
<TR><TD valign="top" align="left" cellspacing="10">
<h1>class toSQLParse</h1>
</TD>
<TD valign="top" align="right" colspan="1"> A bunch of functions to parse and indent SQL text. <small><A HREF="#longdesc">More...</A></small></TD></TR>
</TABLE>
<HR>
<TABLE BORDER="0">
<TR><TH>Definition</TH><TD><code>#include <<A HREF="tosqlparse_h.html">tosqlparse.h</A>></code></TD></TR>
<TR><TH><A HREF="full-list-toSQLParse.html">List of all Methods</A></TH></TR>
</TABLE>
</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Types</h4><ul><LI>struct <A HREF="toSQLParse__settings.html">settings</A>
</LI>
<LI>class <A HREF="toSQLParse__statement.html">statement</A>
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <b><A HREF="#ref3">getToken</A></b> (<A HREF="toMarkedText.html">toMarkedText</A> *text,int &curLine,int &pos,bool forward=true,
bool comment=false)
</LI>
<LI>static <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <b><A HREF="#ref4">getToken</A></b> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &sql,int &line,int &pos,bool forward=true,
bool comment=false)
</LI>
<LI>static <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <b><A HREF="#ref5">getToken</A></b> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &sql,int &pos,bool forward=true,
bool comment=false)
</LI>
<LI>static std::list<statement> <b><A HREF="#ref6">parse</A></b> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &str)
</LI>
<LI>static std::list<statement> <b><A HREF="#ref7">parse</A></b> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &str,<A HREF="toConnection.html">toConnection</A> &conn)
</LI>
<LI>static <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <b><A HREF="#ref8">indent</A></b> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &str)
</LI>
<LI>static <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <b><A HREF="#ref9">indentStatement</A></b> (statement &stat,int level=0)
</LI>
<LI>static <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <b><A HREF="#ref10">indent</A></b> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &str,<A HREF="toConnection.html">toConnection</A> &conn)
</LI>
<LI>static <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <b><A HREF="#ref11">indentString</A></b> (int level)
</LI>
<LI>static int <b><A HREF="#ref12">countIndent</A></b> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &str,int &chars)
</LI>
<LI>static settings <b><A HREF="#ref15">getSetting</A></b> (void)
</LI>
<LI>static void <b><A HREF="#ref16">setSetting</A></b> (const settings &setting)
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p> A bunch of functions to parse and indent SQL text.
</p>
<A NAME="toSQLParse__settings.html"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td><strong>settings</strong> <small>(struct)</small></td><td align="right"><h3><strong>settings</strong></h3></td></tr></table><p></p><A NAME="toSQLParse__statement.html"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td><strong>statement</strong> <small>(class)</small></td><td align="right"><h3><strong>statement</strong></h3></td></tr></table><p></p><p> Structure the statement is parsed into.
</p>
<A NAME="getToken"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <strong>getToken</strong> (<A HREF="toMarkedText.html">toMarkedText</A> *text,int &curLine,int &pos,bool forward=true,
bool comment=false)
<br></td><td align="right"><h3><strong>getToken</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get next SQL token from an editor.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>text</i></TD><TD align="left" valign="top">Editor to get token from
</TD></TR>
<TR><TD align="left" valign="top"><i>curLine</i></TD><TD align="left" valign="top">Current line when parsing, modified when calling.
</TD></TR>
<TR><TD align="left" valign="top"><i>pos</i></TD><TD align="left" valign="top">Current position when parsing, modified when calling.
</TD></TR>
<TR><TD align="left" valign="top"><i>forward</i></TD><TD align="left" valign="top">If true go forward from current position, otherwise backward.
</TD></TR>
<TR><TD align="left" valign="top"><i>comment</i></TD><TD align="left" valign="top">Include comments as tokens.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: String with next token in editor
</p>
<A NAME="getToken"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <strong>getToken</strong> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &sql,int &line,int &pos,bool forward=true,
bool comment=false)
<br></td><td align="right"><h3><strong>getToken</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get next SQL token from a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to get token from
</TD></TR>
<TR><TD align="left" valign="top"><i>line</i></TD><TD align="left" valign="top">The line the current position is on. This is not needed, but only valid
if a correct value is passed into the function.
</TD></TR>
<TR><TD align="left" valign="top"><i>pos</i></TD><TD align="left" valign="top">Current position when parsing, modified when calling.
</TD></TR>
<TR><TD align="left" valign="top"><i>forward</i></TD><TD align="left" valign="top">If true go forward from current position, otherwise backward.
</TD></TR>
<TR><TD align="left" valign="top"><i>comment</i></TD><TD align="left" valign="top">Include comments as tokens.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: String with next token in editor
</p>
<A NAME="getToken"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <strong>getToken</strong> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &sql,int &pos,bool forward=true,
bool comment=false)
<br></td><td align="right"><h3><strong>getToken</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get next SQL token from a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to get token from
</TD></TR>
<TR><TD align="left" valign="top"><i>pos</i></TD><TD align="left" valign="top">Current position when parsing, modified when calling.
</TD></TR>
<TR><TD align="left" valign="top"><i>forward</i></TD><TD align="left" valign="top">If true go forward from current position, otherwise backward.
</TD></TR>
<TR><TD align="left" valign="top"><i>comment</i></TD><TD align="left" valign="top">Include comments as tokens.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: String with next token in editor
</p>
<A NAME="parse"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td> std::list<statement> <strong>parse</strong> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &str)
<br></td><td align="right"><h3><strong>parse</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Parse a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to parse.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Parsed statement tree.
</p>
<A NAME="parse"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td> std::list<statement> <strong>parse</strong> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &str,<A HREF="toConnection.html">toConnection</A> &conn)
<br></td><td align="right"><h3><strong>parse</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Parse a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to parse.
</TD></TR>
<TR><TD align="left" valign="top"><i>conn</i></TD><TD align="left" valign="top">Connection to determine SQL dialect. (For future use)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Parsed statement tree.
</p>
<A NAME="indent"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <strong>indent</strong> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &str)
<br></td><td align="right"><h3><strong>indent</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to indent.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: An indented string.
</p>
<A NAME="indentStatement"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <strong>indentStatement</strong> (statement &stat,int level=0)
<br></td><td align="right"><h3><strong>indentStatement</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a parse statement structure into a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>stat</i></TD><TD align="left" valign="top">Statement to indent.
</TD></TR>
<TR><TD align="left" valign="top"><i>level</i></TD><TD align="left" valign="top">Initial indentation level to use.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: A string with the indented statement.
</p>
<A NAME="indent"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <strong>indent</strong> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &str,<A HREF="toConnection.html">toConnection</A> &conn)
<br></td><td align="right"><h3><strong>indent</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to indent.
</TD></TR>
<TR><TD align="left" valign="top"><i>conn</i></TD><TD align="left" valign="top">Connection to determine SQL dialect. (For future use)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: An indented string.
</p>
<A NAME="indentString"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="http://doc.trolltech.com/qstring.html">QString</A> <strong>indentString</strong> (int level)
<br></td><td align="right"><h3><strong>indentString</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Create an indentation string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>level</i></TD><TD align="left" valign="top">Number of characters to indent.
</TD></TR>
</TABLE></P>
<A NAME="countIndent"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td> int <strong>countIndent</strong> (const <A HREF="http://doc.trolltech.com/qstring.html">QString</A> &str,int &chars)
<br></td><td align="right"><h3><strong>countIndent</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Count indentation level of a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to check.
</TD></TR>
<TR><TD align="left" valign="top"><i>chars</i></TD><TD align="left" valign="top">Position in string.
</TD></TR>
</TABLE></P>
<A NAME="getSetting"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td> settings <strong>getSetting</strong> (void)
<br></td><td align="right"><h3><strong>getSetting</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get current settings.
</p>
<A NAME="setSetting"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>setSetting</strong> (const settings &setting)
<br></td><td align="right"><h3><strong>setSetting</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get current settings.
</p>
<HR>
<table>
</table>
</BODY>
</HTML>
|