alf 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +22 -0
- data/Gemfile +3 -3
- data/Gemfile.lock +9 -10
- data/alf.gemspec +3 -3
- data/alf.noespec +5 -4
- data/doc/commands/show.md +1 -1
- data/doc/operators/relational/heading.md +20 -0
- data/doc/operators/relational/join.md +4 -3
- data/doc/operators/relational/matching.md +7 -3
- data/doc/operators/relational/restrict.md +2 -2
- data/examples/hitradio/compact.rb +48 -0
- data/examples/hitradio/compare1.rb +28 -0
- data/examples/hitradio/gz_reader.rb +23 -0
- data/examples/hitradio/hitradio-1.alf +1 -0
- data/examples/hitradio/hitradio.log +25080 -0
- data/examples/hitradio/hitradio.mar +25081 -0
- data/examples/hitradio/hitradio.mar.gz +0 -0
- data/examples/hitradio/hitradio.rash +25080 -0
- data/examples/hitradio/mar_reader.rb +18 -0
- data/lib/alf/aggregator/aggregators.rb +28 -0
- data/lib/alf/aggregator/aggregators.rbc +2640 -0
- data/lib/alf/aggregator/base.rbc +1055 -0
- data/lib/alf/aggregator/class_methods.rb +1 -1
- data/lib/alf/aggregator/class_methods.rbc +830 -0
- data/lib/alf/buffer/sorted.rbc +715 -0
- data/lib/alf/command/class_methods.rbc +453 -0
- data/lib/alf/command/doc_manager.rbc +1604 -0
- data/lib/alf/command/exec.rbc +408 -0
- data/lib/alf/command/help.rbc +764 -0
- data/lib/alf/command/main.rb +37 -5
- data/lib/alf/command/main.rbc +3612 -0
- data/lib/alf/command/show.rb +37 -5
- data/lib/alf/command/show.rbc +1327 -0
- data/lib/alf/environment/base.rbc +459 -0
- data/lib/alf/environment/class_methods.rbc +1110 -0
- data/lib/alf/environment/explicit.rb +2 -2
- data/lib/alf/environment/explicit.rbc +601 -0
- data/lib/alf/environment/folder.rb +2 -2
- data/lib/alf/environment/folder.rbc +942 -0
- data/lib/alf/errors.rb +4 -0
- data/lib/alf/errors.rbc +155 -0
- data/lib/alf/extra/csv.rb +5 -2
- data/lib/alf/extra/csv.rbc +2021 -0
- data/lib/alf/extra/logs.rbc +1957 -0
- data/lib/alf/extra/sequel.rbc +1417 -0
- data/lib/alf/extra/yaml.rbc +435 -0
- data/lib/alf/extra.rbc +101 -0
- data/lib/alf/iterator/base.rbc +437 -0
- data/lib/alf/iterator/class_methods.rbc +518 -0
- data/lib/alf/iterator/proxy.rbc +599 -0
- data/lib/alf/lispy/instance_methods.rbc +2535 -0
- data/lib/alf/loader.rb +2 -1
- data/lib/alf/loader.rbc +85 -0
- data/lib/alf/operator/base.rbc +860 -0
- data/lib/alf/operator/binary.rbc +595 -0
- data/lib/alf/operator/cesure.rbc +883 -0
- data/lib/alf/operator/class_methods.rbc +1915 -0
- data/lib/alf/operator/experimental.rbc +200 -0
- data/lib/alf/operator/non_relational/autonum.rbc +587 -0
- data/lib/alf/operator/non_relational/clip.rbc +522 -0
- data/lib/alf/operator/non_relational/coerce.rbc +596 -0
- data/lib/alf/operator/non_relational/compact.rbc +1283 -0
- data/lib/alf/operator/non_relational/defaults.rbc +733 -0
- data/lib/alf/operator/non_relational/generator.rbc +1015 -0
- data/lib/alf/operator/non_relational/sort.rbc +665 -0
- data/lib/alf/operator/nullary.rbc +404 -0
- data/lib/alf/operator/relational/extend.rbc +616 -0
- data/lib/alf/operator/relational/group.rbc +968 -0
- data/lib/alf/operator/relational/heading.rb +30 -0
- data/lib/alf/operator/relational/heading.rbc +657 -0
- data/lib/alf/operator/relational/intersect.rbc +969 -0
- data/lib/alf/operator/relational/join.rbc +1708 -0
- data/lib/alf/operator/relational/matching.rbc +1047 -0
- data/lib/alf/operator/relational/minus.rbc +965 -0
- data/lib/alf/operator/relational/not_matching.rbc +1047 -0
- data/lib/alf/operator/relational/project.rbc +669 -0
- data/lib/alf/operator/relational/quota.rbc +1193 -0
- data/lib/alf/operator/relational/rank.rbc +1217 -0
- data/lib/alf/operator/relational/rename.rbc +496 -0
- data/lib/alf/operator/relational/restrict.rbc +611 -0
- data/lib/alf/operator/relational/summarize.rbc +1922 -0
- data/lib/alf/operator/relational/ungroup.rbc +643 -0
- data/lib/alf/operator/relational/union.rbc +846 -0
- data/lib/alf/operator/relational/unwrap.rbc +540 -0
- data/lib/alf/operator/relational/wrap.rbc +560 -0
- data/lib/alf/operator/shortcut.rbc +809 -0
- data/lib/alf/operator/signature.rbc +4640 -0
- data/lib/alf/operator/transform.rbc +484 -0
- data/lib/alf/operator/unary.rbc +629 -0
- data/lib/alf/reader/alf_file.rbc +464 -0
- data/lib/alf/reader/base.rbc +1613 -0
- data/lib/alf/reader/class_methods.rb +1 -1
- data/lib/alf/reader/class_methods.rbc +1099 -0
- data/lib/alf/reader/rash.rbc +583 -0
- data/lib/alf/relation/class_methods.rbc +674 -0
- data/lib/alf/relation/instance_methods.rb +7 -0
- data/lib/alf/relation/instance_methods.rbc +2107 -0
- data/lib/alf/renderer/base.rbc +936 -0
- data/lib/alf/renderer/class_methods.rbc +875 -0
- data/lib/alf/renderer/rash.rb +16 -2
- data/lib/alf/renderer/rash.rbc +802 -0
- data/lib/alf/renderer/text.rb +54 -16
- data/lib/alf/renderer/text.rbc +5530 -0
- data/lib/alf/tools/coerce.rbc +352 -0
- data/lib/alf/tools/miscellaneous.rb +8 -1
- data/lib/alf/tools/miscellaneous.rbc +1497 -0
- data/lib/alf/tools/to_lispy.rbc +2618 -0
- data/lib/alf/tools/to_ruby_literal.rbc +344 -0
- data/lib/alf/tools/tuple_handle.rbc +738 -0
- data/lib/alf/types/attr_list.rbc +1535 -0
- data/lib/alf/types/attr_name.rbc +781 -0
- data/lib/alf/types/boolean.rbc +365 -0
- data/lib/alf/types/heading.rb +16 -1
- data/lib/alf/types/heading.rbc +1778 -0
- data/lib/alf/types/ordering.rbc +2228 -0
- data/lib/alf/types/renaming.rbc +1064 -0
- data/lib/alf/types/summarization.rbc +1394 -0
- data/lib/alf/types/tuple_computation.rbc +1061 -0
- data/lib/alf/types/tuple_expression.rbc +1016 -0
- data/lib/alf/types/tuple_predicate.rbc +1349 -0
- data/lib/alf/version.rb +1 -1
- data/lib/alf/version.rbc +350 -0
- data/lib/alf.rb +13 -5
- data/lib/alf.rbc +3884 -0
- data/spec/integration/command/alf/alf_help.stdout +8 -6
- data/spec/integration/command/help/help_1.stdout +3 -1
- data/spec/integration/command/show/show_base.cmd +1 -1
- data/spec/integration/command/show/show_base_sort_1.cmd +1 -0
- data/spec/integration/command/show/show_base_sort_1.stdout +9 -0
- data/spec/integration/command/show/show_base_sort_2.cmd +1 -0
- data/spec/integration/command/show/show_base_sort_2.stdout +9 -0
- data/spec/integration/command/show/show_ff.cmd +1 -0
- data/spec/integration/command/show/show_ff.stdout +10 -0
- data/spec/integration/command/show/show_rash_pretty.cmd +1 -0
- data/spec/integration/command/show/show_rash_pretty.stdout +30 -0
- data/spec/integration/test_alf.rbc +1098 -0
- data/spec/integration/test_command.rbc +1832 -0
- data/spec/integration/test_examples.rbc +559 -0
- data/spec/integration/test_semantics.rbc +991 -0
- data/spec/regression/alf_file/test___FILE__.rbc +524 -0
- data/spec/regression/heading/test_heading_with_date.rbc +381 -0
- data/spec/regression/lispy/test_compile.rbc +404 -0
- data/spec/regression/logs/test_path_attribute.rbc +687 -0
- data/spec/regression/relation/test_relation_allbut_all.rbc +468 -0
- data/spec/regression/relation/test_relation_with_date.rbc +381 -0
- data/spec/regression/restrict/test_restrict_with_keywords.rbc +628 -0
- data/spec/shared/a_value.rbc +337 -0
- data/spec/shared/an_operator_class.rbc +908 -0
- data/spec/spec_helper.rbc +453 -0
- data/spec/unit/assumptions/test_file.rbc +668 -0
- data/spec/unit/assumptions/test_instance_eval.rbc +654 -0
- data/spec/unit/assumptions/test_scoping.rbc +755 -0
- data/spec/unit/assumptions/test_set.rbc +1928 -0
- data/spec/unit/command/doc_manager/test_call.rbc +1537 -0
- data/spec/unit/csv/test_reader.rbc +2228 -0
- data/spec/unit/csv/test_renderer.rbc +2426 -0
- data/spec/unit/environment/test_explicit.rbc +464 -0
- data/spec/unit/environment/test_folder.rb +2 -2
- data/spec/unit/environment/test_folder.rbc +1304 -0
- data/spec/unit/lispy/test_relation.rbc +1477 -0
- data/spec/unit/lispy/test_run.rbc +1735 -0
- data/spec/unit/lispy/test_tuple.rbc +1686 -0
- data/spec/unit/logs/test_reader.rb +6 -4
- data/spec/unit/logs/test_reader.rbc +1807 -0
- data/spec/unit/operator/non_relational/compact/test_buffer_based.rbc +1127 -0
- data/spec/unit/operator/non_relational/compact/test_sort_based.rbc +1127 -0
- data/spec/unit/operator/non_relational/test_autonum.rbc +1969 -0
- data/spec/unit/operator/non_relational/test_clip.rbc +1850 -0
- data/spec/unit/operator/non_relational/test_coerce.rbc +1290 -0
- data/spec/unit/operator/non_relational/test_compact.rbc +1382 -0
- data/spec/unit/operator/non_relational/test_defaults.rbc +2319 -0
- data/spec/unit/operator/non_relational/test_generator.rbc +2361 -0
- data/spec/unit/operator/non_relational/test_sort.rbc +2583 -0
- data/spec/unit/operator/relational/join/test_hash_based.rbc +2481 -0
- data/spec/unit/operator/relational/matching/test_hash_based.rbc +2458 -0
- data/spec/unit/operator/relational/not_matching/test_hash_based.rbc +1632 -0
- data/spec/unit/operator/relational/summarize/test_hash_based.rbc +1990 -0
- data/spec/unit/operator/relational/summarize/test_sort_based.rbc +1990 -0
- data/spec/unit/operator/relational/test_extend.rbc +1300 -0
- data/spec/unit/operator/relational/test_group.rbc +2142 -0
- data/spec/unit/operator/relational/test_intersect.rbc +2069 -0
- data/spec/unit/operator/relational/test_join.rbc +1282 -0
- data/spec/unit/operator/relational/test_minus.rbc +1995 -0
- data/spec/unit/operator/relational/test_project.rbc +2870 -0
- data/spec/unit/operator/relational/test_quota.rbc +1788 -0
- data/spec/unit/operator/relational/test_rank.rbc +2079 -0
- data/spec/unit/operator/relational/test_rename.rbc +1158 -0
- data/spec/unit/operator/relational/test_restrict.rbc +2305 -0
- data/spec/unit/operator/relational/test_summarize.rbc +2570 -0
- data/spec/unit/operator/relational/test_ungroup.rbc +1425 -0
- data/spec/unit/operator/relational/test_union.rbc +1089 -0
- data/spec/unit/operator/relational/test_unwrap.rbc +1176 -0
- data/spec/unit/operator/relational/test_wrap.rbc +1203 -0
- data/spec/unit/operator/signature/test_collect_on.rbc +1989 -0
- data/spec/unit/operator/signature/test_initialize.rbc +544 -0
- data/spec/unit/operator/signature/test_install.rbc +1671 -0
- data/spec/unit/operator/signature/test_option_parser.rbc +1348 -0
- data/spec/unit/operator/signature/test_parse_args.rbc +1908 -0
- data/spec/unit/operator/signature/test_parse_argv.rbc +2878 -0
- data/spec/unit/operator/signature/test_to_lispy.rbc +3305 -0
- data/spec/unit/operator/signature/test_to_shell.rbc +3327 -0
- data/spec/unit/operator/test_non_relational.rbc +571 -0
- data/spec/unit/operator/test_relational.rb +2 -1
- data/spec/unit/operator/test_relational.rbc +758 -0
- data/spec/unit/reader/test_alf_file.rbc +1107 -0
- data/spec/unit/reader/test_initialize.rbc +1774 -0
- data/spec/unit/reader/test_rash.rbc +1127 -0
- data/spec/unit/relation/test_coerce.rbc +2320 -0
- data/spec/unit/relation/test_inspect.rbc +502 -0
- data/spec/unit/relation/test_relops.rbc +1585 -0
- data/spec/unit/relation/test_to_a.rbc +1112 -0
- data/spec/unit/renderer/test_initialize.rbc +1766 -0
- data/spec/unit/sequel/test_environment.rbc +1723 -0
- data/spec/unit/test_aggregator.rb +38 -1
- data/spec/unit/test_aggregator.rbc +4358 -0
- data/spec/unit/test_environment.rbc +1271 -0
- data/spec/unit/test_lispy.rbc +879 -0
- data/spec/unit/test_operator.rbc +531 -0
- data/spec/unit/test_reader.rb +6 -2
- data/spec/unit/test_reader.rbc +1249 -0
- data/spec/unit/test_relation.rbc +2588 -0
- data/spec/unit/test_renderer.rb +12 -1
- data/spec/unit/test_renderer.rbc +2011 -0
- data/spec/unit/text/test_cell.rb +1 -0
- data/spec/unit/text/test_cell.rbc +1532 -0
- data/spec/unit/text/test_row.rbc +847 -0
- data/spec/unit/text/test_table.rbc +978 -0
- data/spec/unit/tools/test_coalesce.rbc +456 -0
- data/spec/unit/tools/test_coerce.rbc +279 -0
- data/spec/unit/tools/test_to_lispy.rbc +5711 -0
- data/spec/unit/tools/test_to_ruby_literal.rbc +272 -0
- data/spec/unit/tools/test_tools.rbc +672 -0
- data/spec/unit/tools/test_tuple_handle.rbc +1591 -0
- data/spec/unit/tools/test_tuple_heading.rb +20 -0
- data/spec/unit/tools/test_tuple_heading.rbc +821 -0
- data/spec/unit/tools/test_varargs.rbc +495 -0
- data/spec/unit/types/heading/test_union.rb +21 -0
- data/spec/unit/types/heading/test_union.rbc +1043 -0
- data/spec/unit/types/test_attr_list.rbc +4481 -0
- data/spec/unit/types/test_attr_name.rbc +1872 -0
- data/spec/unit/types/test_heading.rbc +1735 -0
- data/spec/unit/types/test_ordering.rbc +3695 -0
- data/spec/unit/types/test_renaming.rbc +2426 -0
- data/spec/unit/types/test_summarization.rbc +2538 -0
- data/spec/unit/types/test_tuple_computation.rbc +2340 -0
- data/spec/unit/types/test_tuple_expression.rbc +2285 -0
- data/spec/unit/types/test_tuple_predicate.rbc +3168 -0
- data/tasks/gh-pages.rake +1 -1
- metadata +529 -125
@@ -20,19 +20,20 @@ OPTIONS
|
|
20
20
|
--input-reader=READER Specify the kind of reader when reading on $stdin (rash,alf,csv,logs)
|
21
21
|
-Idirectory Specify $LOAD_PATH directory (may be used more than once)
|
22
22
|
-rlibrary Require the library, before executing alf
|
23
|
+
--[no-]pretty Enable/disable pretty print best effort
|
23
24
|
-h, --help Show help
|
24
25
|
-v, --version Show version
|
25
26
|
|
26
27
|
RELATIONAL OPERATORS
|
27
28
|
|
28
|
-
project Relational projection (clip + compact)
|
29
29
|
extend Relational extension (additional, computed attributes)
|
30
|
-
|
30
|
+
project Relational projection (clip + compact)
|
31
31
|
restrict Relational restriction (aka where, predicate filtering)
|
32
|
-
|
33
|
-
intersect Relational intersection (aka a logical and)
|
34
|
-
minus Relational minus (aka difference)
|
32
|
+
rename Relational renaming (rename some attributes)
|
35
33
|
union Relational union
|
34
|
+
minus Relational minus (aka difference)
|
35
|
+
intersect Relational intersection (aka a logical and)
|
36
|
+
join Relational join (and cartesian product)
|
36
37
|
matching Relational matching (join + project back on left)
|
37
38
|
not-matching Relational not matching (inverse of matching)
|
38
39
|
wrap Relational wrapping (tuple-valued attributes)
|
@@ -44,7 +45,8 @@ RELATIONAL OPERATORS
|
|
44
45
|
|
45
46
|
EXPERIMENTAL RELATIONAL OPERATORS
|
46
47
|
|
47
|
-
quota
|
48
|
+
quota Generalized quota-queries (position, sum progression, etc.)
|
49
|
+
heading Relational heading (print the relation type)
|
48
50
|
|
49
51
|
NON-RELATIONAL OPERATORS
|
50
52
|
|
@@ -3,7 +3,7 @@ Output input tuples through a specific renderer (text, yaml, ...)
|
|
3
3
|
|
4
4
|
SYNOPSIS
|
5
5
|
|
6
|
-
alf show DATASET
|
6
|
+
alf show DATASET -- [ORDERING]
|
7
7
|
|
8
8
|
OPTIONS
|
9
9
|
|
@@ -11,6 +11,8 @@ OPTIONS
|
|
11
11
|
--text Render output as a text table
|
12
12
|
--yaml Render output as a yaml output
|
13
13
|
--csv Render output as a csv file
|
14
|
+
--[no-]pretty Enable/disable pretty print best effort
|
15
|
+
--ff=FORMAT Specify the floating point format
|
14
16
|
|
15
17
|
DESCRIPTION
|
16
18
|
|
@@ -1 +1 @@
|
|
1
|
-
alf show suppliers
|
1
|
+
alf show suppliers
|
@@ -0,0 +1 @@
|
|
1
|
+
alf show suppliers -- city asc
|
@@ -0,0 +1,9 @@
|
|
1
|
+
+------+-------+---------+--------+
|
2
|
+
| :sid | :name | :status | :city |
|
3
|
+
+------+-------+---------+--------+
|
4
|
+
| S5 | Adams | 30 | Athens |
|
5
|
+
| S4 | Clark | 20 | London |
|
6
|
+
| S1 | Smith | 20 | London |
|
7
|
+
| S2 | Jones | 10 | Paris |
|
8
|
+
| S3 | Blake | 30 | Paris |
|
9
|
+
+------+-------+---------+--------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf show suppliers -- city asc status desc
|
@@ -0,0 +1,9 @@
|
|
1
|
+
+------+-------+---------+--------+
|
2
|
+
| :sid | :name | :status | :city |
|
3
|
+
+------+-------+---------+--------+
|
4
|
+
| S5 | Adams | 30 | Athens |
|
5
|
+
| S4 | Clark | 20 | London |
|
6
|
+
| S1 | Smith | 20 | London |
|
7
|
+
| S3 | Blake | 30 | Paris |
|
8
|
+
| S2 | Jones | 10 | Paris |
|
9
|
+
+------+-------+---------+--------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf show parts --ff=%.6f
|
@@ -0,0 +1,10 @@
|
|
1
|
+
+------+-------+--------+-----------+--------+
|
2
|
+
| :pid | :name | :color | :weight | :city |
|
3
|
+
+------+-------+--------+-----------+--------+
|
4
|
+
| P1 | Nut | Red | 12.000000 | London |
|
5
|
+
| P2 | Bolt | Green | 17.000000 | Paris |
|
6
|
+
| P3 | Screw | Blue | 17.000000 | Oslo |
|
7
|
+
| P4 | Screw | Red | 14.000000 | London |
|
8
|
+
| P5 | Cam | Blue | 12.000000 | Paris |
|
9
|
+
| P6 | Cog | Red | 19.000000 | London |
|
10
|
+
+------+-------+--------+-----------+--------+
|
@@ -0,0 +1 @@
|
|
1
|
+
alf show suppliers --rash --pretty
|
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
:sid => "S1",
|
3
|
+
:name => "Smith",
|
4
|
+
:status => 20,
|
5
|
+
:city => "London"
|
6
|
+
}
|
7
|
+
{
|
8
|
+
:sid => "S2",
|
9
|
+
:name => "Jones",
|
10
|
+
:status => 10,
|
11
|
+
:city => "Paris"
|
12
|
+
}
|
13
|
+
{
|
14
|
+
:sid => "S3",
|
15
|
+
:name => "Blake",
|
16
|
+
:status => 30,
|
17
|
+
:city => "Paris"
|
18
|
+
}
|
19
|
+
{
|
20
|
+
:sid => "S4",
|
21
|
+
:name => "Clark",
|
22
|
+
:status => 20,
|
23
|
+
:city => "London"
|
24
|
+
}
|
25
|
+
{
|
26
|
+
:sid => "S5",
|
27
|
+
:name => "Adams",
|
28
|
+
:status => 30,
|
29
|
+
:city => "Athens"
|
30
|
+
}
|