| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of a greater refactoring to have the `BindParam` nodes hold
onto their values. We want to generally keep the AST decoupled from what
you're actually doing with those values, but ultimately the usage of
`BindParam` is almost identical to how you'd use `Casted` or `Quoted`.
Forcing consumers of Arel's API to maintain the bind values separately
from the AST makes manipulating the AST essentially impossible, as you
would need to perform a full walk of the AST to determine whether a
given node contains bind parameters, and which value it maps to.
By storing the value on the bind parameter directly, we can collect them
in another AST pass (realistically it'll be part of the same pass that
performs SQL construction for performance reasons). This will
dramatically simplify AST manipulation for Rails or any other consumers
that work with bind params.
As part of this change I've removed the `BindVisitor`, which appears to
be dead code, and had tests break from this change.
|
| |
|
|
|
|
| |
Visitor
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
to_SQL already has supported the ESCAPE clause in #318.
PostgreSQL can use the ESCAPE clause too.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
If we add the casting node to the ast at build time, then we can avoid
doing the lookup at visit time.
|
|
|
|
| |
using matches() or does_not_match().
|
| |
|
|
|
|
| |
generating SQL, rather than the TreeManager. (There is a related commit coming in Active Record.)
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
* jstorimer/master:
Allow database specific locking clauses to be used
|
| | |
|
|/
|
|
|
|
| |
PostgreSQL WITH RECURSIVE support
Make WITH be a unary node
|
| |
|
| |
|
| |
|
| |
|
|
|