arel
Arel causing infinite loop on aggregation
I have trouble with using Arel to aggregate 2 columns in the same query. When I run this, the whole server freezes for a minute, before the rails dev-server crashes. I suspect an infinite loop :).[详细]
2023-01-19 17:59 分类:问答Group Query with Calculations on Rails 3
Rails 3 problem. I have a Foods table of foods with the following attributes: name calories (per gram) fat (per gram)[详细]
2023-01-13 04:54 分类:问答Rails Arel selecting distinct columns
I\'ve hit a slight block with the new scope methods (Arel 0.4.0, Rails 3.0.0.rc) Basically I have: A topics model, which has_many :comments, and a comments model (with a topic_id column) which belon[详细]
2023-01-12 16:22 分类:问答rewrite complicated query with union in arel?
I have the following models class Courier < ActiveRecord::Base has_many :coverages end class Coverage < ActiveRecord::Base[详细]
2023-01-12 11:07 分类:问答Rails3 and Arel to select using IN and subselect
I have a table called translations. (And a correspoding ActiveRecord class). This table contains the following fields[详细]
2023-01-11 02:58 分类:问答problem: activerecord (rails3), chaining scopes with includes
In Rails3 there seems to be a problem when chaining two scopes (ActiveRelations) that each have a different include:[详细]
2023-01-10 11:29 分类:问答How to fetch distinct values with arel/relational algebra
I\'m doing开发者_运维问答 my best to bend my brain around arel and the relational algebra behind it, but how to represent a SELECT DISTINCT is consistently eluding my comprehension. Can anyone explain[详细]
2023-01-05 04:55 分类:问答rails: how do I build an active-relation scope to traverse many tables?
I have these tables and relationships: user has_many projects project has_many tasks task has_many actions[详细]
2023-01-02 14:40 分类:问答Nested queries in Arel
I am attempting to n开发者_JAVA技巧est SELECT queries in Arel and/or Active Record in Rails 3 to generate the following SQL statement.[详细]
2022-12-31 14:58 分类:问答How do you use ARel's #as method?
If you build a projection like this: t = Arel::Table.new(:projects) ps = t.project(t[:id].as(:snark)) How do you get the result column that\'s 开发者_开发百科named :snark?Since you are using the Ar[详细]
2022-12-26 02:07 分类:问答