Comments (4)
Arel 8.0.0/AR 5.14 exhibits the same behavior
from arel.
Yeah, this is expected behaviour: the Arel relation doesn't carry the bind parameter values (and we're progressively moving more things from SQL interpolation to use bind parameters -- in this case, LIMIT).
from arel.
@aselder Yes. When using Arel to build inner queries, this bites us.
To get around, we have had to build a sql literal:
Arel::Nodes::SqlLiteral.new("(#{arel.to_sql})")
The cause of this is over in Rails, where it builds its own BindParam
values ( relation/query_methods.rb ?) instead of using Arel itself to build the sql (with the bind parameters). Not trying to say that is a trivial task, just trying to state the problem.
Would be nice if Arel could return an AST with bind variables that were more usable to Rails.
Sorry for not better details, I had researched this over a year ago.
@matthewd if you have specific instructions (or a whim) you can send me off on a wild goose chase on this one.
from arel.
Per #523, Arel development is moving to rails/rails.
If this issue is still relevant, please consider reopening it over there. (Note that the Rails repository does not accept feature request issues, and requires reproduction steps that rely on Active Record's documented API.)
from arel.
Related Issues (20)
- Support of batched UPSERT and UPDATE queries HOT 2
- Migration from 6 to 7 HOT 1
- UncaughtThrowError: uncaught throw {:__recursive_key__=>true, 19667120=>true} from visitors/reduce.rb:13 HOT 4
- Arel::Nodes::Division does not divide first argument by second argument HOT 2
- Arel node for an array element (suffix operator) HOT 2
- wrong type for results of average HOT 2
- Delegate #to_s to #to_sql HOT 1
- multiple arel conditions raise SystemStackError: stack level too deep HOT 1
- activerecord (5.1.4) lib/active_record/relation/predicate_builder.rb:113:in `new' not passing a value, causing Arel 9.0.0 to fail HOT 1
- SqlLiteral does not serialize/de-serailize correctly HOT 1
- `NameError: uninitialized constant FakeRecord::Connection::DateTime` with Ruby 2.5.0 HOT 2
- Atomic upsert? HOT 2
- Registering Visitors HOT 1
- Expression in `in` is broken in 7.1.4 and 8.0.0 HOT 6
- union operation broken in 9.0.0 HOT 1
- Why is `Arel::Nodes::Or.neq` different from `Arel::Nodes::And.new`? HOT 2
- Timestamp between columns, how can i do it? HOT 1
- NamedFunction as HOT 2
- Documentation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arel.