Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Remove deprecated method "Table#primary_key" | Sean Griffin | 2014-11-26 | 2 | -17/+18 | |
| | | | | | | | The only place this method was still used is on the MSSQL visitor. The visitor has all of the objects required to inline this lookup there. Since the `primary_key` method on the connection adapter will perform a query when called, we can cache the result on the visitor. | |||||
* | remove extra space before 'ORDER BY' | Nihad Abbasov | 2014-11-26 | 1 | -1/+0 | |
| | ||||||
* | Prepare for 6.0.0 | Rafael Mendonça França | 2014-11-25 | 1 | -1/+1 | |
| | ||||||
* | Support Oracle bind parameter value | Yasuo Honda | 2014-11-20 | 1 | -0/+4 | |
| | ||||||
* | Use class objects rather than strings for the dispatch cache | Sean Griffin | 2014-11-18 | 2 | -18/+10 | |
| | | | | | | | | The only reason we're using strings is to pre-populate the cache, but `Class#name` returns a new string instance on every call. This is a pretty major source of memory usage. We don't technically need to pre-populate the cache, and not doing so allows us to go back to using cache objects | |||||
* | Add order to BindParams in the ToSql collector | Sean Griffin | 2014-11-17 | 6 | -6/+21 | |
| | | | | | | | | | | | | This removes the need for us to do the re-ordering by walking the AST in ActiveRecord. We're using a block to communicate with the collector, since the collector needs to be the thing which knows about the index, while the visitor is the thing that needs to know the syntax. The BindParam needs to know about neither of these things, so it's been changed to stop being a subclass of SqlLiteral I could also see an alternative implementation using format strings if for some reason blocks cause a problem. | |||||
* | cache the dispatch table on the depth first visitor | Aaron Patterson | 2014-11-10 | 2 | -6/+21 | |
| | | | | | We know the API for the depth first visitor in advance, so it's OK to calcuate this cache in advance | |||||
* | oops! that should not have been checked in | Aaron Patterson | 2014-11-04 | 1 | -2/+1 | |
| | ||||||
* | Look for `Enumerable` rather than `Array` in predicates | Sean Griffin | 2014-11-02 | 1 | -2/+2 | |
| | | | | | It's not quite duck typed, but it will allow us to pass in our own objects with additional logic (like type casting). | |||||
* | Revert "Revert "Merge pull request #300 from jpcody/master"" | Sean Griffin | 2014-10-31 | 1 | -4/+5 | |
| | | | | | | This reverts commit 9b92af7098b2728ced578ab9a7679176d20f120f. beta2 is out, and we've fixed the issue that this caused in Rails | |||||
* | Bump to 6.0.0.beta2 | Godfrey Chan | 2014-10-30 | 1 | -1/+1 | |
| | ||||||
* | Revert "Merge pull request #300 from jpcody/master" | Sean Griffin | 2014-10-30 | 1 | -5/+4 | |
| | | | | | This reverts commit 36836fa5e7c084c0dce2818577e6fd0cf815f786, reversing changes made to 53bc8426648cc93695525e8f12102cd416b2d772. | |||||
* | Dry up building quoted nodes in predication | Sean Griffin | 2014-10-27 | 1 | -15/+23 | |
| | | | | | Given that we are going to remove casting from Arel in the near future, having a single place nodes in predications will help. | |||||
* | Deprecate passing ranges to `#in` and `#not_in` | Sean Griffin | 2014-10-25 | 1 | -35/+49 | |
| | | | | | | | The goal of these methods should be to generate in nodes, not handle every possible permutation of more than one value. The `#between` and `#not_between` methods have been extracted, which better represent the semantics of handling ranges in SQL. | |||||
* | Refactor `#in` and `#not_in` | Sean Griffin | 2014-10-25 | 1 | -16/+20 | |
| | | | | | | | These methods duplicate a lot of logic from the other predications. We can just use those methods directly, and only build nodes with the same name in our method directly. We've already had one bug that came from building nodes directly, rather than using the proper predicate. | |||||
* | Merge pull request #331 from sgrif/sg-in-should-not-break-queries | Sean Griffin | 2014-10-24 | 1 | -1/+1 | |
|\ | | | | | `#not_in` with a range should respect proper precedence | |||||
| * | `#not_in` with a range should respect proper precedence | Sean Griffin | 2014-10-24 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, doing ```ruby relation[:id].not_eq(4).and(relation[:id].not_in(1..3)) ``` will generate ```sql "id" != 4 AND "id" < 1 OR "id" > 3 ``` Which would incorrectly include records with an id of 4, as the OR statement has higher precidence than the AND statement. The `or` method on `Node` properly groups the statement in parenthesis. | |||||
* | | Binary nodes should not generate the same hash as nodes of other classes | Sean Griffin | 2014-10-24 | 1 | -1/+1 | |
|/ | ||||||
* | Completes 08e6491 in reusing `maybe_visit` | claudiob | 2014-10-23 | 1 | -3/+3 | |
| | | | | | | | | | :sweat: I don't know why the tests did not fail, but to keep the same syntax as before, `collector =` is required. Maybe `visit` changes `collector` in-place, so the result is the same, but since I'm not sure about the side effects, I think this PR is needed to. Sorry! :sweat: | |||||
* | Reuse `maybe_visit` method | claudiob | 2014-10-23 | 2 | -18/+4 | |
| | | | | | This commit simply removes duplicated code by reusing the existing `maybe_visit` method. | |||||
* | {Matches,DoesNotMatch} support the ESCAPE clause | Tamir Duberstein | 2014-09-25 | 5 | -20/+46 | |
| | ||||||
* | move the dispatch table to be per-instance | Aaron Patterson | 2014-09-22 | 6 | -19/+37 | |
| | | | | | | | visitors are not shared among threads, so any mutations to the cache should be OK. The cache is also pre-populated on construction, but we should pull that out so we can share the cache among visitors in the future. | |||||
* | connections should cache these values, so remove the cache in arel | Aaron Patterson | 2014-09-22 | 1 | -4/+3 | |
| | ||||||
* | Merge pull request #167 from pparidans/informix-v9-support | Rafael Mendonça França | 2014-09-17 | 1 | -1/+1 | |
|\ | | | | | Informix versions < 10 use 'FIRST' keyword instead of 'LIMIT' | |||||
| * | Informix versions < 10 use 'FIRST' keyword instead of 'LIMIT' | Pierre Paridans | 2014-09-16 | 1 | -1/+1 | |
| | | | | | | | | Still supported in versions 10+ | |||||
* | | Merge pull request #137 from dimko/visit_set | Rafael Mendonça França | 2014-09-17 | 3 | -0/+3 | |
|\ \ | |/ |/| | Added a visitor for Set objects | |||||
| * | added a visitor for Set objects | Dimko | 2012-09-18 | 3 | -0/+3 | |
| | | ||||||
* | | Remove unused @alias, being referenced in hashing. | Vipul A M | 2014-09-16 | 1 | -1/+1 | |
| | | ||||||
* | | Wrap group_by sql with a subquery for limiting rows in Oracle. | Chris Dinger | 2014-09-16 | 1 | -1/+1 | |
| | | | | | | | | Fixes #128 | |||||
* | | `Extract#as` should not mutate the receiver | Tamir Duberstein | 2014-09-13 | 2 | -18/+4 | |
| | | | | | | | | Fixes https://github.com/rails/rails/issues/16913 | |||||
* | | Merge pull request #306 from mxhold/master | Rafael Mendonça França | 2014-09-12 | 1 | -0/+9 | |
|\ \ | | | | | | | Add SelectManager#distinct_on to set/unset Arel::Nodes::DistinctOn quantifier | |||||
| * | | Add SelectManager#distinct_on to set/unset Arel::Nodes::DistinctOn quantifier | Max Holder | 2014-08-30 | 1 | -0/+9 | |
| | | | ||||||
* | | | Merge pull request #304 from bigxiang/fix_lt_and_lteq_error | Rafael Mendonça França | 2014-09-12 | 1 | -6/+6 | |
|\ \ \ | | | | | | | | | Fix lt & lteq don't accept most of values. | |||||
| * | | | Fix lt & lteq don't accept most of values. | bigxiang | 2014-08-23 | 1 | -6/+6 | |
| | | | | ||||||
* | | | | Merge pull request #277 from sergey-alekseev/wrap-nested-gropings-only-once | Rafael Mendonça França | 2014-09-12 | 1 | -2/+6 | |
|\ \ \ \ | |_|/ / |/| | | | Wrap nested Nodes::Grouping in brackets only once | |||||
| * | | | Wrap nested Nodes::Grouping in brackets only once | Sergey Alekseev | 2014-05-26 | 1 | -2/+6 | |
| | | | | ||||||
* | | | | Merge pull request #300 from jpcody/master | Matthew Draper | 2014-08-26 | 1 | -4/+5 | |
|\ \ \ \ | |_|/ / |/| | | | Allow for alias omission in aggregate expressions | |||||
| * | | | Remove default aliases from aggregate functions | Joshua Cody | 2014-07-31 | 1 | -14/+8 | |
| | | | | ||||||
| * | | | Allow for alias omission in aggregate expressions | Joshua Cody | 2014-07-26 | 1 | -8/+15 | |
| | | | | ||||||
* | | | | Prepare to 6.0.0.beta1 | Rafael Mendonça França | 2014-08-17 | 1 | -1/+1 | |
|/ / / | ||||||
* | | | Windowing: Calling #rows or #range should assign framing only once. | Alexander Staubo | 2014-06-22 | 2 | -2/+12 | |
| | | | ||||||
* | | | Windowing support for PARTITION BY clause. | Alexander Staubo | 2014-06-20 | 3 | -2/+21 | |
| | | | ||||||
* | | | Modify Visitors::Dot's API to use collectors | Jiri Pospisil | 2014-06-14 | 2 | -3/+5 | |
| | | | ||||||
* | | | Collectors: Introduce PlainString and make use of it in SQLString | Jiri Pospisil | 2014-06-14 | 2 | -14/+21 | |
| | | | ||||||
* | | | Merge pull request #290 from mekishizufu/fix_select_manager_as_subquery | Rafael Mendonça França | 2014-06-13 | 1 | -1/+1 | |
|\ \ \ | | | | | | | | | Support passing of SelectManager to attribute methods | |||||
| * | | | No need to check for SelectStatement as it's a descendant of Node | Jiri Pospisil | 2014-06-12 | 1 | -1/+1 | |
| | | | | ||||||
| * | | | Make sure Arel::SelectManager is not mistaken for an attribute | Jiri Pospisil | 2014-06-12 | 1 | -1/+1 | |
| | | | | ||||||
* | | | | Make sure visit_Arel_Nodes_With works with collectors | Jiri Pospisil | 2014-06-12 | 1 | -2/+3 | |
|/ / / | ||||||
* | | | Merge pull request #284 from Octember/master | Rafael Mendonça França | 2014-06-06 | 1 | -18/+22 | |
|\ \ \ | | | | | | | | | Cleaned up some edge cases with infinity in predications.rb | |||||
| * | | | Cleaned up some edge cases with infinity, the logic seems more intuitive now | Noah Lindner | 2014-06-01 | 1 | -18/+22 | |
| | | | |