Comments (3)
You should be able to work around this by checking the actual return value of the function -- I'm not sure I want to support AND/OR on functions, as it normally would be against an actual predicate. Can you try that?
something like:
where{function(param, other_param) == true}
for instance.
from squeel.
I can do that, yes, I tried it, I find it a bit cumbersome, as I can already do :
where{function(param, other_param)}
and even
where{function(param, other_param)}.where{function(param, other_param)}
and get an AND, but I can't get an OR that way :-)
from squeel.
Going to close this one right now. Consider the request noted -- for now, I'm gonna push back and say that I don't see a lot of use cases for it. If enough requests come back for it though I will revisit.
from squeel.
Related Issues (20)
- Using squeel with existing scopes ? HOT 1
- Literals don't work well with nil HOT 4
- Using BETWEEN condition in squeel?
- Undefined method | (pipe) HOT 2
- Accessing a records associations with a scope HOT 2
- Support for rewhere
- Group_by not working HOT 1
- Using complex IN + OR scope inside an association results in invalid SQL on join condition HOT 5
- rails 5 support HOT 18
- Support for PostgreSQL arrays
- Subquery generation when using a Relation as a parameter in regular where() HOT 4
- Performance issues HOT 1
- Default scope where conditions with or in rails 4 and squeel HOT 4
- MySQL concat function HOT 1
- makes #reorder break #last
- common table expressions (CTEs)
- Active record 5 support HOT 1
- is gem still maintained? HOT 16
- Convert column HOT 1
- Undefined method `alias_method_chain' HOT 5
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 squeel.