alf-shell 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +35 -0
- data/LICENCE.md +22 -0
- data/Manifest.txt +13 -0
- data/README.md +11 -0
- data/Rakefile +11 -0
- data/bin/alf +17 -0
- data/lib/alf-shell.rb +1 -0
- data/lib/alf/shell.rb +48 -0
- data/lib/alf/shell/command.rb +21 -0
- data/lib/alf/shell/command/exec.rb +16 -0
- data/lib/alf/shell/command/help.rb +30 -0
- data/lib/alf/shell/command/main.rb +175 -0
- data/lib/alf/shell/command/show.rb +49 -0
- data/lib/alf/shell/doc_manager.rb +83 -0
- data/lib/alf/shell/ext/signature.rb +45 -0
- data/lib/alf/shell/from_argv.rb +78 -0
- data/lib/alf/shell/loader.rb +2 -0
- data/lib/alf/shell/operator.rb +63 -0
- data/lib/alf/shell/support.rb +28 -0
- data/lib/alf/shell/version.rb +16 -0
- data/spec/integration/__database__/group.alf +3 -0
- data/spec/integration/__database__/parts.rash +6 -0
- data/spec/integration/__database__/suppliers.rash +5 -0
- data/spec/integration/__database__/suppliers_csv.csv +6 -0
- data/spec/integration/__database__/supplies.rash +12 -0
- data/spec/integration/alf/alf.db +0 -0
- data/spec/integration/alf/alf_db.cmd +1 -0
- data/spec/integration/alf/alf_db.stdout +5 -0
- data/spec/integration/alf/alf_e.cmd +1 -0
- data/spec/integration/alf/alf_e.stdout +4 -0
- data/spec/integration/alf/alf_help.cmd +1 -0
- data/spec/integration/alf/alf_help.stdout +72 -0
- data/spec/integration/alf/alf_json.cmd +1 -0
- data/spec/integration/alf/alf_json.stdout +1 -0
- data/spec/integration/alf/alf_r.cmd +1 -0
- data/spec/integration/alf/alf_r.stdout +5 -0
- data/spec/integration/alf/alf_version.cmd +1 -0
- data/spec/integration/alf/alf_version.stdout +2 -0
- data/spec/integration/alf/alf_yaml.cmd +1 -0
- data/spec/integration/alf/alf_yaml.stdout +22 -0
- data/spec/integration/alf/rel.rash +1 -0
- data/spec/integration/autonum/autonum_0.cmd +1 -0
- data/spec/integration/autonum/autonum_0.stdout +9 -0
- data/spec/integration/autonum/autonum_1.cmd +1 -0
- data/spec/integration/autonum/autonum_1.stdout +9 -0
- data/spec/integration/clip/clip_0.cmd +1 -0
- data/spec/integration/clip/clip_0.stdout +9 -0
- data/spec/integration/clip/clip_1.cmd +1 -0
- data/spec/integration/clip/clip_1.stdout +9 -0
- data/spec/integration/coerce/coerce_1.cmd +1 -0
- data/spec/integration/coerce/coerce_1.stdout +5 -0
- data/spec/integration/compact/compact_0.cmd +1 -0
- data/spec/integration/compact/compact_0.stdout +9 -0
- data/spec/integration/defaults/defaults_0.cmd +1 -0
- data/spec/integration/defaults/defaults_0.stdout +9 -0
- data/spec/integration/defaults/defaults_1.cmd +1 -0
- data/spec/integration/defaults/defaults_1.stdout +9 -0
- data/spec/integration/defaults/defaults_2.cmd +1 -0
- data/spec/integration/defaults/defaults_2.stdout +9 -0
- data/spec/integration/extend/extend_0.cmd +1 -0
- data/spec/integration/extend/extend_0.stdout +16 -0
- data/spec/integration/generator/generator_1.cmd +1 -0
- data/spec/integration/generator/generator_1.stdout +10 -0
- data/spec/integration/generator/generator_2.cmd +1 -0
- data/spec/integration/generator/generator_2.stdout +5 -0
- data/spec/integration/generator/generator_3.cmd +1 -0
- data/spec/integration/generator/generator_3.stdout +5 -0
- data/spec/integration/group/group_0.cmd +1 -0
- data/spec/integration/group/group_0.stdout +32 -0
- data/spec/integration/group/group_1.cmd +1 -0
- data/spec/integration/group/group_1.stdout +32 -0
- data/spec/integration/help/help_1.cmd +1 -0
- data/spec/integration/help/help_1.stdout +25 -0
- data/spec/integration/intersect/intersect_0.cmd +1 -0
- data/spec/integration/intersect/intersect_0.stdout +9 -0
- data/spec/integration/join/join_0.cmd +1 -0
- data/spec/integration/join/join_0.stdout +16 -0
- data/spec/integration/matching/matching_0.cmd +1 -0
- data/spec/integration/matching/matching_0.stdout +8 -0
- data/spec/integration/minus/minus_0.cmd +1 -0
- data/spec/integration/minus/minus_0.stdout +4 -0
- data/spec/integration/not-matching/not-matching_0.cmd +1 -0
- data/spec/integration/not-matching/not-matching_0.stdout +5 -0
- data/spec/integration/project/project_0.cmd +1 -0
- data/spec/integration/project/project_0.stdout +9 -0
- data/spec/integration/project/project_1.cmd +1 -0
- data/spec/integration/project/project_1.stdout +9 -0
- data/spec/integration/quota/quota_0.cmd +1 -0
- data/spec/integration/quota/quota_0.stdout +16 -0
- data/spec/integration/rank/rank_1.cmd +1 -0
- data/spec/integration/rank/rank_1.stdout +10 -0
- data/spec/integration/rank/rank_2.cmd +1 -0
- data/spec/integration/rank/rank_2.stdout +10 -0
- data/spec/integration/rank/rank_3.cmd +1 -0
- data/spec/integration/rank/rank_3.stdout +10 -0
- data/spec/integration/rank/rank_4.cmd +1 -0
- data/spec/integration/rank/rank_4.stdout +6 -0
- data/spec/integration/rank/rank_5.cmd +1 -0
- data/spec/integration/rank/rank_5.stdout +6 -0
- data/spec/integration/rename/rename_0.cmd +1 -0
- data/spec/integration/rename/rename_0.stdout +9 -0
- data/spec/integration/restrict/restrict_0.cmd +1 -0
- data/spec/integration/restrict/restrict_0.stdout +6 -0
- data/spec/integration/restrict/restrict_1.cmd +1 -0
- data/spec/integration/restrict/restrict_1.stdout +6 -0
- data/spec/integration/show/show_base.cmd +1 -0
- data/spec/integration/show/show_base.stdout +5 -0
- data/spec/integration/show/show_base_sort_1.cmd +1 -0
- data/spec/integration/show/show_base_sort_1.stdout +9 -0
- data/spec/integration/show/show_base_sort_2.cmd +1 -0
- data/spec/integration/show/show_base_sort_2.stdout +9 -0
- data/spec/integration/show/show_conflictual.cmd +1 -0
- data/spec/integration/show/show_conflictual.stdout +5 -0
- data/spec/integration/show/show_ff.cmd +1 -0
- data/spec/integration/show/show_ff.stdout +10 -0
- data/spec/integration/show/show_rash.cmd +1 -0
- data/spec/integration/show/show_rash.stdout +5 -0
- data/spec/integration/show/show_rash_pretty.cmd +1 -0
- data/spec/integration/show/show_rash_pretty.stdout +30 -0
- data/spec/integration/show/show_yaml.cmd +1 -0
- data/spec/integration/show/show_yaml.stdout +22 -0
- data/spec/integration/sort/sort_0.cmd +1 -0
- data/spec/integration/sort/sort_0.stdout +9 -0
- data/spec/integration/sort/sort_1.cmd +1 -0
- data/spec/integration/sort/sort_1.stdout +9 -0
- data/spec/integration/sort/sort_2.cmd +1 -0
- data/spec/integration/sort/sort_2.stdout +9 -0
- data/spec/integration/sort/sort_3.cmd +1 -0
- data/spec/integration/sort/sort_3.stdout +9 -0
- data/spec/integration/summarize/summarize_0.cmd +1 -0
- data/spec/integration/summarize/summarize_0.stdout +8 -0
- data/spec/integration/test_shell.rb +56 -0
- data/spec/integration/union/union_0.cmd +1 -0
- data/spec/integration/union/union_0.stdout +9 -0
- data/spec/integration/unwrap/unwrap_0.cmd +1 -0
- data/spec/integration/unwrap/unwrap_0.stdout +9 -0
- data/spec/integration/wrap/wrap_0.cmd +1 -0
- data/spec/integration/wrap/wrap_0.stdout +9 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/test_shell.rb +10 -0
- data/spec/unit/doc_manager/dynamic.md +1 -0
- data/spec/unit/doc_manager/example.md +1 -0
- data/spec/unit/doc_manager/example_1.txt +11 -0
- data/spec/unit/doc_manager/static.md +1 -0
- data/spec/unit/doc_manager/test_call.rb +43 -0
- data/spec/unit/ext/signature/test_argv2args.rb +82 -0
- data/spec/unit/ext/signature/test_to_shell.rb +103 -0
- data/spec/unit/from_argv/test_to_attr_list.rb +30 -0
- data/spec/unit/from_argv/test_to_attr_name.rb +27 -0
- data/spec/unit/from_argv/test_to_boolean.rb +32 -0
- data/spec/unit/from_argv/test_to_heading.rb +37 -0
- data/spec/unit/from_argv/test_to_ordering.rb +28 -0
- data/spec/unit/from_argv/test_to_predicate.rb +26 -0
- data/spec/unit/from_argv/test_to_renaming.rb +23 -0
- data/spec/unit/from_argv/test_to_size.rb +32 -0
- data/spec/unit/from_argv/test_to_summarization.rb +19 -0
- data/spec/unit/from_argv/test_to_tuple_computation.rb +18 -0
- data/spec/unit/from_argv/test_to_tuple_expression.rb +38 -0
- data/spec/unit/main/test_class_methods.rb +44 -0
- data/spec/unit/operator/test_autonum.rb +28 -0
- data/spec/unit/operator/test_clip.rb +29 -0
- data/spec/unit/operator/test_coerce.rb +22 -0
- data/spec/unit/operator/test_compact.rb +16 -0
- data/spec/unit/operator/test_defaults.rb +29 -0
- data/spec/unit/operator/test_extend.rb +21 -0
- data/spec/unit/operator/test_generator.rb +37 -0
- data/spec/unit/operator/test_group.rb +32 -0
- data/spec/unit/operator/test_infer_heading.rb +16 -0
- data/spec/unit/operator/test_intersect.rb +18 -0
- data/spec/unit/operator/test_join.rb +18 -0
- data/spec/unit/operator/test_matching.rb +18 -0
- data/spec/unit/operator/test_minus.rb +18 -0
- data/spec/unit/operator/test_not_matching.rb +18 -0
- data/spec/unit/operator/test_project.rb +38 -0
- data/spec/unit/operator/test_quota.rb +23 -0
- data/spec/unit/operator/test_rank.rb +30 -0
- data/spec/unit/operator/test_rename.rb +21 -0
- data/spec/unit/operator/test_restrict.rb +36 -0
- data/spec/unit/operator/test_sort.rb +49 -0
- data/spec/unit/operator/test_summarize.rb +30 -0
- data/spec/unit/operator/test_ungroup.rb +28 -0
- data/spec/unit/operator/test_union.rb +18 -0
- data/spec/unit/operator/test_unwrap.rb +28 -0
- data/spec/unit/operator/test_wrap.rb +30 -0
- data/tasks/gem.rake +8 -0
- data/tasks/test.rake +6 -0
- metadata +317 -0
@@ -0,0 +1 @@
|
|
1
|
+
alf --json show suppliers
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"sid":"S1","name":"Smith","status":20,"city":"London"},{"sid":"S2","name":"Jones","status":10,"city":"Paris"},{"sid":"S3","name":"Blake","status":30,"city":"Paris"},{"sid":"S4","name":"Clark","status":20,"city":"London"},{"sid":"S5","name":"Adams","status":30,"city":"Athens"}]
|
@@ -0,0 +1 @@
|
|
1
|
+
alf -ruri extend suppliers -- uri "URI::parse(name).to_s"
|
@@ -0,0 +1,5 @@
|
|
1
|
+
{:sid => "S1", :name => "Smith", :status => 20, :city => "London", :uri => "Smith"}
|
2
|
+
{:sid => "S2", :name => "Jones", :status => 10, :city => "Paris", :uri => "Jones"}
|
3
|
+
{:sid => "S3", :name => "Blake", :status => 30, :city => "Paris", :uri => "Blake"}
|
4
|
+
{:sid => "S4", :name => "Clark", :status => 20, :city => "London", :uri => "Clark"}
|
5
|
+
{:sid => "S5", :name => "Adams", :status => 30, :city => "Athens", :uri => "Adams"}
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --version
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --yaml show suppliers
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
- :sid: S1
|
3
|
+
:name: Smith
|
4
|
+
:status: 20
|
5
|
+
:city: London
|
6
|
+
- :sid: S2
|
7
|
+
:name: Jones
|
8
|
+
:status: 10
|
9
|
+
:city: Paris
|
10
|
+
- :sid: S3
|
11
|
+
:name: Blake
|
12
|
+
:status: 30
|
13
|
+
:city: Paris
|
14
|
+
- :sid: S4
|
15
|
+
:name: Clark
|
16
|
+
:status: 20
|
17
|
+
:city: London
|
18
|
+
- :sid: S5
|
19
|
+
:name: Adams
|
20
|
+
:status: 30
|
21
|
+
:city: Athens
|
22
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
{:hello => "world"}
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text autonum suppliers
|
@@ -0,0 +1,9 @@
|
|
1
|
+
+------+-------+---------+--------+----------+
|
2
|
+
| :sid | :name | :status | :city | :autonum |
|
3
|
+
+------+-------+---------+--------+----------+
|
4
|
+
| S1 | Smith | 20 | London | 0 |
|
5
|
+
| S2 | Jones | 10 | Paris | 1 |
|
6
|
+
| S3 | Blake | 30 | Paris | 2 |
|
7
|
+
| S4 | Clark | 20 | London | 3 |
|
8
|
+
| S5 | Adams | 30 | Athens | 4 |
|
9
|
+
+------+-------+---------+--------+----------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text autonum suppliers -- unique_id
|
@@ -0,0 +1,9 @@
|
|
1
|
+
+------+-------+---------+--------+------------+
|
2
|
+
| :sid | :name | :status | :city | :unique_id |
|
3
|
+
+------+-------+---------+--------+------------+
|
4
|
+
| S1 | Smith | 20 | London | 0 |
|
5
|
+
| S2 | Jones | 10 | Paris | 1 |
|
6
|
+
| S3 | Blake | 30 | Paris | 2 |
|
7
|
+
| S4 | Clark | 20 | London | 3 |
|
8
|
+
| S5 | Adams | 30 | Athens | 4 |
|
9
|
+
+------+-------+---------+--------+------------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text clip suppliers -- name city
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text clip suppliers --allbut -- name city
|
@@ -0,0 +1 @@
|
|
1
|
+
alf coerce suppliers -- sid Symbol status Integer
|
@@ -0,0 +1,5 @@
|
|
1
|
+
{:sid => :S1, :name => "Smith", :status => 20, :city => "London"}
|
2
|
+
{:sid => :S2, :name => "Jones", :status => 10, :city => "Paris"}
|
3
|
+
{:sid => :S3, :name => "Blake", :status => 30, :city => "Paris"}
|
4
|
+
{:sid => :S4, :name => "Clark", :status => 20, :city => "London"}
|
5
|
+
{:sid => :S5, :name => "Adams", :status => 30, :city => "Athens"}
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text compact suppliers
|
@@ -0,0 +1,9 @@
|
|
1
|
+
+------+-------+---------+--------+
|
2
|
+
| :sid | :name | :status | :city |
|
3
|
+
+------+-------+---------+--------+
|
4
|
+
| S1 | Smith | 20 | London |
|
5
|
+
| S2 | Jones | 10 | Paris |
|
6
|
+
| S3 | Blake | 30 | Paris |
|
7
|
+
| S4 | Clark | 20 | London |
|
8
|
+
| S5 | Adams | 30 | Athens |
|
9
|
+
+------+-------+---------+--------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text defaults suppliers -- country "'Belgium'"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
+------+-------+---------+--------+----------+
|
2
|
+
| :sid | :name | :status | :city | :country |
|
3
|
+
+------+-------+---------+--------+----------+
|
4
|
+
| S1 | Smith | 20 | London | Belgium |
|
5
|
+
| S2 | Jones | 10 | Paris | Belgium |
|
6
|
+
| S3 | Blake | 30 | Paris | Belgium |
|
7
|
+
| S4 | Clark | 20 | London | Belgium |
|
8
|
+
| S5 | Adams | 30 | Athens | Belgium |
|
9
|
+
+------+-------+---------+--------+----------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text defaults --strict suppliers -- country "'Belgium'"
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text defaults suppliers -- country "city"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
+------+-------+---------+--------+----------+
|
2
|
+
| :sid | :name | :status | :city | :country |
|
3
|
+
+------+-------+---------+--------+----------+
|
4
|
+
| S1 | Smith | 20 | London | London |
|
5
|
+
| S2 | Jones | 10 | Paris | Paris |
|
6
|
+
| S3 | Blake | 30 | Paris | Paris |
|
7
|
+
| S4 | Clark | 20 | London | London |
|
8
|
+
| S5 | Adams | 30 | Athens | Athens |
|
9
|
+
+------+-------+---------+--------+----------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text extend supplies -- sp "sid + '/' + pid" big "qty > 100 ? true : false"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
+------+------+------+-------+-------+
|
2
|
+
| :sid | :pid | :qty | :sp | :big |
|
3
|
+
+------+------+------+-------+-------+
|
4
|
+
| S1 | P1 | 300 | S1/P1 | true |
|
5
|
+
| S1 | P2 | 200 | S1/P2 | true |
|
6
|
+
| S1 | P3 | 400 | S1/P3 | true |
|
7
|
+
| S1 | P4 | 200 | S1/P4 | true |
|
8
|
+
| S1 | P5 | 100 | S1/P5 | false |
|
9
|
+
| S1 | P6 | 100 | S1/P6 | false |
|
10
|
+
| S2 | P1 | 300 | S2/P1 | true |
|
11
|
+
| S2 | P2 | 400 | S2/P2 | true |
|
12
|
+
| S3 | P2 | 200 | S3/P2 | true |
|
13
|
+
| S4 | P2 | 200 | S4/P2 | true |
|
14
|
+
| S4 | P4 | 300 | S4/P4 | true |
|
15
|
+
| S4 | P5 | 400 | S4/P5 | true |
|
16
|
+
+------+------+------+-------+-------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf generator
|
@@ -0,0 +1 @@
|
|
1
|
+
alf generator -- 5
|
@@ -0,0 +1 @@
|
|
1
|
+
alf generator -- 5 -- id
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text group supplies -- pid qty -- supplying
|
@@ -0,0 +1,32 @@
|
|
1
|
+
+------+-----------------+
|
2
|
+
| :sid | :supplying |
|
3
|
+
+------+-----------------+
|
4
|
+
| S1 | +------+------+ |
|
5
|
+
| | | :pid | :qty | |
|
6
|
+
| | +------+------+ |
|
7
|
+
| | | P1 | 300 | |
|
8
|
+
| | | P2 | 200 | |
|
9
|
+
| | | P3 | 400 | |
|
10
|
+
| | | P4 | 200 | |
|
11
|
+
| | | P5 | 100 | |
|
12
|
+
| | | P6 | 100 | |
|
13
|
+
| | +------+------+ |
|
14
|
+
| S2 | +------+------+ |
|
15
|
+
| | | :pid | :qty | |
|
16
|
+
| | +------+------+ |
|
17
|
+
| | | P1 | 300 | |
|
18
|
+
| | | P2 | 400 | |
|
19
|
+
| | +------+------+ |
|
20
|
+
| S3 | +------+------+ |
|
21
|
+
| | | :pid | :qty | |
|
22
|
+
| | +------+------+ |
|
23
|
+
| | | P2 | 200 | |
|
24
|
+
| | +------+------+ |
|
25
|
+
| S4 | +------+------+ |
|
26
|
+
| | | :pid | :qty | |
|
27
|
+
| | +------+------+ |
|
28
|
+
| | | P2 | 200 | |
|
29
|
+
| | | P4 | 300 | |
|
30
|
+
| | | P5 | 400 | |
|
31
|
+
| | +------+------+ |
|
32
|
+
+------+-----------------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text group --allbut supplies -- sid -- supplying
|
@@ -0,0 +1,32 @@
|
|
1
|
+
+------+-----------------+
|
2
|
+
| :sid | :supplying |
|
3
|
+
+------+-----------------+
|
4
|
+
| S1 | +------+------+ |
|
5
|
+
| | | :pid | :qty | |
|
6
|
+
| | +------+------+ |
|
7
|
+
| | | P1 | 300 | |
|
8
|
+
| | | P2 | 200 | |
|
9
|
+
| | | P3 | 400 | |
|
10
|
+
| | | P4 | 200 | |
|
11
|
+
| | | P5 | 100 | |
|
12
|
+
| | | P6 | 100 | |
|
13
|
+
| | +------+------+ |
|
14
|
+
| S2 | +------+------+ |
|
15
|
+
| | | :pid | :qty | |
|
16
|
+
| | +------+------+ |
|
17
|
+
| | | P1 | 300 | |
|
18
|
+
| | | P2 | 400 | |
|
19
|
+
| | +------+------+ |
|
20
|
+
| S3 | +------+------+ |
|
21
|
+
| | | :pid | :qty | |
|
22
|
+
| | +------+------+ |
|
23
|
+
| | | P2 | 200 | |
|
24
|
+
| | +------+------+ |
|
25
|
+
| S4 | +------+------+ |
|
26
|
+
| | | :pid | :qty | |
|
27
|
+
| | +------+------+ |
|
28
|
+
| | | P2 | 200 | |
|
29
|
+
| | | P4 | 300 | |
|
30
|
+
| | | P5 | 400 | |
|
31
|
+
| | +------+------+ |
|
32
|
+
+------+-----------------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf help show
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
Output input tuples through a specific renderer (text, yaml, ...)
|
3
|
+
|
4
|
+
SYNOPSIS
|
5
|
+
|
6
|
+
alf show NAME -- [ORDERING]
|
7
|
+
|
8
|
+
OPTIONS
|
9
|
+
|
10
|
+
--rash Render output as ruby hashes
|
11
|
+
--text Render output as a text table
|
12
|
+
--yaml Render output in YAML
|
13
|
+
--json Render output in JSON
|
14
|
+
--csv Render output in CSV
|
15
|
+
--[no-]pretty Enable/disable pretty print best effort
|
16
|
+
--ff=FORMAT Specify the floating point format
|
17
|
+
|
18
|
+
DESCRIPTION
|
19
|
+
|
20
|
+
When a name is specified as commandline arg, request the database to
|
21
|
+
provide the corresponding relation variable and prints its value.
|
22
|
+
Otherwise, take what comes on standard input.
|
23
|
+
|
24
|
+
Note that this command is not an operator and should not be piped
|
25
|
+
anymore.
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text intersect suppliers suppliers
|
@@ -0,0 +1,9 @@
|
|
1
|
+
+------+-------+---------+--------+
|
2
|
+
| :sid | :name | :status | :city |
|
3
|
+
+------+-------+---------+--------+
|
4
|
+
| S1 | Smith | 20 | London |
|
5
|
+
| S2 | Jones | 10 | Paris |
|
6
|
+
| S3 | Blake | 30 | Paris |
|
7
|
+
| S4 | Clark | 20 | London |
|
8
|
+
| S5 | Adams | 30 | Athens |
|
9
|
+
+------+-------+---------+--------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text join suppliers supplies
|
@@ -0,0 +1,16 @@
|
|
1
|
+
+------+-------+---------+--------+------+------+
|
2
|
+
| :sid | :name | :status | :city | :pid | :qty |
|
3
|
+
+------+-------+---------+--------+------+------+
|
4
|
+
| S1 | Smith | 20 | London | P1 | 300 |
|
5
|
+
| S1 | Smith | 20 | London | P2 | 200 |
|
6
|
+
| S1 | Smith | 20 | London | P3 | 400 |
|
7
|
+
| S1 | Smith | 20 | London | P4 | 200 |
|
8
|
+
| S1 | Smith | 20 | London | P5 | 100 |
|
9
|
+
| S1 | Smith | 20 | London | P6 | 100 |
|
10
|
+
| S2 | Jones | 10 | Paris | P1 | 300 |
|
11
|
+
| S2 | Jones | 10 | Paris | P2 | 400 |
|
12
|
+
| S3 | Blake | 30 | Paris | P2 | 200 |
|
13
|
+
| S4 | Clark | 20 | London | P2 | 200 |
|
14
|
+
| S4 | Clark | 20 | London | P4 | 300 |
|
15
|
+
| S4 | Clark | 20 | London | P5 | 400 |
|
16
|
+
+------+-------+---------+--------+------+------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text matching suppliers supplies
|
@@ -0,0 +1,8 @@
|
|
1
|
+
+------+-------+---------+--------+
|
2
|
+
| :sid | :name | :status | :city |
|
3
|
+
+------+-------+---------+--------+
|
4
|
+
| S1 | Smith | 20 | London |
|
5
|
+
| S2 | Jones | 10 | Paris |
|
6
|
+
| S3 | Blake | 30 | Paris |
|
7
|
+
| S4 | Clark | 20 | London |
|
8
|
+
+------+-------+---------+--------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text minus suppliers suppliers
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text not-matching suppliers supplies
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text project suppliers -- name city
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text project --allbut suppliers -- name city
|
@@ -0,0 +1 @@
|
|
1
|
+
alf --text quota supplies -- sid -- qty -- position "count()" sum_qty "sum{ qty }"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
+------+------+------+-----------+----------+
|
2
|
+
| :sid | :pid | :qty | :position | :sum_qty |
|
3
|
+
+------+------+------+-----------+----------+
|
4
|
+
| S1 | P6 | 100 | 1 | 100 |
|
5
|
+
| S1 | P5 | 100 | 2 | 200 |
|
6
|
+
| S1 | P2 | 200 | 3 | 400 |
|
7
|
+
| S1 | P4 | 200 | 4 | 600 |
|
8
|
+
| S1 | P1 | 300 | 5 | 900 |
|
9
|
+
| S1 | P3 | 400 | 6 | 1300 |
|
10
|
+
| S2 | P1 | 300 | 1 | 300 |
|
11
|
+
| S2 | P2 | 400 | 2 | 700 |
|
12
|
+
| S3 | P2 | 200 | 1 | 200 |
|
13
|
+
| S4 | P2 | 200 | 1 | 200 |
|
14
|
+
| S4 | P4 | 300 | 2 | 500 |
|
15
|
+
| S4 | P5 | 400 | 3 | 900 |
|
16
|
+
+------+------+------+-----------+----------+
|