alf 0.12.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +186 -80
- data/Gemfile +16 -32
- data/Gemfile.lock +35 -34
- data/LICENCE.md +1 -1
- data/Manifest.txt +7 -9
- data/README.md +139 -809
- data/alf.gemspec +6 -15
- data/alf.noespec +16 -34
- data/lib/alf.rb +3 -73
- data/lib/alf/loader.rb +3 -3
- data/lib/alf/version.rb +2 -2
- data/spec/spec_helper.rb +3 -18
- data/spec/test_alf.rb +8 -0
- data/tasks/test.rake +6 -0
- data/test/migrations/test_folder_migration.rb +18 -0
- data/test/migrations/test_sequel_migration.rb +34 -0
- data/test/seeding/test_seeding.rb +49 -0
- data/test/test_alf.rb +8 -0
- data/test/test_helpers.rb +24 -0
- metadata +54 -952
- data/TODO.md +0 -21
- data/bin/alf +0 -27
- data/doc/commands/exec.md +0 -16
- data/doc/commands/help.md +0 -11
- data/doc/commands/main.md +0 -33
- data/doc/commands/show.md +0 -19
- data/doc/operators/non_relational/autonum.md +0 -23
- data/doc/operators/non_relational/clip.md +0 -31
- data/doc/operators/non_relational/coerce.md +0 -15
- data/doc/operators/non_relational/compact.md +0 -20
- data/doc/operators/non_relational/defaults.md +0 -32
- data/doc/operators/non_relational/generator.md +0 -20
- data/doc/operators/non_relational/sort.md +0 -24
- data/doc/operators/relational/extend.md +0 -18
- data/doc/operators/relational/group.md +0 -27
- data/doc/operators/relational/heading.md +0 -20
- data/doc/operators/relational/intersect.md +0 -13
- data/doc/operators/relational/join.md +0 -28
- data/doc/operators/relational/matching.md +0 -24
- data/doc/operators/relational/minus.md +0 -12
- data/doc/operators/relational/not-matching.md +0 -20
- data/doc/operators/relational/project.md +0 -28
- data/doc/operators/relational/quota.md +0 -21
- data/doc/operators/relational/rank.md +0 -27
- data/doc/operators/relational/rename.md +0 -17
- data/doc/operators/relational/restrict.md +0 -25
- data/doc/operators/relational/summarize.md +0 -25
- data/doc/operators/relational/ungroup.md +0 -20
- data/doc/operators/relational/union.md +0 -14
- data/doc/operators/relational/unwrap.md +0 -20
- data/doc/operators/relational/wrap.md +0 -24
- data/examples/csv/suppliers.csv +0 -6
- data/examples/logs/access.log +0 -1000
- data/examples/logs/combined.alf +0 -2
- data/examples/logs/hits.alf +0 -14
- data/examples/logs/not_found.alf +0 -7
- data/examples/logs/robots-cheating.alf +0 -11
- data/examples/logs/robots.alf +0 -8
- data/examples/operators/autonum.alf +0 -6
- data/examples/operators/cities.rash +0 -4
- data/examples/operators/clip.alf +0 -3
- data/examples/operators/compact.alf +0 -2
- data/examples/operators/database.alf +0 -5
- data/examples/operators/defaults.alf +0 -3
- data/examples/operators/extend.alf +0 -3
- data/examples/operators/group.alf +0 -3
- data/examples/operators/intersect.alf +0 -4
- data/examples/operators/join.alf +0 -2
- data/examples/operators/matching.alf +0 -2
- data/examples/operators/minus.alf +0 -8
- data/examples/operators/not_matching.alf +0 -2
- data/examples/operators/nulls.rash +0 -3
- data/examples/operators/parts.rash +0 -6
- data/examples/operators/project.alf +0 -3
- data/examples/operators/pseudo-with.alf +0 -7
- data/examples/operators/quota.alf +0 -4
- data/examples/operators/rank.alf +0 -4
- data/examples/operators/rename.alf +0 -3
- data/examples/operators/restrict.alf +0 -2
- data/examples/operators/schema.yaml +0 -28
- data/examples/operators/sort.alf +0 -4
- data/examples/operators/summarize.alf +0 -16
- data/examples/operators/suppliers.rash +0 -5
- data/examples/operators/supplies.rash +0 -12
- data/examples/operators/ungroup.alf +0 -4
- data/examples/operators/union.alf +0 -3
- data/examples/operators/unwrap.alf +0 -4
- data/examples/operators/wrap.alf +0 -2
- data/lib/alf-csv/alf/csv.rb +0 -3
- data/lib/alf-csv/alf/csv/commons.rb +0 -36
- data/lib/alf-csv/alf/csv/reader.rb +0 -33
- data/lib/alf-csv/alf/csv/renderer.rb +0 -38
- data/lib/alf-engine/alf/engine.rb +0 -25
- data/lib/alf-engine/alf/engine/aggregate.rb +0 -44
- data/lib/alf-engine/alf/engine/autonum.rb +0 -45
- data/lib/alf-engine/alf/engine/cesure.rb +0 -45
- data/lib/alf-engine/alf/engine/clip.rb +0 -53
- data/lib/alf-engine/alf/engine/coerce.rb +0 -46
- data/lib/alf-engine/alf/engine/cog.rb +0 -7
- data/lib/alf-engine/alf/engine/compact.rb +0 -26
- data/lib/alf-engine/alf/engine/compact/set.rb +0 -23
- data/lib/alf-engine/alf/engine/compact/uniq.rb +0 -23
- data/lib/alf-engine/alf/engine/concat.rb +0 -25
- data/lib/alf-engine/alf/engine/defaults.rb +0 -43
- data/lib/alf-engine/alf/engine/filter.rb +0 -41
- data/lib/alf-engine/alf/engine/generator.rb +0 -50
- data/lib/alf-engine/alf/engine/group.rb +0 -7
- data/lib/alf-engine/alf/engine/group/hash.rb +0 -40
- data/lib/alf-engine/alf/engine/join.rb +0 -7
- data/lib/alf-engine/alf/engine/join/hash.rb +0 -35
- data/lib/alf-engine/alf/engine/materialize.rb +0 -8
- data/lib/alf-engine/alf/engine/materialize/array.rb +0 -78
- data/lib/alf-engine/alf/engine/materialize/hash.rb +0 -122
- data/lib/alf-engine/alf/engine/quota.rb +0 -7
- data/lib/alf-engine/alf/engine/quota/cesure.rb +0 -46
- data/lib/alf-engine/alf/engine/rank.rb +0 -7
- data/lib/alf-engine/alf/engine/rank/cesure.rb +0 -48
- data/lib/alf-engine/alf/engine/rename.rb +0 -39
- data/lib/alf-engine/alf/engine/semi.rb +0 -7
- data/lib/alf-engine/alf/engine/semi/hash.rb +0 -39
- data/lib/alf-engine/alf/engine/set_attr.rb +0 -46
- data/lib/alf-engine/alf/engine/sort.rb +0 -28
- data/lib/alf-engine/alf/engine/sort/in_memory.rb +0 -39
- data/lib/alf-engine/alf/engine/summarize.rb +0 -8
- data/lib/alf-engine/alf/engine/summarize/cesure.rb +0 -51
- data/lib/alf-engine/alf/engine/summarize/hash.rb +0 -35
- data/lib/alf-engine/alf/engine/ungroup.rb +0 -29
- data/lib/alf-engine/alf/engine/unwrap.rb +0 -31
- data/lib/alf-engine/alf/engine/wrap.rb +0 -39
- data/lib/alf-logs/alf/logs.rb +0 -1
- data/lib/alf-logs/alf/logs/reader.rb +0 -98
- data/lib/alf-sequel/alf/sequel.rb +0 -2
- data/lib/alf-sequel/alf/sequel/environment.rb +0 -61
- data/lib/alf-sequel/alf/sequel/iterator.rb +0 -21
- data/lib/alf-shell/alf/shell.rb +0 -40
- data/lib/alf-shell/alf/shell/command.rb +0 -26
- data/lib/alf-shell/alf/shell/command/exec.rb +0 -11
- data/lib/alf-shell/alf/shell/command/help.rb +0 -30
- data/lib/alf-shell/alf/shell/command/main.rb +0 -136
- data/lib/alf-shell/alf/shell/command/main/class_methods.rb +0 -46
- data/lib/alf-shell/alf/shell/command/show.rb +0 -63
- data/lib/alf-shell/alf/shell/doc_manager.rb +0 -72
- data/lib/alf-shell/alf/shell/operator.rb +0 -86
- data/lib/alf-yaml/alf/yaml.rb +0 -1
- data/lib/alf-yaml/alf/yaml/renderer.rb +0 -22
- data/lib/alf/aggregator.rb +0 -51
- data/lib/alf/aggregator/avg.rb +0 -39
- data/lib/alf/aggregator/class_methods.rb +0 -77
- data/lib/alf/aggregator/collect.rb +0 -32
- data/lib/alf/aggregator/concat.rb +0 -47
- data/lib/alf/aggregator/count.rb +0 -32
- data/lib/alf/aggregator/instance_methods.rb +0 -119
- data/lib/alf/aggregator/max.rb +0 -32
- data/lib/alf/aggregator/min.rb +0 -32
- data/lib/alf/aggregator/stddev.rb +0 -25
- data/lib/alf/aggregator/sum.rb +0 -32
- data/lib/alf/aggregator/variance.rb +0 -45
- data/lib/alf/environment.rb +0 -34
- data/lib/alf/environment/class_methods.rb +0 -95
- data/lib/alf/environment/folder.rb +0 -60
- data/lib/alf/environment/instance_methods.rb +0 -26
- data/lib/alf/errors.rb +0 -5
- data/lib/alf/ext.rb +0 -4
- data/lib/alf/ext/relation.rb +0 -4
- data/lib/alf/iterator.rb +0 -28
- data/lib/alf/iterator/class_methods.rb +0 -20
- data/lib/alf/iterator/proxy.rb +0 -27
- data/lib/alf/lispy.rb +0 -24
- data/lib/alf/lispy/instance_methods.rb +0 -157
- data/lib/alf/operator.rb +0 -68
- data/lib/alf/operator/binary.rb +0 -21
- data/lib/alf/operator/class_methods.rb +0 -82
- data/lib/alf/operator/experimental.rb +0 -9
- data/lib/alf/operator/instance_methods.rb +0 -29
- data/lib/alf/operator/non_relational/autonum.rb +0 -19
- data/lib/alf/operator/non_relational/clip.rb +0 -20
- data/lib/alf/operator/non_relational/coerce.rb +0 -19
- data/lib/alf/operator/non_relational/compact.rb +0 -18
- data/lib/alf/operator/non_relational/defaults.rb +0 -22
- data/lib/alf/operator/non_relational/generator.rb +0 -20
- data/lib/alf/operator/non_relational/sort.rb +0 -19
- data/lib/alf/operator/nullary.rb +0 -11
- data/lib/alf/operator/relational/extend.rb +0 -19
- data/lib/alf/operator/relational/group.rb +0 -21
- data/lib/alf/operator/relational/heading.rb +0 -20
- data/lib/alf/operator/relational/intersect.rb +0 -18
- data/lib/alf/operator/relational/join.rb +0 -18
- data/lib/alf/operator/relational/matching.rb +0 -18
- data/lib/alf/operator/relational/minus.rb +0 -18
- data/lib/alf/operator/relational/not_matching.rb +0 -18
- data/lib/alf/operator/relational/project.rb +0 -22
- data/lib/alf/operator/relational/quota.rb +0 -23
- data/lib/alf/operator/relational/rank.rb +0 -22
- data/lib/alf/operator/relational/rename.rb +0 -18
- data/lib/alf/operator/relational/restrict.rb +0 -18
- data/lib/alf/operator/relational/summarize.rb +0 -27
- data/lib/alf/operator/relational/ungroup.rb +0 -19
- data/lib/alf/operator/relational/union.rb +0 -20
- data/lib/alf/operator/relational/unwrap.rb +0 -19
- data/lib/alf/operator/relational/wrap.rb +0 -20
- data/lib/alf/operator/signature.rb +0 -233
- data/lib/alf/operator/unary.rb +0 -16
- data/lib/alf/reader.rb +0 -37
- data/lib/alf/reader/alf_file.rb +0 -24
- data/lib/alf/reader/class_methods.rb +0 -91
- data/lib/alf/reader/instance_methods.rb +0 -97
- data/lib/alf/reader/rash.rb +0 -28
- data/lib/alf/relation.rb +0 -28
- data/lib/alf/relation/class_methods.rb +0 -28
- data/lib/alf/relation/instance_methods.rb +0 -119
- data/lib/alf/renderer.rb +0 -32
- data/lib/alf/renderer/class_methods.rb +0 -58
- data/lib/alf/renderer/instance_methods.rb +0 -55
- data/lib/alf/renderer/rash.rb +0 -33
- data/lib/alf/renderer/text.rb +0 -198
- data/lib/alf/tools.rb +0 -15
- data/lib/alf/tools/coerce.rb +0 -25
- data/lib/alf/tools/miscellaneous.rb +0 -111
- data/lib/alf/tools/to_lispy.rb +0 -96
- data/lib/alf/tools/to_relation.rb +0 -54
- data/lib/alf/tools/to_ruby_literal.rb +0 -31
- data/lib/alf/tools/tuple_handle.rb +0 -60
- data/lib/alf/types.rb +0 -49
- data/lib/alf/types/attr_list.rb +0 -160
- data/lib/alf/types/attr_name.rb +0 -66
- data/lib/alf/types/boolean.rb +0 -25
- data/lib/alf/types/heading.rb +0 -135
- data/lib/alf/types/ordering.rb +0 -146
- data/lib/alf/types/renaming.rb +0 -97
- data/lib/alf/types/size.rb +0 -57
- data/lib/alf/types/summarization.rb +0 -138
- data/lib/alf/types/tuple_computation.rb +0 -136
- data/lib/alf/types/tuple_expression.rb +0 -152
- data/lib/alf/types/tuple_predicate.rb +0 -73
- data/spec/integration/__database__/group.alf +0 -3
- data/spec/integration/__database__/parts.rash +0 -6
- data/spec/integration/__database__/suppliers.rash +0 -5
- data/spec/integration/__database__/suppliers_csv.csv +0 -6
- data/spec/integration/__database__/supplies.rash +0 -12
- data/spec/integration/alf/example.rash +0 -1
- data/spec/integration/alf/test_Relation.rb +0 -32
- data/spec/integration/ext/test_relation.rb +0 -16
- data/spec/integration/lispy/test_relation.rb +0 -37
- data/spec/integration/lispy/test_run.rb +0 -40
- data/spec/integration/lispy/test_tuple.rb +0 -36
- data/spec/integration/semantics/test_join.alf +0 -9
- data/spec/integration/semantics/test_minus.alf +0 -5
- data/spec/integration/semantics/test_project.alf +0 -8
- data/spec/integration/semantics/test_rank.alf +0 -34
- data/spec/integration/shell/alf/alf.db +0 -0
- data/spec/integration/shell/alf/alf_e.cmd +0 -1
- data/spec/integration/shell/alf/alf_e.stdout +0 -4
- data/spec/integration/shell/alf/alf_env.cmd +0 -1
- data/spec/integration/shell/alf/alf_env.stdout +0 -5
- data/spec/integration/shell/alf/alf_env_sqlite.cmd +0 -1
- data/spec/integration/shell/alf/alf_env_sqlite.stdout +0 -9
- data/spec/integration/shell/alf/alf_help.cmd +0 -1
- data/spec/integration/shell/alf/alf_help.stdout +0 -69
- data/spec/integration/shell/alf/alf_implicit.alf +0 -1
- data/spec/integration/shell/alf/alf_implicit_exec.cmd +0 -1
- data/spec/integration/shell/alf/alf_implicit_exec.stdout +0 -4
- data/spec/integration/shell/alf/alf_r.cmd +0 -1
- data/spec/integration/shell/alf/alf_r.stdout +0 -5
- data/spec/integration/shell/alf/alf_version.cmd +0 -1
- data/spec/integration/shell/alf/alf_version.stdout +0 -2
- data/spec/integration/shell/alf/alf_yaml.cmd +0 -1
- data/spec/integration/shell/alf/alf_yaml.stdout +0 -22
- data/spec/integration/shell/alf/rel.rash +0 -1
- data/spec/integration/shell/autonum/autonum_0.cmd +0 -1
- data/spec/integration/shell/autonum/autonum_0.stdout +0 -9
- data/spec/integration/shell/autonum/autonum_1.cmd +0 -1
- data/spec/integration/shell/autonum/autonum_1.stdout +0 -9
- data/spec/integration/shell/clip/clip_0.cmd +0 -1
- data/spec/integration/shell/clip/clip_0.stdout +0 -9
- data/spec/integration/shell/clip/clip_1.cmd +0 -1
- data/spec/integration/shell/clip/clip_1.stdout +0 -9
- data/spec/integration/shell/coerce/coerce_1.cmd +0 -1
- data/spec/integration/shell/coerce/coerce_1.stdout +0 -5
- data/spec/integration/shell/compact/compact_0.cmd +0 -1
- data/spec/integration/shell/compact/compact_0.stdout +0 -9
- data/spec/integration/shell/defaults/defaults_0.cmd +0 -1
- data/spec/integration/shell/defaults/defaults_0.stdout +0 -9
- data/spec/integration/shell/defaults/defaults_1.cmd +0 -1
- data/spec/integration/shell/defaults/defaults_1.stdout +0 -9
- data/spec/integration/shell/defaults/defaults_2.cmd +0 -1
- data/spec/integration/shell/defaults/defaults_2.stdout +0 -9
- data/spec/integration/shell/extend/extend_0.cmd +0 -1
- data/spec/integration/shell/extend/extend_0.stdout +0 -16
- data/spec/integration/shell/generator/generator_1.cmd +0 -1
- data/spec/integration/shell/generator/generator_1.stdout +0 -10
- data/spec/integration/shell/generator/generator_2.cmd +0 -1
- data/spec/integration/shell/generator/generator_2.stdout +0 -5
- data/spec/integration/shell/generator/generator_3.cmd +0 -1
- data/spec/integration/shell/generator/generator_3.stdout +0 -5
- data/spec/integration/shell/group/group_0.cmd +0 -1
- data/spec/integration/shell/group/group_0.stdout +0 -32
- data/spec/integration/shell/group/group_1.cmd +0 -1
- data/spec/integration/shell/group/group_1.stdout +0 -32
- data/spec/integration/shell/help/help_1.cmd +0 -1
- data/spec/integration/shell/help/help_1.stdout +0 -24
- data/spec/integration/shell/intersect/intersect_0.cmd +0 -1
- data/spec/integration/shell/intersect/intersect_0.stdout +0 -9
- data/spec/integration/shell/join/join_0.cmd +0 -1
- data/spec/integration/shell/join/join_0.stdout +0 -16
- data/spec/integration/shell/matching/matching_0.cmd +0 -1
- data/spec/integration/shell/matching/matching_0.stdout +0 -8
- data/spec/integration/shell/minus/minus_0.cmd +0 -1
- data/spec/integration/shell/minus/minus_0.stdout +0 -4
- data/spec/integration/shell/not-matching/not-matching_0.cmd +0 -1
- data/spec/integration/shell/not-matching/not-matching_0.stdout +0 -5
- data/spec/integration/shell/project/project_0.cmd +0 -1
- data/spec/integration/shell/project/project_0.stdout +0 -9
- data/spec/integration/shell/project/project_1.cmd +0 -1
- data/spec/integration/shell/project/project_1.stdout +0 -9
- data/spec/integration/shell/quota/quota_0.cmd +0 -1
- data/spec/integration/shell/quota/quota_0.stdout +0 -16
- data/spec/integration/shell/rank/rank_1.cmd +0 -1
- data/spec/integration/shell/rank/rank_1.stdout +0 -10
- data/spec/integration/shell/rank/rank_2.cmd +0 -1
- data/spec/integration/shell/rank/rank_2.stdout +0 -10
- data/spec/integration/shell/rank/rank_3.cmd +0 -1
- data/spec/integration/shell/rank/rank_3.stdout +0 -10
- data/spec/integration/shell/rank/rank_4.cmd +0 -1
- data/spec/integration/shell/rank/rank_4.stdout +0 -6
- data/spec/integration/shell/rank/rank_5.cmd +0 -1
- data/spec/integration/shell/rank/rank_5.stdout +0 -6
- data/spec/integration/shell/rename/rename_0.cmd +0 -1
- data/spec/integration/shell/rename/rename_0.stdout +0 -9
- data/spec/integration/shell/restrict/restrict_0.cmd +0 -1
- data/spec/integration/shell/restrict/restrict_0.stdout +0 -6
- data/spec/integration/shell/restrict/restrict_1.cmd +0 -1
- data/spec/integration/shell/restrict/restrict_1.stdout +0 -6
- data/spec/integration/shell/show/show_base.cmd +0 -1
- data/spec/integration/shell/show/show_base.stdout +0 -9
- data/spec/integration/shell/show/show_base_sort_1.cmd +0 -1
- data/spec/integration/shell/show/show_base_sort_1.stdout +0 -9
- data/spec/integration/shell/show/show_base_sort_2.cmd +0 -1
- data/spec/integration/shell/show/show_base_sort_2.stdout +0 -9
- data/spec/integration/shell/show/show_conflictual.cmd +0 -1
- data/spec/integration/shell/show/show_conflictual.stdout +0 -5
- data/spec/integration/shell/show/show_csv.cmd +0 -1
- data/spec/integration/shell/show/show_csv.stdout +0 -6
- data/spec/integration/shell/show/show_ff.cmd +0 -1
- data/spec/integration/shell/show/show_ff.stdout +0 -10
- data/spec/integration/shell/show/show_rash.cmd +0 -1
- data/spec/integration/shell/show/show_rash.stdout +0 -5
- data/spec/integration/shell/show/show_rash_pretty.cmd +0 -1
- data/spec/integration/shell/show/show_rash_pretty.stdout +0 -30
- data/spec/integration/shell/show/show_yaml.cmd +0 -1
- data/spec/integration/shell/show/show_yaml.stdout +0 -22
- data/spec/integration/shell/sort/sort_0.cmd +0 -1
- data/spec/integration/shell/sort/sort_0.stdout +0 -9
- data/spec/integration/shell/sort/sort_1.cmd +0 -1
- data/spec/integration/shell/sort/sort_1.stdout +0 -9
- data/spec/integration/shell/sort/sort_2.cmd +0 -1
- data/spec/integration/shell/sort/sort_2.stdout +0 -9
- data/spec/integration/shell/sort/sort_3.cmd +0 -1
- data/spec/integration/shell/sort/sort_3.stdout +0 -9
- data/spec/integration/shell/summarize/summarize_0.cmd +0 -1
- data/spec/integration/shell/summarize/summarize_0.stdout +0 -8
- data/spec/integration/shell/ungroup/ungroup_0.cmd +0 -1
- data/spec/integration/shell/ungroup/ungroup_0.stdout +0 -16
- data/spec/integration/shell/union/union_0.cmd +0 -1
- data/spec/integration/shell/union/union_0.stdout +0 -9
- data/spec/integration/shell/unwrap/unwrap_0.cmd +0 -1
- data/spec/integration/shell/unwrap/unwrap_0.stdout +0 -9
- data/spec/integration/shell/wrap/wrap_0.cmd +0 -1
- data/spec/integration/shell/wrap/wrap_0.stdout +0 -9
- data/spec/integration/test_alf.rb +0 -34
- data/spec/integration/test_examples.rb +0 -15
- data/spec/integration/test_lispy.rb +0 -31
- data/spec/integration/test_semantics.rb +0 -40
- data/spec/integration/test_shell.rb +0 -47
- data/spec/regression/alf_file/__FILE__.alf +0 -2
- data/spec/regression/alf_file/suppliers.rash +0 -5
- data/spec/regression/alf_file/test___FILE__.rb +0 -17
- data/spec/regression/heading/test_heading_with_date.rb +0 -12
- data/spec/regression/lispy/test_compile.rb +0 -14
- data/spec/regression/logs/apache_combined.log +0 -5
- data/spec/regression/logs/test_path_attribute.rb +0 -25
- data/spec/regression/relation/test_relation_allbut_all.rb +0 -14
- data/spec/regression/relation/test_relation_with_date.rb +0 -12
- data/spec/regression/restrict/test_restrict_with_keywords.rb +0 -17
- data/spec/shared/a_valid_type_implementation.rb +0 -47
- data/spec/shared/a_value.rb +0 -12
- data/spec/shared/an_operator_class.rb +0 -36
- data/spec/unit/alf-core/aggregator/test_avg.rb +0 -22
- data/spec/unit/alf-core/aggregator/test_collect.rb +0 -25
- data/spec/unit/alf-core/aggregator/test_concat.rb +0 -31
- data/spec/unit/alf-core/aggregator/test_count.rb +0 -17
- data/spec/unit/alf-core/aggregator/test_max.rb +0 -23
- data/spec/unit/alf-core/aggregator/test_min.rb +0 -23
- data/spec/unit/alf-core/aggregator/test_stddev.rb +0 -27
- data/spec/unit/alf-core/aggregator/test_sum.rb +0 -23
- data/spec/unit/alf-core/aggregator/test_variance.rb +0 -29
- data/spec/unit/alf-core/assumptions/test_file.rb +0 -17
- data/spec/unit/alf-core/assumptions/test_instance_eval.rb +0 -15
- data/spec/unit/alf-core/assumptions/test_scoping.rb +0 -29
- data/spec/unit/alf-core/assumptions/test_set.rb +0 -64
- data/spec/unit/alf-core/environment/examples/suppliers.rash +0 -5
- data/spec/unit/alf-core/environment/test_folder.rb +0 -53
- data/spec/unit/alf-core/operator/non_relational/test_autonum.rb +0 -48
- data/spec/unit/alf-core/operator/non_relational/test_clip.rb +0 -35
- data/spec/unit/alf-core/operator/non_relational/test_coerce.rb +0 -29
- data/spec/unit/alf-core/operator/non_relational/test_compact.rb +0 -32
- data/spec/unit/alf-core/operator/non_relational/test_defaults.rb +0 -53
- data/spec/unit/alf-core/operator/non_relational/test_generator.rb +0 -60
- data/spec/unit/alf-core/operator/non_relational/test_sort.rb +0 -60
- data/spec/unit/alf-core/operator/relational/test_extend.rb +0 -28
- data/spec/unit/alf-core/operator/relational/test_group.rb +0 -39
- data/spec/unit/alf-core/operator/relational/test_heading.rb +0 -27
- data/spec/unit/alf-core/operator/relational/test_intersect.rb +0 -58
- data/spec/unit/alf-core/operator/relational/test_join.rb +0 -36
- data/spec/unit/alf-core/operator/relational/test_minus.rb +0 -56
- data/spec/unit/alf-core/operator/relational/test_project.rb +0 -62
- data/spec/unit/alf-core/operator/relational/test_quota.rb +0 -36
- data/spec/unit/alf-core/operator/relational/test_rank.rb +0 -48
- data/spec/unit/alf-core/operator/relational/test_rename.rb +0 -26
- data/spec/unit/alf-core/operator/relational/test_restrict.rb +0 -45
- data/spec/unit/alf-core/operator/relational/test_summarize.rb +0 -44
- data/spec/unit/alf-core/operator/relational/test_ungroup.rb +0 -29
- data/spec/unit/alf-core/operator/relational/test_union.rb +0 -35
- data/spec/unit/alf-core/operator/relational/test_unwrap.rb +0 -26
- data/spec/unit/alf-core/operator/relational/test_wrap.rb +0 -26
- data/spec/unit/alf-core/operator/signature/test_argv2args.rb +0 -82
- data/spec/unit/alf-core/operator/signature/test_collect_on.rb +0 -38
- data/spec/unit/alf-core/operator/signature/test_initialize.rb +0 -17
- data/spec/unit/alf-core/operator/signature/test_install.rb +0 -56
- data/spec/unit/alf-core/operator/signature/test_option_parser.rb +0 -36
- data/spec/unit/alf-core/operator/signature/test_parse_args.rb +0 -90
- data/spec/unit/alf-core/operator/signature/test_to_lispy.rb +0 -102
- data/spec/unit/alf-core/operator/signature/test_to_shell.rb +0 -103
- data/spec/unit/alf-core/operator/test_non_relational.rb +0 -20
- data/spec/unit/alf-core/operator/test_relational.rb +0 -31
- data/spec/unit/alf-core/reader/input.rb +0 -2
- data/spec/unit/alf-core/reader/test_alf_file.rb +0 -30
- data/spec/unit/alf-core/reader/test_initialize.rb +0 -60
- data/spec/unit/alf-core/reader/test_looks_a_path.rb +0 -20
- data/spec/unit/alf-core/reader/test_rash.rb +0 -31
- data/spec/unit/alf-core/relation/test_coerce.rb +0 -53
- data/spec/unit/alf-core/relation/test_inspect.rb +0 -20
- data/spec/unit/alf-core/relation/test_relops.rb +0 -55
- data/spec/unit/alf-core/relation/test_to_a.rb +0 -41
- data/spec/unit/alf-core/renderer/test_initialize.rb +0 -60
- data/spec/unit/alf-core/test_aggregator.rb +0 -58
- data/spec/unit/alf-core/test_environment.rb +0 -30
- data/spec/unit/alf-core/test_operator.rb +0 -16
- data/spec/unit/alf-core/test_reader.rb +0 -40
- data/spec/unit/alf-core/test_relation.rb +0 -75
- data/spec/unit/alf-core/test_renderer.rb +0 -53
- data/spec/unit/alf-core/text/test_cell.rb +0 -35
- data/spec/unit/alf-core/text/test_row.rb +0 -30
- data/spec/unit/alf-core/text/test_table.rb +0 -39
- data/spec/unit/alf-core/tools/test_class_name.rb +0 -16
- data/spec/unit/alf-core/tools/test_coalesce.rb +0 -19
- data/spec/unit/alf-core/tools/test_coerce.rb +0 -16
- data/spec/unit/alf-core/tools/test_ruby_case.rb +0 -16
- data/spec/unit/alf-core/tools/test_to_lispy.rb +0 -145
- data/spec/unit/alf-core/tools/test_to_relation.rb +0 -39
- data/spec/unit/alf-core/tools/test_to_ruby_literal.rb +0 -10
- data/spec/unit/alf-core/tools/test_tuple_handle.rb +0 -52
- data/spec/unit/alf-core/tools/test_tuple_heading.rb +0 -15
- data/spec/unit/alf-core/tools/test_varargs.rb +0 -19
- data/spec/unit/alf-core/types/test_attr_list.rb +0 -188
- data/spec/unit/alf-core/types/test_attr_name.rb +0 -78
- data/spec/unit/alf-core/types/test_boolean.rb +0 -42
- data/spec/unit/alf-core/types/test_class_methods.rb +0 -24
- data/spec/unit/alf-core/types/test_heading.rb +0 -146
- data/spec/unit/alf-core/types/test_ordering.rb +0 -185
- data/spec/unit/alf-core/types/test_renaming.rb +0 -72
- data/spec/unit/alf-core/types/test_size.rb +0 -74
- data/spec/unit/alf-core/types/test_summarization.rb +0 -95
- data/spec/unit/alf-core/types/test_tuple_computation.rb +0 -96
- data/spec/unit/alf-core/types/test_tuple_expression.rb +0 -122
- data/spec/unit/alf-core/types/test_tuple_predicate.rb +0 -108
- data/spec/unit/alf-csv/input.csv +0 -3
- data/spec/unit/alf-csv/test_reader.rb +0 -66
- data/spec/unit/alf-csv/test_renderer.rb +0 -73
- data/spec/unit/alf-engine/compact/test_set.rb +0 -33
- data/spec/unit/alf-engine/compact/test_uniq.rb +0 -33
- data/spec/unit/alf-engine/group/test_hash.rb +0 -34
- data/spec/unit/alf-engine/join/test_hash.rb +0 -55
- data/spec/unit/alf-engine/materialize/test_array.rb +0 -28
- data/spec/unit/alf-engine/materialize/test_hash.rb +0 -76
- data/spec/unit/alf-engine/quota/test_cesure.rb +0 -34
- data/spec/unit/alf-engine/rank/test_cesure.rb +0 -47
- data/spec/unit/alf-engine/semi/test_hash.rb +0 -58
- data/spec/unit/alf-engine/sort/test_in_memory.rb +0 -32
- data/spec/unit/alf-engine/summarize/test_cesure.rb +0 -36
- data/spec/unit/alf-engine/summarize/test_hash.rb +0 -36
- data/spec/unit/alf-engine/test_aggregate.rb +0 -26
- data/spec/unit/alf-engine/test_autonum.rb +0 -24
- data/spec/unit/alf-engine/test_clip.rb +0 -34
- data/spec/unit/alf-engine/test_coerce.rb +0 -35
- data/spec/unit/alf-engine/test_compact.rb +0 -33
- data/spec/unit/alf-engine/test_concat.rb +0 -38
- data/spec/unit/alf-engine/test_defaults.rb +0 -37
- data/spec/unit/alf-engine/test_filter.rb +0 -23
- data/spec/unit/alf-engine/test_generator.rb +0 -25
- data/spec/unit/alf-engine/test_rename.rb +0 -24
- data/spec/unit/alf-engine/test_set_attr.rb +0 -38
- data/spec/unit/alf-engine/test_sort.rb +0 -32
- data/spec/unit/alf-engine/test_ungroup.rb +0 -28
- data/spec/unit/alf-engine/test_unwrap.rb +0 -20
- data/spec/unit/alf-engine/test_wrap.rb +0 -26
- data/spec/unit/alf-logs/apache_combined.log +0 -5
- data/spec/unit/alf-logs/postgresql.log +0 -29
- data/spec/unit/alf-logs/test_reader.rb +0 -57
- data/spec/unit/alf-sequel/alf.db +0 -0
- data/spec/unit/alf-sequel/test_environment.rb +0 -74
- data/spec/unit/alf-shell/doc_manager/dynamic.md +0 -1
- data/spec/unit/alf-shell/doc_manager/example.md +0 -1
- data/spec/unit/alf-shell/doc_manager/example_1.txt +0 -11
- data/spec/unit/alf-shell/doc_manager/static.md +0 -1
- data/spec/unit/alf-shell/doc_manager/test_call.rb +0 -48
- data/spec/unit/alf-shell/main/test_class_methods.rb +0 -44
- data/spec/unit/alf-shell/operator/test_autonum.rb +0 -28
- data/spec/unit/alf-shell/operator/test_clip.rb +0 -29
- data/spec/unit/alf-shell/operator/test_coerce.rb +0 -21
- data/spec/unit/alf-shell/operator/test_compact.rb +0 -16
- data/spec/unit/alf-shell/operator/test_defaults.rb +0 -29
- data/spec/unit/alf-shell/operator/test_extend.rb +0 -21
- data/spec/unit/alf-shell/operator/test_generator.rb +0 -37
- data/spec/unit/alf-shell/operator/test_group.rb +0 -32
- data/spec/unit/alf-shell/operator/test_heading.rb +0 -16
- data/spec/unit/alf-shell/operator/test_intersect.rb +0 -18
- data/spec/unit/alf-shell/operator/test_join.rb +0 -18
- data/spec/unit/alf-shell/operator/test_matching.rb +0 -18
- data/spec/unit/alf-shell/operator/test_minus.rb +0 -18
- data/spec/unit/alf-shell/operator/test_not_matching.rb +0 -18
- data/spec/unit/alf-shell/operator/test_project.rb +0 -38
- data/spec/unit/alf-shell/operator/test_quota.rb +0 -23
- data/spec/unit/alf-shell/operator/test_rank.rb +0 -30
- data/spec/unit/alf-shell/operator/test_rename.rb +0 -21
- data/spec/unit/alf-shell/operator/test_restrict.rb +0 -35
- data/spec/unit/alf-shell/operator/test_sort.rb +0 -49
- data/spec/unit/alf-shell/operator/test_summarize.rb +0 -30
- data/spec/unit/alf-shell/operator/test_ungroup.rb +0 -28
- data/spec/unit/alf-shell/operator/test_union.rb +0 -18
- data/spec/unit/alf-shell/operator/test_unwrap.rb +0 -28
- data/spec/unit/alf-shell/operator/test_wrap.rb +0 -30
- data/tasks/clean.rake +0 -3
- data/tasks/debug_mail.rake +0 -75
- data/tasks/debug_mail.txt +0 -18
- data/tasks/gh-pages.rake +0 -68
- data/tasks/integration_test.rake +0 -43
- data/tasks/regression_test.rake +0 -44
- data/tasks/unit_test.rake +0 -44
- data/tasks/yard.rake +0 -51
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,109 @@
|
|
|
1
|
+
# 0.13.0 / FIX ME
|
|
2
|
+
|
|
3
|
+
* Ruby 1.8.x is no longer supported. Please upgrade.
|
|
4
|
+
|
|
5
|
+
## Enhancements of the shell interface
|
|
6
|
+
|
|
7
|
+
* When used in shell, the default database is set to the current folder instead of the embedded suppliers and parts example database. This saves you from having to use 'alf --db=.' everytime you want to use .csv or .rash files as base relations. An --examples option allows easily setting the embedded database as default one.
|
|
8
|
+
|
|
9
|
+
* When used in shell, the default rendering format is set to --text if the standard output is detected to be a tty. This saves you from having to use 'alf ... | alf show' too many times. The behavior of alf in shell, 'alf show' in particular, might be broken for you (see below). Thanks go to @eregontp for this suggestion!
|
|
10
|
+
|
|
11
|
+
* Added --json output format.
|
|
12
|
+
|
|
13
|
+
## Enhancements of the ruby interface
|
|
14
|
+
|
|
15
|
+
* Added Alf.connect for connecting to databases in the easiest possible way:
|
|
16
|
+
|
|
17
|
+
Alf.connect("somewhere/to/a/folder") do |conn| ... end
|
|
18
|
+
Alf.connect("database.sqlite3") do |conn| ... end
|
|
19
|
+
Alf.connect("postgres://user:password@host/database") ...
|
|
20
|
+
Alf.connect(adapter: "sqlite", database: "test.sqlite3") ...
|
|
21
|
+
|
|
22
|
+
* Evaluation of queries are now sent to a connection specifically:
|
|
23
|
+
|
|
24
|
+
Alf.connect(...) do |conn|
|
|
25
|
+
conn.query{ (restrict :suppliers, ->{ status > 10 } )}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
* Alf::Relation now respond to aggregation functions with an object-oriented syntax:
|
|
29
|
+
|
|
30
|
+
Relation(...).sum{ qty }
|
|
31
|
+
|
|
32
|
+
* Alf::Relation(...) (aliased as Alf.relation) now recognize IO objects and Path.like instances and load them with available readers in the easiest possible way:
|
|
33
|
+
|
|
34
|
+
Alf::Relation("path/to/a/suppliers.csv")
|
|
35
|
+
# => Alf::Relation[...]
|
|
36
|
+
|
|
37
|
+
* Alf::Relation(...) ensures that attribute names are Symbols and symbolize them if needed.
|
|
38
|
+
|
|
39
|
+
* Added Relation#tuple_extract, aliased as Relation#tuple! that returns the only tuple of the relation, or raises a NoSuchTupleError if no tuple or more than one.
|
|
40
|
+
|
|
41
|
+
* Added Alf::Tuple(...) that behaves similarly to Alf::Relation(...) but for tuples.
|
|
42
|
+
|
|
43
|
+
* Added Alf.reader as a convenient shortcut for Alf::Reader.reader.
|
|
44
|
+
|
|
45
|
+
Alf.reader("path/to/a/suppliers.csv")
|
|
46
|
+
# => #<Alf::CSV::Reader:0x007fd554058440 ...>
|
|
47
|
+
|
|
48
|
+
* Added Alf::Reader#path that always returns a Path instance, unless the reader operates on an IO/StringIO. Use Alf::Reader#input to get the source passed at construction.
|
|
49
|
+
|
|
50
|
+
* All queries as well as tuple expressions (in restrictions, extensions, summarizations, etc.) are now evaluated in a cleaner and extended scope through a BasicObject extended with all database helpers. This has multiple advantages and one drawback:
|
|
51
|
+
* It allows you to have all database helpers available in those expressions.
|
|
52
|
+
* You no longer have to worry about name clashes with Kernel's methods.
|
|
53
|
+
* Kernel's functions are no longer accessible whithout prefixing with ::Kernel.
|
|
54
|
+
|
|
55
|
+
* In sync with the previous point, Relation (the class), DUM and DEE are now defined globally (unless you define `ALF_NO_CORE_EXTENSIONS` before loading Alf). Those constants can thus be safely used in query expressions without experiencing a NameError.
|
|
56
|
+
|
|
57
|
+
* Added a JSON renderer.
|
|
58
|
+
|
|
59
|
+
## Bug fixes
|
|
60
|
+
|
|
61
|
+
* The Aggregator class, Summarization type and Summarize operator have been made thread-safe through #happens that now takes a TupleScope instead of a tuple.
|
|
62
|
+
|
|
63
|
+
* Sequel::Connection#relvar correctly raises a NoSuchRelvarError if no table can be found.
|
|
64
|
+
|
|
65
|
+
## Broken stuff
|
|
66
|
+
|
|
67
|
+
* The `heading` operator has been renamed `infer-heading` (Heading -> InferHeading accordingly).
|
|
68
|
+
|
|
69
|
+
* `Alf.lispy` has been removed from the public API. Please use `connect` instead:
|
|
70
|
+
|
|
71
|
+
Alf.lipsy(db_params).query{ ... }
|
|
72
|
+
|
|
73
|
+
becomes:
|
|
74
|
+
|
|
75
|
+
Alf.connect(db_params) do |conn|
|
|
76
|
+
conn.query{ ... }
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
* The Environment concept as been removed and replaced by Connection. That also means that `environment` readers and writers here have been replaced according to cases. Also, the --env option has been renamed to --db in the shell command. This is a major incompatible change of Alf internals that might break existing code that extends Alf::Environment, Alf::Reader or any subclass.
|
|
80
|
+
|
|
81
|
+
* Connection#dataset has been replaced to Connection#relvar and now serves relation variables instead of pure iterators.
|
|
82
|
+
|
|
83
|
+
* You now have to explicitely use 'alf show --text > ...' or 'alf --text ... > ' if you don't want ruby hashes to be outputted to output files. This is a consequence of tty detection that ensures a better shell experience.
|
|
84
|
+
|
|
85
|
+
* Kernel's functions are no longer accessible in tuple expressions that are executed within a BasicObject's scope.
|
|
86
|
+
|
|
87
|
+
* The syntax (Relation :relvar_name) is no longer supported as it does not denote a relation literal at all.
|
|
88
|
+
|
|
89
|
+
* `Iterator#to_rel` has been removed. Use `Iterator#to_relation` instead.
|
|
90
|
+
|
|
91
|
+
* Renderers are no longer able to coerce their input from a Symbol.
|
|
92
|
+
|
|
93
|
+
* Renderer.renderers and Renderer.each_renderer have been removed. Use Renderer.all and Renderer.each instead, respectively.
|
|
94
|
+
|
|
95
|
+
* Reader.readers has been removed. Use Reader.all or Reader.each instead.
|
|
96
|
+
|
|
97
|
+
* Aggregator.aggregators has been removed. Use Aggregator.all or Aggregator.each instead.
|
|
98
|
+
|
|
99
|
+
* TupleExpression#call and TupleExpression#[] have been removed.
|
|
100
|
+
|
|
101
|
+
* TuplePredicate has been replaced by Predicate. The latter is no longer a subclass of TupleExpression.
|
|
102
|
+
|
|
103
|
+
## Bug fixes
|
|
104
|
+
|
|
105
|
+
* The backports gem is no longer required on ruby =1.9
|
|
106
|
+
|
|
1
107
|
# 0.12.2 / 2012-06-12
|
|
2
108
|
|
|
3
109
|
* Bumped and weakened backports dependency to '~> 2.6'
|
|
@@ -19,10 +125,10 @@
|
|
|
19
125
|
|
|
20
126
|
* Add a Relation() toplevel method that mimics Array(), Integer(), and so on.
|
|
21
127
|
That method uses Tools::ToRelation which is a set of Myrrha coercion rules.
|
|
22
|
-
The Relation() method helps building relation "literals" (say) for common
|
|
128
|
+
The Relation() method helps building relation "literals" (say) for common
|
|
23
129
|
cases, such as the following:
|
|
24
130
|
|
|
25
|
-
Relation(:name => "Alf")
|
|
131
|
+
Relation(:name => "Alf")
|
|
26
132
|
# => (Relation (Tuple :name => "Alf"))
|
|
27
133
|
|
|
28
134
|
Relation([{:name => "Alf"}, {:name => "Myrrha"}])
|
|
@@ -66,31 +172,31 @@
|
|
|
66
172
|
|
|
67
173
|
## Miscellaneous enhancements
|
|
68
174
|
|
|
69
|
-
* Added Variance and Stddev aggregation operators; they are available under
|
|
175
|
+
* Added Variance and Stddev aggregation operators; they are available under
|
|
70
176
|
Aggregator.variance{} and Aggregator.stddev{}, respectively
|
|
71
|
-
* Added a --pretty option to 'alf', whose semantics is delegated to the output
|
|
177
|
+
* Added a --pretty option to 'alf', whose semantics is delegated to the output
|
|
72
178
|
renderer. Same option is available on 'alf show'.
|
|
73
179
|
* 'alf show' now accepts an optional ordering argument. This avoids explicitely
|
|
74
|
-
including non-relational sort invocations in your pipe (sorting should be
|
|
180
|
+
including non-relational sort invocations in your pipe (sorting should be
|
|
75
181
|
seen as a displaying issue)
|
|
76
182
|
* Added an options hash to text renderer, :float_format among others
|
|
77
183
|
* Added a --ff option to 'alf show', for float format in text rendering
|
|
78
184
|
|
|
79
185
|
## Bugfixes
|
|
80
186
|
|
|
81
|
-
* Alf::Environment::(Folder/Explicit)#dataset now correctly raises a
|
|
187
|
+
* Alf::Environment::(Folder/Explicit)#dataset now correctly raises a
|
|
82
188
|
NoSuchDatasetError when the dataset cannot be found, as required by the
|
|
83
189
|
specification.
|
|
84
|
-
* Alf::Reader.reader now correctly returns a Rash reader when invoked on a
|
|
190
|
+
* Alf::Reader.reader now correctly returns a Rash reader when invoked on a
|
|
85
191
|
StringIO
|
|
86
192
|
|
|
87
193
|
# 0.10.0 / 2011-08-15
|
|
88
194
|
|
|
89
195
|
## New recognized data sources
|
|
90
196
|
|
|
91
|
-
* Alf now provides an Environment implementation on top of a SQL database.
|
|
92
|
-
This means that SQL tables can now be used as data-sources. This feature
|
|
93
|
-
relies on the sequel gem ('gem install sequel' is required), that drives
|
|
197
|
+
* Alf now provides an Environment implementation on top of a SQL database.
|
|
198
|
+
This means that SQL tables can now be used as data-sources. This feature
|
|
199
|
+
relies on the sequel gem ('gem install sequel' is required), that drives
|
|
94
200
|
recognized SQL servers. Then (don't forget that ALF_OPTS also exists):
|
|
95
201
|
|
|
96
202
|
% alf --env=postgres://user:password@host/database show table
|
|
@@ -101,12 +207,12 @@
|
|
|
101
207
|
|
|
102
208
|
% alf restrict suppliers.csv -- "city == 'Paris'" (input)
|
|
103
209
|
% alf show suppliers --csv (output)
|
|
104
|
-
|
|
210
|
+
|
|
105
211
|
* Alf now recognizes and allows manipulating .log files as first-class data
|
|
106
212
|
sources. This feature relies on request-log-analyzer gem that provides the
|
|
107
|
-
parsers that Alf uses, and the log formats it recognizes
|
|
213
|
+
parsers that Alf uses, and the log formats it recognizes
|
|
108
214
|
('gem install request-log-analyzer' is required). See examples/logs.
|
|
109
|
-
|
|
215
|
+
|
|
110
216
|
## New operators and enhancements
|
|
111
217
|
|
|
112
218
|
* A GENERATOR operator is introduced. It allows generating a relation with one
|
|
@@ -114,16 +220,16 @@
|
|
|
114
220
|
|
|
115
221
|
* A COERCE operator is introduced. It provides a quick way to obtain type-safe
|
|
116
222
|
relations from type-unsafe sources like .csv files. For example:
|
|
117
|
-
|
|
223
|
+
|
|
118
224
|
% alf coerce mydirtyfile.csv -- name String price Float at Time
|
|
119
|
-
|
|
225
|
+
|
|
120
226
|
The coerce operator is of course available in Ruby as well:
|
|
121
|
-
|
|
227
|
+
|
|
122
228
|
(coerce "mydirtyfile.csv", :name => String, :price => Float, :at => Time)
|
|
123
|
-
|
|
229
|
+
|
|
124
230
|
* The DEFAULTS (non-relational) operator now accepts default values as tuple
|
|
125
231
|
expressions. When used in shell, provided default values are now evaluated
|
|
126
|
-
that way. This allows specifying default values as being computed on the
|
|
232
|
+
that way. This allows specifying default values as being computed on the
|
|
127
233
|
current tuple.
|
|
128
234
|
|
|
129
235
|
* Aggregations in the Lispy DSL must not be prefixed by Agg:: anymore.
|
|
@@ -144,8 +250,8 @@
|
|
|
144
250
|
Agg::sum{ qty } # !! error !!
|
|
145
251
|
sum{ qty } # simply, and only!
|
|
146
252
|
|
|
147
|
-
* The group aggregation operator has been removed. It will probably be replaced
|
|
148
|
-
in a future version. In the meantime, the GROUP relational operator allows
|
|
253
|
+
* The group aggregation operator has been removed. It will probably be replaced
|
|
254
|
+
in a future version. In the meantime, the GROUP relational operator allows
|
|
149
255
|
obtaining similar results.
|
|
150
256
|
|
|
151
257
|
* Lispy syntax of CLIP has changed (when used with --allbut option)
|
|
@@ -187,8 +293,8 @@
|
|
|
187
293
|
|
|
188
294
|
* Shell syntax of WRAP has changed (option separator before introduced name)
|
|
189
295
|
|
|
190
|
-
% alf --text wrap suppliers -- city status loc_and_status (before)
|
|
191
|
-
% alf --text wrap suppliers -- city status -- loc_and_status (after)
|
|
296
|
+
% alf --text wrap suppliers -- city status loc_and_status (before)
|
|
297
|
+
% alf --text wrap suppliers -- city status -- loc_and_status (after)
|
|
192
298
|
|
|
193
299
|
* Shell syntax of QUOTA has changed (--by and --order become pure arguments)
|
|
194
300
|
|
|
@@ -205,33 +311,33 @@
|
|
|
205
311
|
% alf summarize supplies --by=sid -- total_qty "sum{ qty }" (before)
|
|
206
312
|
% alf summarize supplies -- sid -- total_qty "sum{ qty }" (after)
|
|
207
313
|
|
|
208
|
-
## Bug fixes
|
|
314
|
+
## Bug fixes
|
|
209
315
|
|
|
210
|
-
* [In shell] Options are now correctly parsed in presence of option separators.
|
|
211
|
-
That is, every argument after a '--' separator is considered a non-option
|
|
212
|
-
argument.
|
|
316
|
+
* [In shell] Options are now correctly parsed in presence of option separators.
|
|
317
|
+
That is, every argument after a '--' separator is considered a non-option
|
|
318
|
+
argument.
|
|
213
319
|
|
|
214
320
|
# 0.9.3 / 2011-07-23
|
|
215
321
|
|
|
216
322
|
## New operators (available both in shell and in Lispy DSL)
|
|
217
323
|
|
|
218
|
-
* Added MATCHING and NOT MATCHING operators. These operators are useful
|
|
324
|
+
* Added MATCHING and NOT MATCHING operators. These operators are useful
|
|
219
325
|
shortcuts for the following expressions.
|
|
220
|
-
|
|
326
|
+
|
|
221
327
|
(matching l, r) := (project (join l, r), [l's attributes])
|
|
222
328
|
(not_matching l, r) := (minus l, (matching l, r))
|
|
223
|
-
|
|
224
|
-
For example:
|
|
225
|
-
|
|
329
|
+
|
|
330
|
+
For example:
|
|
331
|
+
|
|
226
332
|
# Give suppliers who supply at least one part
|
|
227
333
|
(matching suppliers, supplies)
|
|
228
334
|
|
|
229
335
|
# Give suppliers who don't supply any part
|
|
230
336
|
(not_matching suppliers, supplies)
|
|
231
337
|
|
|
232
|
-
* Added RANK operator, which is useful for for computing quota queries as
|
|
338
|
+
* Added RANK operator, which is useful for for computing quota queries as
|
|
233
339
|
illustrated below. See 'alf help rank' for details.
|
|
234
|
-
|
|
340
|
+
|
|
235
341
|
# Give the three heaviest parts
|
|
236
342
|
(restrict (rank :parts, [[:weight, :desc]], :pos), lambda{ pos < 3 })
|
|
237
343
|
|
|
@@ -239,71 +345,71 @@
|
|
|
239
345
|
|
|
240
346
|
* added 'alf -r', that mimics 'ruby -r' (require library before run)
|
|
241
347
|
|
|
242
|
-
* When alf is invoked in shell (and only in this case), ALF_OPTS is used as
|
|
243
|
-
global options to apply as if they were specified inline:
|
|
244
|
-
|
|
245
|
-
% export ALF_OPTS="--env=. --yaml"
|
|
348
|
+
* When alf is invoked in shell (and only in this case), ALF_OPTS is used as
|
|
349
|
+
global options to apply as if they were specified inline:
|
|
350
|
+
|
|
351
|
+
% export ALF_OPTS="--env=. --yaml"
|
|
246
352
|
% alf show suppliers
|
|
247
|
-
|
|
248
|
-
is the same as
|
|
249
|
-
|
|
353
|
+
|
|
354
|
+
is the same as
|
|
355
|
+
|
|
250
356
|
% alf --env=. --yaml show suppliers
|
|
251
|
-
|
|
252
|
-
* 'alf --help' now distinguishes experimental operators (quota in particular)
|
|
253
|
-
from those coming from the (much more stable) **Tutorial D** specification. The
|
|
254
|
-
former should be used with care as their specification may change at any
|
|
255
|
-
time.
|
|
256
357
|
|
|
257
|
-
|
|
358
|
+
* 'alf --help' now distinguishes experimental operators (quota in particular)
|
|
359
|
+
from those coming from the (much more stable) **Tutorial D** specification. The
|
|
360
|
+
former should be used with care as their specification may change at any
|
|
361
|
+
time.
|
|
362
|
+
|
|
363
|
+
## Enhancements when using Alf in Ruby
|
|
258
364
|
|
|
259
365
|
* Alf.lispy now accepts any argument recognized by Environment.autodetect; it
|
|
260
366
|
obtains its working Environment that way. Among others:
|
|
261
|
-
|
|
367
|
+
|
|
262
368
|
Alf.lispy(Alf::Environment.folder("path/to/an/existing/folder"))
|
|
263
|
-
|
|
264
|
-
is the same as:
|
|
265
|
-
|
|
369
|
+
|
|
370
|
+
is the same as:
|
|
371
|
+
|
|
266
372
|
Alf.lispy("path/to/an/existing/folder")
|
|
267
373
|
|
|
268
374
|
* Added Relation::DUM and Relation::DEE constants (relations of empty heading
|
|
269
|
-
with no and one tuple, respectively). They are also available as DUM and DEE
|
|
375
|
+
with no and one tuple, respectively). They are also available as DUM and DEE
|
|
270
376
|
in Lispy functional expressions.
|
|
271
377
|
|
|
272
378
|
* Added a Heading abstraction, as a set of attribute (name, type) pairs.
|
|
273
379
|
|
|
274
380
|
## Internal enhancements (extension points)
|
|
275
381
|
|
|
276
|
-
* The Reader and Renderer classes accept a Hash of options as third
|
|
277
|
-
constructor argument. These options can be used by extension points.
|
|
278
|
-
|
|
382
|
+
* The Reader and Renderer classes accept a Hash of options as third
|
|
383
|
+
constructor argument. These options can be used by extension points.
|
|
384
|
+
|
|
279
385
|
* The Environment class now provides a class-based registering mechanism 'ala'
|
|
280
386
|
Reader and Renderer. This allows auto-detecting the target environment when
|
|
281
|
-
--env=... is used in shell. See Environment.autodetect and
|
|
282
|
-
Environment#recognizes? for contributing to this extension point.
|
|
283
|
-
|
|
284
|
-
* Internals now rely on Myrrha for code generation. This means that all
|
|
387
|
+
--env=... is used in shell. See Environment.autodetect and
|
|
388
|
+
Environment#recognizes? for contributing to this extension point.
|
|
389
|
+
|
|
390
|
+
* Internals now rely on Myrrha for code generation. This means that all
|
|
285
391
|
datatypes can now be safely used in relations and dumped to .rash files in
|
|
286
|
-
particular.
|
|
392
|
+
particular.
|
|
287
393
|
|
|
288
394
|
## Bug fixes
|
|
289
395
|
|
|
290
|
-
* Added Relation#allbut, forgotten in two previous releases
|
|
396
|
+
* Added Relation#allbut, forgotten in two previous releases
|
|
291
397
|
* Fixed (join xxx, DEE) and (join xxx, DUM)
|
|
292
398
|
* Fixed scoping bug when using attributes named :path, :expr or :block in
|
|
293
399
|
Lispy compiled expressions (coming from .alf files)
|
|
294
400
|
* Fixed 'alf --yaml show suppliers' that renderer a --text table instead of
|
|
295
401
|
a yaml output
|
|
296
402
|
* Fixed bugs when using Date and Time attributes with .rash files
|
|
297
|
-
* Fixed bugs when using Date and Time attributes in restrict expressions
|
|
403
|
+
* Fixed bugs when using Date and Time attributes in restrict expressions
|
|
298
404
|
compiled from the commandline
|
|
299
|
-
* Fixed a few bugs when using attribute names that are ruby keywords
|
|
300
|
-
(restrict & extend)
|
|
405
|
+
* Fixed a few bugs when using attribute names that are ruby keywords
|
|
406
|
+
(restrict & extend)
|
|
301
407
|
|
|
302
408
|
# 0.9.2 / 2011.07.13
|
|
303
409
|
|
|
304
410
|
# Bug fixes
|
|
305
411
|
|
|
306
|
-
* Fixed the "alf show" command (undefined method `chain')
|
|
412
|
+
* Fixed the "alf show" command (undefined method `chain')
|
|
307
413
|
|
|
308
414
|
# 0.9.1 / 2011.07.13
|
|
309
415
|
|
|
@@ -312,17 +418,17 @@
|
|
|
312
418
|
* Added the in-memory Alf::Relation data structure and associated tooling.
|
|
313
419
|
This allows using Alf in a object-oriented usual way, in addition to the
|
|
314
420
|
functional DSL:
|
|
315
|
-
|
|
421
|
+
|
|
316
422
|
Alf.lispy.evaluate {
|
|
317
423
|
(join (restrict :suppliers, lambda{ status > 10 }), :cities)
|
|
318
424
|
}
|
|
319
|
-
|
|
425
|
+
|
|
320
426
|
is equivalent to
|
|
321
|
-
|
|
322
|
-
suppliers, cities = [...], [...]
|
|
427
|
+
|
|
428
|
+
suppliers, cities = [...], [...]
|
|
323
429
|
suppliers.restrict(lambda{ status > 10 }).join(cities)
|
|
324
|
-
|
|
325
|
-
see README about how to obtain suppliers and cities relations in the first
|
|
430
|
+
|
|
431
|
+
see README about how to obtain suppliers and cities relations in the first
|
|
326
432
|
place.
|
|
327
433
|
|
|
328
434
|
* Summarize now accepts a --allbut option, to specify 'by' attributes from an
|
|
@@ -333,9 +439,9 @@
|
|
|
333
439
|
|
|
334
440
|
## Non backward-compatible changes to public APIs
|
|
335
441
|
|
|
336
|
-
* Lispy#with has been removed because not being stable enough. The clean way
|
|
442
|
+
* Lispy#with has been removed because not being stable enough. The clean way
|
|
337
443
|
of reusing sub-queries is as follows (non purely functional, so far)
|
|
338
|
-
|
|
444
|
+
|
|
339
445
|
kept_suppliers = (restrict :suppliers, lambda{ status > 10 })
|
|
340
446
|
with_countries = (join kept_suppliers, :cities)
|
|
341
447
|
supplying = (join with_countries, :supplies)
|
|
@@ -343,26 +449,26 @@
|
|
|
343
449
|
[:country],
|
|
344
450
|
:which => Agg::group(:pid),
|
|
345
451
|
:total => Agg::sum{ qty })
|
|
346
|
-
|
|
347
|
-
* As a consequence, named data sources (Symbols, like :suppliers above) are
|
|
452
|
+
|
|
453
|
+
* As a consequence, named data sources (Symbols, like :suppliers above) are
|
|
348
454
|
now resolved at compile time, which is less powerful, yet much simpler and
|
|
349
455
|
sound.
|
|
350
456
|
|
|
351
457
|
* Nest and Unnest have been renamed to Wrap and Unwrap respectively. This is
|
|
352
458
|
to better conform to **Tutorial D**'s terminology.
|
|
353
|
-
|
|
354
|
-
* Lispy#chain was kept public in 0.9.0 by error and has been entirely removed
|
|
459
|
+
|
|
460
|
+
* Lispy#chain was kept public in 0.9.0 by error and has been entirely removed
|
|
355
461
|
from the DSL.
|
|
356
462
|
|
|
357
463
|
## Enhancements (internals)
|
|
358
464
|
|
|
359
|
-
* Reader.reader delegates to Reader.coerce when its first argument is not
|
|
465
|
+
* Reader.reader delegates to Reader.coerce when its first argument is not
|
|
360
466
|
a String. This allows calling Reader.reader(args.first || $stdin) in quickl
|
|
361
467
|
commands for example.
|
|
362
|
-
|
|
363
|
-
* Operator, Operator::Relational and Operator::NonRelational have a .each
|
|
468
|
+
|
|
469
|
+
* Operator, Operator::Relational and Operator::NonRelational have a .each
|
|
364
470
|
class method that yields operator classes
|
|
365
|
-
|
|
471
|
+
|
|
366
472
|
## Bug fixes
|
|
367
473
|
|
|
368
474
|
* Fixed a bug that led to an Nil error when using unary operators on $stdin
|
data/Gemfile
CHANGED
|
@@ -1,42 +1,26 @@
|
|
|
1
1
|
source 'http://rubygems.org'
|
|
2
2
|
|
|
3
3
|
group :runtime do
|
|
4
|
-
gem "
|
|
5
|
-
gem "
|
|
6
|
-
gem "
|
|
4
|
+
# gem "alf-core", path: "../alf-core"
|
|
5
|
+
# gem "alf-sequel", path: "../alf-sequel"
|
|
6
|
+
# gem "alf-shell", path: "../alf-shell"
|
|
7
|
+
# gem "alf-core", git: "git://github.com/alf-tool/alf-core.git"
|
|
8
|
+
# gem "alf-sequel", git: "git://github.com/alf-tool/alf-sequel.git"
|
|
9
|
+
# gem "alf-shell", git: "git://github.com/alf-tool/alf-shell.git"
|
|
10
|
+
gem "alf-core", "~> 0.13.0"
|
|
11
|
+
gem "alf-sequel", "~> 0.13.0"
|
|
12
|
+
gem "alf-shell", "~> 0.13.1"
|
|
7
13
|
end
|
|
8
14
|
|
|
9
15
|
group :test do
|
|
10
|
-
gem "rake", "~>
|
|
11
|
-
gem "rspec", "~> 2.
|
|
16
|
+
gem "rake", "~> 10.1"
|
|
17
|
+
gem "rspec", "~> 2.14"
|
|
18
|
+
gem "sqlite3", "~> 1.3", :platforms => ['mri', 'rbx']
|
|
19
|
+
gem "jdbc-sqlite3", "~> 3.7", :platforms => ['jruby']
|
|
20
|
+
gem "pg", "~> 0.14", :platforms => ['mri', 'rbx']
|
|
12
21
|
end
|
|
13
22
|
|
|
14
23
|
group :release do
|
|
15
|
-
gem "rake", "~>
|
|
16
|
-
gem "rspec", "~> 2.
|
|
17
|
-
gem "wlang", "~> 0.10.2"
|
|
24
|
+
gem "rake", "~> 10.1"
|
|
25
|
+
gem "rspec", "~> 2.14"
|
|
18
26
|
end
|
|
19
|
-
|
|
20
|
-
group :doc do
|
|
21
|
-
gem "yard", "~> 0.7.2"
|
|
22
|
-
gem "bluecloth", "~> 2.2.0"
|
|
23
|
-
gem "redcarpet", "~> 2.1.0"
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
group :extra do
|
|
27
|
-
gem "fastercsv", "~> 1.5.4"
|
|
28
|
-
gem "request-log-analyzer", "~> 1.11.0"
|
|
29
|
-
gem "sequel", "~> 3.30"
|
|
30
|
-
gem "highline", "~> 1.6.2"
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
platform 'jruby' do
|
|
34
|
-
group :extra do
|
|
35
|
-
gem "jdbc-sqlite3", "~> 3.7"
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
platform 'mri' do
|
|
39
|
-
group :extra do
|
|
40
|
-
gem "sqlite3", "~> 1.3"
|
|
41
|
-
end
|
|
42
|
-
end
|