metautonomo.us

Confounding URL typists since 2007.

Tag Archives: arel

MetaWhere Is About To Get Func-y

12 Comments

The next release of MetaWhere is shaping up to add a couple of cool new features to ActiveRecord — control over join type, and access to SQL functions supported by your database. Before I go into details about them, I’d like to ask those of you who are testing Rails 3-0-stable branch and ARel master already to try out the arel-2.0 branch, where these fun changes live. I’d appreciate feedback on how well they work for your apps. Now, on with the show. Read the rest of this post

Filed under Blog
Nov 2, 2010

Converting Your Code to ARel 2.0

3 Comments

If you haven’t read Aaron Patterson’s post about the massive rewrite of ARel that happened for version 2.0, do yourself a favor, and go read it. It’s good stuff, and Aaron’s work rewriting ARel was a monumental feat of awesomeness. Plus, it’s responsible for tipping me off that someone else did a momentous rewrite: porting the venerable zombo.com to HTML5. Back? Good. Aaron mentioned, “for people using ARel directly, some methods have been removed, but all previous functionality should be available in one way or another.” Since I spent some time making sure that the old functionality was available to support the arel-2.0 branch of MetaSearch and MetaWhere, I thought I might tackle explaining some of the changes you’ll see.
Read the rest of this post

Filed under Blog
Oct 15, 2010

Arel merge!

0 Comments

Using MetaSearch and MetaWhere is about to become simpler, now that most of my Arel changes have been merged into rails/arel. Once a new Arel gem is released, I’ll make a new gem release of both of my libraries, as well. Thanks to Emilio Tagua () and Bryan Helmkamp () for the feedback and eventual merge!

Filed under Blog
May 20, 2010

ActiveRecord::Relation vs Arel

3 Comments

Since the release of ActiveRecord Query Interface 3.0, I think the line has been pretty blurry for the Rails community about where ActiveRecord ends and Arel begins. I’ve seen folks attribute ActiveRecord::PredicateBuilder to Arel, and I’ve seen folks assume that an ActiveRecord::Relation is an Arel object. Neither is the case. Since MetaSearch and MetaWhere both use combinations of ActiveRecord::Relation and Arel under the hood, and I’ve spent some time putting together patches for both Rails core and Arel, the blurry line between them has become more distinct for me. In this post, I hope to clear up some misunderstandings before Rails 3 is released, and the AR 3.0 query interface becomes the norm.
Read the rest of this post

Filed under Blog
May 11, 2010

Why (fork) Arel?

2 Comments

In a few recent posts, you may have noticed me mention my Arel fork on GitHub. I’ve never really devoted a post to discussing that fork, what’s different about it, and why it exists, so here’s some background.

Read the rest of this post

Filed under Blog
May 3, 2010

MetaSearch: Testers wanted

3 Comments

MetaSearch has had a bunch of nifty additions since the last released gem version. I’d really love to have some testers try out the new version, but it requires some handy additions to Arel which currently only exist on my fork. Those intrepid enough to try it out will gain a host of bug fixes, custom validators, and any- and all-suffixed methods for easier multi-condition searches.
Read the rest of this post

Filed under Blog
Apr 3, 2010

Advanced ActiveRecord 3 Queries with Arel

4 Comments

If you’ve been playing with Rails 3, you might not know that aside from the documented ways to construct your queries (chaining wheres with SQL fragments and hash conditions), there are some other nifty tricks waiting under the hood for you to discover.
Read the rest of this post

Filed under Blog
Mar 28, 2010