Questions tagged [arel]

Arel is a Relational Algebra for Ruby. It simplifies the generation complex of SQL queries and it adapts to various RDBMS systems.

Arel is a Relational Algebra for . It simplifies the generation complex of SQL queries and it adapts to various RDBMS systems. More info on project's page. The Arel gem is supported in framework versions 3.0 and up, however for the 2nd version of Rails the fake_arel gem shell be used.

723 questions
-1
votes
2 answers

Library to convert SQL to relational algebra

There are many relational algebra packages (arel, axiom, alf) which generate SQL from an abstract representation of a query. Are there any libraries that allow you to go the other way - from SQL to a relational algebra?
Cameron Martin
  • 5,952
  • 2
  • 40
  • 53
-1
votes
1 answer

how to intersect two associations in arel?

I have a project model w/ this association describing team members that have accepted (status) Class Project < ActiveRecord::Base has_many :participants, :through => :team_members, :source => :user, :conditions => ['team_members.status = ?',…
Mark Nadig
  • 4,901
  • 4
  • 37
  • 46
-4
votes
1 answer

Ruby: <<- operator

I'm working on Rails. In my code base, I see a line that using Arel::SqlLiteral like this: result = Arel::Nodes::SqlLiteral.new(<<-SQL CASE WHEN condition1 THEN calculation1 WHEN condition2 THEN calculation2 WHEN condition3 THEN calculation3 …
Trần Kim Dự
  • 5,872
  • 12
  • 55
  • 107
1 2 3
48
49