examples: multiple relations in a single stream v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 08 Dec 2018 18:08:37 +0100
branchv_0
changeset 196 8dd5b7ecb736
parent 195 65138c5d5a7c
child 197 bba7480e0600
examples: multiple relations in a single stream
relpipe-data/examples.xml
--- a/relpipe-data/examples.xml	Fri Dec 07 22:01:46 2018 +0100
+++ b/relpipe-data/examples.xml	Sat Dec 08 18:08:37 2018 +0100
@@ -53,6 +53,33 @@
 			and then their definitions (names and types),
 			followed by the data.
 		</p>
+
+		<p>
+			A single stream may contain multiple relations:
+		</p>		
+		
+		<m:pre jazyk="bash"><![CDATA[(relpipe-in-cli generate a 1 x string hello; \
+ relpipe-in-cli generate b 1 y string world) \
+	| relpipe-out-tabular]]></m:pre>
+			
+		<p>
+			Thus we can combine various commands or files and pass the result to a single relational output filter (<code>relpipe-out-tabular</code> in this case) and get:
+		</p>
+		
+		<pre><![CDATA[a:
+ ╭────────────╮
+ │ x (string) │
+ ├────────────┤
+ │ hello      │
+ ╰────────────╯
+Record count: 1
+b:
+ ╭────────────╮
+ │ y (string) │
+ ├────────────┤
+ │ world      │
+ ╰────────────╯
+Record count: 1]]></pre>
 		
 		<h3>relpipe-in-cli: STDIN</h3>