Skip to content

Commit d9a559d

Browse files
committed
Updated DatabaseLibrary.html
1 parent d646f25 commit d9a559d

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

doc/DatabaseLibrary.html

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ <h2>Shortcuts</h2>
221221
&nbsp;&middot;&nbsp;
222222
<a href="#Disconnect From Database" title="Disconnects from the database.">Disconnect&nbsp;From&nbsp;Database</a>
223223
&nbsp;&middot;&nbsp;
224+
<a href="#Execute Sql Script" title="Executes the content of the `sqlScriptFileName` as SQL commands. ">Execute&nbsp;Sql&nbsp;Script</a>
225+
&nbsp;&middot;&nbsp;
224226
<a href="#Query" title="Uses the input `selectStatement` to query for the values that ">Query</a>
225227
</div>
226228

@@ -415,6 +417,27 @@ <h2>Keywords</h2>
415417
</table>
416418
</td>
417419
</tr>
420+
<tr>
421+
<td class="kw"><a name="Execute Sql Script"></a>Execute Sql Script</td>
422+
<td class="arg">sqlScriptFileName</td>
423+
<td class="doc">Executes the content of the <span class="name">sqlScriptFileName</span> as SQL commands. Useful for setting the database to a known state before running your tests, or clearing out your test data after running each a test.<br />
424+
<br />
425+
SQL commands are expected to be delimited by a semi-colon (';').<br />
426+
<br />
427+
For example: delete from person_employee_table; delete from person_table; delete from employee_table;<br />
428+
<br />
429+
Also, the last SQL command can optionally omit its trailing semi-colon.<br />
430+
<br />
431+
For example: delete from person_employee_table; delete from person_table; delete from employee_table<br />
432+
<br />
433+
Given this, that means you can create spread your SQL commands in several lines.<br />
434+
<br />
435+
For example: delete from person_employee_table; delete from person_table; delete from employee_table<br />
436+
<br />
437+
However, lines that starts with a number sign (<span class="name">#</span>) are treated as a commented line. Thus, none of the contents of that line will be executed.<br />
438+
<br />
439+
For example: # Delete the bridging table first... delete from person_employee_table; # ...and then the bridged tables. delete from person_table; delete from employee_table</td>
440+
</tr>
418441
<tr>
419442
<td class="kw"><a name="Query"></a>Query</td>
420443
<td class="arg">selectStatement</td>
@@ -470,9 +493,9 @@ <h2>Keywords</h2>
470493
</tr>
471494
</table>
472495
<p id="footer">
473-
Altogether 5 keywords.<br />
496+
Altogether 6 keywords.<br />
474497
Generated by <a href="http://code.google.com/p/robotframework/wiki/LibraryDocumentationTool">libdoc.py</a>
475-
on 2010-11-30 00:32:13.
498+
on 2011-01-12 04:41:28.
476499
</p>
477500
</body>
478501
</html>

0 commit comments

Comments
 (0)