<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/122783/">https://git.reviewboard.kde.org/r/122783/</a>
</td>
</tr>
</table>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/122783/diff/1/?file=352819#file352819line306" style="color: black; font-weight: bold; text-decoration: underline;">libs/db/expression.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool NArgExpr::validate(ParseInfo& parseInfo)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">257</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">parseInfo</span><span class="p">.</span><span class="n">errMsg</span> <span class="o">=</span> <span class="n">i18n</span><span class="p">(</span><span class="s">"<span class="hl">Three</span> arguments<span class="hl"> required</span>"</span><span class="p">);</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">306</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">parseInfo</span><span class="p">.</span><span class="n">errMsg</span> <span class="o">=</span> <span class="n">i18n</span><span class="p">(</span><span class="s">"<span class="hl">Incorrect number of</span> arguments"</span><span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Is it ok to change strings for minor version?</p></pre>
</div>
</div>
<br />
<p>- Adam Pigg</p>
<br />
<p>On March 3rd, 2015, 12:32 a.m. UTC, Jarosław Staniek wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Calligra, Andrius da Costa Ribas, Friedrich W. H. Kossebau, Adam Pigg, Roman Shtemberko, Radosław Wicik, and Wojciech Kosowicz.</div>
<div>By Jarosław Staniek.</div>
<p style="color: grey;"><i>Updated March 3, 2015, 12:32 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=333206">333206</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
calligra
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Kexi queries/parser: make SUBSTR(X, Y [, Z]) built-in SQL function work</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> While reviewing please skip sqlparser.cpp and sqlparser.h -- these are generated files </strong></p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This is a first step to make lots of functions work.
https://community.kde.org/Kexi/Plugins/Queries/SQL_Functions#Functions</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">For 2.9 the i18n() changes will be reverted, for master they will stay. The patch is against 2.9 for convenience of reviewers.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Details:
- add a few convenience functions to BaseExpr
- N-arg expressions: make token-to-string function support char tokens
- add KexiDBExpr_ArgumentList class ID for N-arg expressions (,,,,)
- FunctionExpr: compute type and validation for SUBSTR()
- parser: also support empty arg list "()" in functions</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Tested queries such as "SELECT substr(name, 5) FROM t" with .kexi files and mysql/pgsql server connections.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>libs/db/expression.cpp <span style="color: grey">(dffae8132a3f8917fa4584633369a3a5cb5dd045)</span></li>
<li>libs/db/field.cpp <span style="color: grey">(01ea956ef23ccd893dc9308031f6b422da2f79cf)</span></li>
<li>libs/db/parser/sqlparser.h <span style="color: grey">(b9b22cf308b994c6566e6fe524469d6e2ee2bf0b)</span></li>
<li>libs/db/parser/sqlparser.cpp <span style="color: grey">(e46a60d2171711a934d84bfb97fff2b8d63b749f)</span></li>
<li>libs/db/parser/sqlparser.y <span style="color: grey">(e8418a1210af8b3409cfe16e868c5c31b9908d8a)</span></li>
<li>libs/db/expression.h <span style="color: grey">(d283bf833a47e54bb21215a291183914dd53b04d)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/122783/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/03/03/64bc365b-b2cd-4768-811c-745db8546351__kexi-2.9-query-subst.png">Detailed validation of types</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>