Sha256: 2e7daea8b157dd68c4e40a213fe3b51071cb1cc045ba179075af7b34e8ffa479
Contents?: true
Size: 703 Bytes
Versions: 2
Compression:
Stored size: 703 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Algebra::Projection do context 'remove attributes in predicate' do subject { restriction.project([:name]) } let(:left) { Relation.new([[:id, Integer]], (0..11).map { |n| [n] }) } let(:right) { Relation.new([[:name, String]], [['Dan Kubb'], ['John Doe'], ['Jane Doe']]) } let(:relation) { left * right } let(:restriction) { relation.restrict { |r| r.id.gte(1).and(r.id.lte(10)).and(r.name.eq('Dan Kubb')) } } it 'returns a relation with a single tuple' do should == [['Dan Kubb']] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.2.0 | spec/integration/axiom/algebra/projection_spec.rb |
axiom-0.1.1 | spec/integration/axiom/algebra/projection_spec.rb |