| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
DRY up visit_Arel_Nodes_SelectCore
|
| |
| |
| |
| | |
collect_nodes_for, for collecting wheres, projections, groups, windows
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005
Ruby ~2.3 `1234.class` is `Fixnum` and `123456789012345678901234567890.class`
is `Bignum`.
Ruby 2.4+ `1234.class` is `Integer` and `123456789012345678901234567890.class`
is `Integer`.
So what we should do is defining `visit_Integer` method to visitors.
|
|/
|
| |
Update to_sql.rb. Slightly performance improvement.
|
|
|
| |
Update to_sql.rb. Slightly performance improment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Individual commit messages included below ***
* Preliminary support for bitwise operations as infix operators. Tests to follow.
* Added bitwise xor, shift left and shift right operators
* Fixed the BitwiseOr class so it uses the :| operator instead of :&
* All the methods for the bitwise operators in the Arel::Math module now wrap them up in Arel::Nodes::Grouping so the operation becomes isolated like addition and subtraction
* Preliminary set of tests for the new operators
* Updated README with examples of bitwise operations
* Added a new UnaryOperation class which is a riff on the InfixOperation class
* Added tests for UnaryOperation (inspired by InfixOperation tests)
* Added the bitwise not (~) operator as a UnaryOperation
* Added tests for the bitwise not operator
* Added documentation for the bitwise not operator
* Updated gemspec using `rake arel.gemspec`
|
| |
|
| |
|
| |
|
|\
| |
| | |
Support Oracle 12c top-N query
|
| | |
|
|/
|
|
| |
make them work with collectors.
|
|
|
|
|
| |
Refernce:
https://technet.microsoft.com/en-us/library/ms175486%28v=sql.105%29.aspx
|
|
|
|
|
| |
Conflicts:
lib/arel/visitors/to_sql.rb
|
|
|
|
|
|
| |
These two clauses have nearly identical semantics with regards to how
they would be constructed as an AST. It doesn't make sense for their
interfaces to be separate.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
: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:
|
|
|
|
|
| |
This commit simply removes duplicated code by reusing the
existing `maybe_visit` method.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| | |
Added a visitor for Set objects
|
| | |
|
| |
| |
| |
| | |
Fixes https://github.com/rails/rails/issues/16913
|
|\ \
| | |
| | | |
Wrap nested Nodes::Grouping in brackets only once
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
this lets our old depth first and dot visitors to work normally
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* master:
remove order_clauses since we do not use it
fix whitespace and unsupported method args
Add Regexp and NotRegexp nodes for PostgreSQL
Revert "Merge pull request #253 from corrupt952/master"
flatten object.children in visit_Arel_Node_And
Added right and full outer joins
Conflicts:
lib/arel/visitors/to_sql.rb
lib/arel/visitors/visitor.rb
|