| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** 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`
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This is ultimately messy no matter what, and increases the coupling to the
database backend, but we can at least contain it somewhat into an object
that's already coupled.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The WhereSQL visitor always uses the generic ToSQL visitor to create
the where clause sql statement. This means that it'll miss database
specific statements, such as 'ILIKE' in PostgreSQL. Since the
`#where_sql` method is mainly used for ActiveRecord error reporting,
this discrepancy could be confusing to users.
This patch changes the WhereSQL visitor to use the its connection
visitor to generate SQL for each statement in the SelectManager's wheres
array. Then lets them be joined together with ' AND '.
|
|\
| |
| | |
Improve error message when passed unsupported type
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Add OrderPredications back into Nodes::Function
|
| |/
| |
| |
| | |
Expression)
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Explicitly declare if this is case sensitive or not
currently postgres assumes case insensitive regexp
no other databases support regexps
|
|/
|
|
|
|
|
| |
Explicitly declare if this is case sensitive or not
most implementation assume case sensitive
postgres assumes case insensitive
|
|\
| |
| | |
Support Oracle 12c top-N query
|
| |
| |
| |
| | |
to support `FETCH FIRST n ROWS` and `OFFSET` for Oracle 12c database
|
| | |
|
|\ \
| | |
| | | |
Fix visit_Arel_Nodes_FullOuterJoin/RightOuterJoin
|
| | |
| | |
| | |
| | | |
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.
|
|
|
|
|
| |
It is impossible to test equality of things constructing trees with bind
params otherwise.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Rails now performs all casting eagerly, before passing the value into
Arel. Once we remove this, the code on both sides will be simplified
greatly. Ideally, we can provide the appropriate public APIs on the
Rails side to ease this transition for library authors who depend on
this behavior.
|
|
|
|
|
| |
Since Active Record needs to eagerly cast values, we need to check for
quoted infinity in our range handling
|
|
|
|
|
| |
to_SQL already has supported the ESCAPE clause in #318.
PostgreSQL can use the ESCAPE clause too.
|
|
|
|
| |
`nil?` not `nil`
|
| |
|
|
|
|
| |
We need to be able to not care which we've gotten in ActiveRecord
|
|
|
|
|
|
|
|
| |
We're going to start working on removing type casting from arel. To
avoid doing one gigantic commit which moves everything over to eager
casting, we need a way to tell Arel that we've already cast it. The
easiest path to that is to give it a quoted node, and then we remove
this case once we're never returning a Casted node
|
|
|
|
|
|
| |
This constructor parameter was unused for everything except the
convenience methods `to_sql` and `where_sql`. We can pass the engine
into those methods directly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is never used outside of convenience methods which are only used in
tests. In practice, it just made constructing tables more complicated on
the rails side. This is the minimum possible change to remove the
constructor argument, but continue to have the tests passing.
I'm not sure if we have a reason to keep `project` and friends, and the
solution might actually just be to remove the engine from
`SelectManager` and friends. As such I've held off on deleting those
methods.
We need to figure out what to do with `Table#from`. It's old invocation,
which read `table.from(table)` was certainly nonsensical.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
We know the API for the depth first visitor in advance, so it's OK to
calcuate this cache in advance
|
| |
|
|
|
|
|
| |
It's not quite duck typed, but it will allow us to pass in our own
objects with additional logic (like type casting).
|
|
|
|
|
|
| |
This reverts commit 9b92af7098b2728ced578ab9a7679176d20f120f.
beta2 is out, and we've fixed the issue that this caused in Rails
|
| |
|
|
|
|
|
| |
This reverts commit 36836fa5e7c084c0dce2818577e6fd0cf815f786, reversing
changes made to 53bc8426648cc93695525e8f12102cd416b2d772.
|