Skip to content

projections shouldn't always be pushed down the tree. #51

@robertoplancarte

Description

@robertoplancarte

This test fails on the second expect because projection always happens before transform.

    it 'respects order of operations' do
      db = Relation.new([{ a: 'a' }, { a: 'A' }])

      got = db.project([:a]).transform(:upcase)
      expect(got.to_a).to eql([{ a: 'A' }, { a: 'A' }])

      got = db.transform(:upcase).project([:a])
      expect(got.to_a).to eql([{ a: 'A' }])
    end

This issue was introduced by commit efcdd73 because projections can't always be pushed down the tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions