/usr/share/gtk-doc/html/libgda-5.0/gda-sql-manual-icommands.html is in libgda-5.0-doc 5.2.4-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Detailed features: GNOME Data Access 5 manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNOME Data Access 5 manual">
<link rel="up" href="gda-sql.html" title="Part VII. Gda SQL console's user manual">
<link rel="prev" href="ch41s02.html" title="Meta data">
<link rel="next" href="ch42s02.html" title="Internal parameters">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gda-sql.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch41s02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ch42s02.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="gda-sql-manual-icommands"></a>Detailed features</h2></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="sect1"><a href="gda-sql-manual-icommands.html#id-1.8.7.3">Query buffer</a></span></dt>
<dt><span class="sect1"><a href="ch42s02.html">Internal parameters</a></span></dt>
<dt><span class="sect1"><a href="ch42s03.html">Embedded HTTP server</a></span></dt>
<dt><span class="sect1"><a href="ch42s04.html">Environment variables</a></span></dt>
</dl></div>
<p>
This section explains in depth various aspects of the console tool.
</p>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.8.7.3"></a>Query buffer</h2></div></div></div>
<p>
Everytime an SQL command is entered, it is stored in the query buffer associated to the current connection.
The query buffer can be edited using an external editor (which can be useful for multi line SQL statements) using
the <span class="command"><strong>.e</strong></span> command. The query buffer can also be saved to a file and loaded back later using the
<span class="command"><strong>.qw</strong></span> and <span class="command"><strong>.qr</strong></span> commands. To execute the SQL held in the current query buffer,
use the <span class="command"><strong>.g</strong></span> command.
</p>
<p>
Query buffers can be saved to the dictionary (along with the connection's meta data) for future usage using the
<span class="command"><strong>.qs buffer_name</strong></span> command, and loaded back later with the <span class="command"><strong>.ql buffer_name</strong></span>.
To list all the saved query buffers in the dictionary, use the <span class="command"><strong>.qa</strong></span> command. The following example
shows an example output of the <span class="command"><strong>.qa</strong></span> command where one query buffer has been saved:
</p>
<pre class="programlisting">
SalesTest> .qa
Query buffer name | SQL
------------------+---------------------------------------------------------------------------------------
orders_status | select c.name, o.creation_date ,
(select count (product_ref) from order_contents oc where oc.order_id=o.id) as '#items'
from customers c
inner join orders o on (o.customer = c.id)
order by o.creation_date;
(1 row)
SalesTest>
</pre>
<p>
</p>
<p>
The <span class="command"><strong>.g</strong></span> command can also be used to load a query buffer and execute its contents simply
by passing the name of the query buffer to use as argument:
</p>
<pre class="programlisting">
SalesTest> .g orders_status
name | creation_date | #items
---------------+---------------+-------
Lew Bonito | 2003-06-28 | 1
Lew Bonito | 2004-02-02 | 2
Mark Lawrencep | 2004-02-02 | 2
Mark Lawrencep | 2004-02-02 | 0
Greg Popoff | 2004-02-02 | 1
Ed Lamton | 2006-02-04 | 0
Ed Lamton | 2006-02-05 | 0
Ed Lamton | 2006-02-05 | 0
Ed Lamton | 2006-03-29 | 0
(9 rows)
SalesTest>
</pre>
<p>
</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
|