aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/visitors
Commit message (Collapse)AuthorAgeFilesLines
* Allow a type caster to be given to the `Arel::Table` objectSean Griffin2014-12-291-1/+22
| | | | | | | | | This will allow most consuming code to avoid the deprecation introduced in 008445d6fd5f825d9b445ac75a7be67f0f7ab52c. The only code which will be affected is code that is building the `Arel::Table` object manually, rather than calling `arel_table` on an Active Record class. Hopefully this case will be rare enough that we don't need to introduce any additional APIs to work around it.
* {Matches,DoesNotMatch} support the ESCAPE clause with PostgreSQLKazuya NUMATA2014-12-251-2/+14
| | | | | to_SQL already has supported the ESCAPE clause in #318. PostgreSQL can use the ESCAPE clause too.
* Remove deprecated method "Table#primary_key"Sean Griffin2014-11-261-3/+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 Abbasov2014-11-261-1/+0
|
* Support Oracle bind parameter valueYasuo Honda2014-11-201-0/+4
|
* Use class objects rather than strings for the dispatch cacheSean Griffin2014-11-182-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 collectorSean Griffin2014-11-172-2/+7
| | | | | | | | | | | | 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 visitorAaron Patterson2014-11-102-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 inAaron Patterson2014-11-041-2/+1
|
* Completes 08e6491 in reusing `maybe_visit`claudiob2014-10-231-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` methodclaudiob2014-10-232-18/+4
| | | | | This commit simply removes duplicated code by reusing the existing `maybe_visit` method.
* {Matches,DoesNotMatch} support the ESCAPE clauseTamir Duberstein2014-09-251-2/+14
|
* move the dispatch table to be per-instanceAaron Patterson2014-09-226-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 arelAaron Patterson2014-09-221-4/+3
|
* Merge pull request #167 from pparidans/informix-v9-supportRafael Mendonça França2014-09-171-1/+1
|\ | | | | Informix versions < 10 use 'FIRST' keyword instead of 'LIMIT'
| * Informix versions < 10 use 'FIRST' keyword instead of 'LIMIT'Pierre Paridans2014-09-161-1/+1
| | | | | | | | Still supported in versions 10+
* | Merge pull request #137 from dimko/visit_setRafael Mendonça França2014-09-173-0/+3
|\ \ | |/ |/| Added a visitor for Set objects
| * added a visitor for Set objectsDimko2012-09-183-0/+3
| |
* | Wrap group_by sql with a subquery for limiting rows in Oracle.Chris Dinger2014-09-161-1/+1
| | | | | | | | Fixes #128
* | `Extract#as` should not mutate the receiverTamir Duberstein2014-09-131-8/+1
| | | | | | | | Fixes https://github.com/rails/rails/issues/16913
* | Merge pull request #277 from sergey-alekseev/wrap-nested-gropings-only-onceRafael Mendonça França2014-09-121-2/+6
|\ \ | | | | | | Wrap nested Nodes::Grouping in brackets only once
| * | Wrap nested Nodes::Grouping in brackets only onceSergey Alekseev2014-05-261-2/+6
| | |
* | | Windowing: Calling #rows or #range should assign framing only once.Alexander Staubo2014-06-221-0/+2
| | |
* | | Windowing support for PARTITION BY clause.Alexander Staubo2014-06-202-0/+8
| | |
* | | Modify Visitors::Dot's API to use collectorsJiri Pospisil2014-06-141-2/+2
| | |
* | | Make sure visit_Arel_Nodes_With works with collectorsJiri Pospisil2014-06-121-2/+3
| | |
* | | Remove unused values variableVipul A M2014-06-011-2/+0
| | |
* | | Merge pull request #276 from brocktimus/masterRafael Mendonça França2014-05-281-1/+1
|\ \ \ | | | | | | | | Fixing method signature for unsupported visits in the ToSQL Visitor
| * | | Fixing method signature for unsupported visits in the ToSQL VisitorBrock Trappitt2014-05-261-1/+1
| |/ /
* / / Fix typo `delegte` => `delegate`Vipul A M2014-05-251-1/+1
|/ /
* | Support to add the casting node to the AST at build timeYasuo Honda2014-05-051-1/+1
| | | | | | | | Ref https://github.com/rails/arel/commit/93d72131bcc24ccb5536bec672d2dac94f8de651
* | Add collector argument to address ArgumentError: wrong number of arguments ↵Yasuo Honda2014-05-021-1/+1
| | | | | | | | (2 for 1)
* | always add a space before keywords (it is easier)Aaron Patterson2014-04-111-9/+3
| |
* | Allow INSERT INTO <table> SELECT queriesJean Boussier2014-04-101-1/+7
| |
* | fix spacing so that Rails is happyAaron Patterson2014-04-091-3/+9
| |
* | rhs bind parameters should be visitedAaron Patterson2014-04-091-1/+1
| |
* | fix bind values in insert statementsAaron Patterson2014-04-092-8/+12
| |
* | adding a bind value collectorAaron Patterson2014-04-091-1/+4
| |
* | add a compile method for some backwards compatibilityAaron Patterson2014-04-091-0/+4
| |
* | make the bindvalue visitor backwards compatibleAaron Patterson2014-04-091-1/+4
| |
* | fixing BINARY testsAaron Patterson2014-04-082-4/+5
| |
* | fixing EXTRACTAaron Patterson2014-04-081-2/+10
| |
* | fixing OVERAaron Patterson2014-04-081-9/+9
| |
* | fixing insert managerAaron Patterson2014-04-081-5/+9
| |
* | fixing test_table.rbAaron Patterson2014-04-081-9/+9
| |
* | fixing ibm dbAaron Patterson2014-04-081-2/+4
| |
* | informix is workingAaron Patterson2014-04-082-23/+40
| |
* | mssql visitor is workingAaron Patterson2014-04-081-16/+21
| |
* | Merge branch 'master' into collectorAaron Patterson2014-04-081-2/+3
|\ \ | | | | | | | | | | | | * master: finally stop returning strings
| * | finally stop returning stringsAaron Patterson2014-04-081-2/+3
| | |