--- a/relpipe-data/examples-in-sql-selecting-existing-database.xml Thu May 21 01:23:23 2020 +0200
+++ b/relpipe-data/examples-in-sql-selecting-existing-database.xml Sat Jun 06 01:57:24 2020 +0200
@@ -10,16 +10,16 @@
<p>
Both the <code>relpipe-tr-sql</code> and <code>relpipe-in-sql</code>
- support the option <code>--file</code> and can store data in a file instead of just in-memory.
- Primary purpose of this option is to offload to HDD and be able to process more data whithout consuming too much RAM.
- So such file is usually a temporary one and is deleted immediately after the transformation.
- But we can also direct it to an existing file and append new relations to it.
- Or we can create a new file and do not delete it – using the <code>--file-keep true</code> option.
+ support options <code>--data-source-name</code> and <code>--data-source-string</code>
+ that can be used for connecting to a different database than the in-memory SQLite one.
+ This is useful if we want to offload to HDD and be able to process more data whithout consuming too much RAM.
+ Or if we want to access an existing database instead of just transforming records from the STDIN to STDOUT.
+ These options allow connecting to any DBMS.
</p>
<p>
Thus we can use the <code>relpipe-in-sql</code> as a database client to access existing SQLite files and SELECT from them (and then convert the results to any supported format).
- An we can use the <code>relpipe-tr-sql</code> as an output filter which converts relational data to a SQLite file that can be queried later.
+ And we can use the <code>relpipe-tr-sql</code> as an output filter which converts relational data to a SQLite file that can be queried later.
</p>
<p>
@@ -35,11 +35,11 @@
<m:pre jazyk="bash"><![CDATA[fossil clone http://www.sqlite.org/cgi/src sqlite.fossil]]></m:pre>
<p>
- We can then query it using <m:name/> tools:
+ We can then query the database file <code>sqlite.fossil</code> using <m:name/> tools:
</p>
<m:pre jazyk="bash"><![CDATA[relpipe-in-sql \
- --file sqlite.fossil \
+ --data-source-string 'Driver=SQLite3;Database=file:sqlite.fossil' \
--relation tickets "
SELECT
type,