How exactly are you going to "just write SQL" if the actual query statement needs to change based on the user input?
How exactly are you going to "just write SQL" if the actual query statement needs to change based on the user input? How about something like this: s = Select.new s.add "WHERE title LIKE #{title}" if title s.add "WHERE price <= #{price_range}" if price_range s.add "LIMIT #{limit}" if limit s.add "OFFSET #{offset}" if offset s.add "id, blah, boo FROM products" s.execute Note how I deliberately shuffled the order and didn't bother with escaping. Also note how anyone who knows SQL could immediately work with this, learning curve: 5 seconds. Why is there no ORM that works like this?
Posted by moe on Mar 10, 2015, 7:46 PM
Tags
Related issues
- Fake websites pretending to be legitimate websites in order to steal your passwords was considered a HUGE problem.
- 3.5 Flash was always too expensive for a "flash" model.
- I don't think the realistic alternative here was “hire a team for a month and get a better semantic conversion” For a rewrite of this si...
- I was hosting on a PC at home like 10 years ago.
- I live in walking distance of all these things, and the farthest I’ve gotten my kid to do things alone is to walk to and from school (a w...
- It was a long time ago, so I don't remember.
Raise real-world problems, find people facing the same issue, and discuss solutions.7,500 issues0 comments
pricing (E-commerce)
Fake websites pretending to be legitimate websites in order to steal your passwords was considered a HUGE problem.
3.5 Flash was always too expensive for a "flash" model.
I don't think the realistic alternative here was “hire a team for a month and get a better semantic conversion” For a rewrite of this si...
I was hosting on a PC at home like 10 years ago.
I live in walking distance of all these things, and the farthest I’ve gotten my kid to do things alone is to walk to and from school (a w...
It was a long time ago, so I don't remember.
I still like to buy my cheap and esoteric Chinese stuff from Amazon.
My local area used to be great to find old used woodworking tools for cheap.
How exactly are you going to "just write SQL" if the actual query statement needs to change based on the user input?
How exactly are you going to "just write SQL" if the actual query statement needs to change based on the user input? How about something like this: s = Select.new s.add "WHERE title LIKE #{title}" if title s.add "WHERE price <= #{price_range}" if price_range s.add "LIMIT #{limit}" if limit s.add "OFFSET #{offset}" if offset s.add "id, blah, boo FROM products" s.execute Note how I deliberately shuffled the order and didn't bother with escaping. Also note how anyone who knows SQL could immediately work with this, learning curve: 5 seconds. Why is there no ORM that works like this?
Comments (0)
No comments yet. Start the discussion.