diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 14:31:04 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 14:31:04 -0400 |
commit | 7032a50297fce4d7724d1735e81e5df5fd919e71 (patch) | |
tree | c52333abcc7a1454ea6ada7fe5e31e054f4e9540 /README.markdown | |
parent | bdca9ed42ffea10aa6989ea3ecebedb424fa01ed (diff) | |
download | rails-7032a50297fce4d7724d1735e81e5df5fd919e71.tar.gz rails-7032a50297fce4d7724d1735e81e5df5fd919e71.tar.bz2 rails-7032a50297fce4d7724d1735e81e5df5fd919e71.zip |
reorganized file structures
Conflicts:
lib/arel.rb
lib/arel/arel.rb
lib/arel/engines/memory/predicates.rb
lib/arel/engines/memory/relations/array.rb
lib/arel/engines/sql/relations/table.rb
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/README.markdown b/README.markdown index e979dbc2a3..4d95234423 100644 --- a/README.markdown +++ b/README.markdown @@ -18,7 +18,7 @@ Generating a query with ARel is simple. For example, in order to produce you construct a table relation and convert it to sql: - users = Arel(:users) + users = Table(:users) users.to_sql In fact, you will probably never call `#to_sql`. Rather, you'll work with data from the table directly. You can iterate through all rows in the `users` table like this: @@ -81,7 +81,7 @@ The `AND` operator will behave similarly. Finally, most operations take a block form. For example: - Arel(:users) \ + Table(:users) \ .where { |u| u[:id].eq(1) } \ .project { |u| u[:id] } @@ -95,7 +95,7 @@ The examples above are fairly simple and other libraries match or come close to Where Arel really shines in its ability to handle complex joins and aggregations. As a first example, let's consider an "adjacency list", a tree represented in a table. Suppose we have a table `comments`, representing a threaded discussion: - comments = Arel(:comments) + comments = Table(:comments) And this table has the following attributes: |