diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-06-14 04:12:48 -0700 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-06-14 04:12:48 -0700 |
commit | add318c7f4b5c0e353a0f74c77661fef612efa65 (patch) | |
tree | 72b8e2520cfbdb9c322270ea6d661753d23c04ed | |
parent | 85bb7d9af16dafccd3c3d2394a75050951f8804c (diff) | |
parent | cbde6f56aed9119585de734de56056211aad36f5 (diff) | |
download | rails-add318c7f4b5c0e353a0f74c77661fef612efa65.tar.gz rails-add318c7f4b5c0e353a0f74c77661fef612efa65.tar.bz2 rails-add318c7f4b5c0e353a0f74c77661fef612efa65.zip |
Merge pull request #10937 from prathamesh-sonpatki/except_example
Added an example of the query without except before the example with except
-rw-r--r-- | guides/source/active_record_querying.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 84fc254207..2555927d15 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -687,6 +687,10 @@ The SQL that would be executed: ```sql SELECT * FROM posts WHERE id > 10 LIMIT 20 + +# Original query without `except` +SELECT * FROM posts WHERE id > 10 ORDER BY id asc LIMIT 20 + ``` ### `unscope` @@ -722,6 +726,10 @@ The SQL that would be executed: ```sql SELECT * FROM posts WHERE id > 10 ORDER BY id DESC + +# Original query without `only` +SELECT "posts".* FROM "posts" WHERE (id > 10) ORDER BY id desc LIMIT 20 + ``` ### `reorder` |