23 Mar '13, 6pm

@arroz if you wish. I think method chaining is a good API for these query building cases. This is a good example:

dataset_filtering.rdoc doc/dataset_filtering.rdoc Last Update: 2012-07-13 09:26:05 -0700 Dataset Filtering Sequel is very flexibile when it comes to filtering records. You can specify your conditions as a custom string, as a string with parameters, as a hash of values to compare against, or as ruby code that Sequel translates into SQL expressions. Filtering using a custom filter string If you wish to write your SQL by hand, you can just supply it to the dataset's where method: items.where('x < 10').sql #=> "SELECT * FROM items WHERE x < 10" In order to prevent SQL injection, you can replace literal values with question marks and supply the values as additional arguments: items.where('category = ?', 'ruby').sql #=> "SELECT * FROM items WHERE category = 'ruby'" You can also use placeholders with :placeholder and a hash of placeholder values: items.where('category = :category...

Full article: http://sequel.rubyforge.org/rdoc/files/doc/dataset_filter...

Tweets

Good Interpretations on Buffett Principles

Good Interpretations on Buffett Principles

thefinance.sg 23 Mar '13, 4am

Good Interpretations on Buffett Principles by Drizzt on March 23, 2013 Warren Buffett on camera provides much useful perso...

The Suntech Bankruptcy: Bad or Good News?: Of course it's both, and it all depends on who you are

The Suntech Bankruptcy: Bad or Good News?: Of c...

spectrum.ieee.org 22 Mar '13, 11pm

Predictably, the Suntech collapse has undammed a flood of instant commentary, some of it somewhat self-contradictory. Ther...

Puppy Dogs and Solar Quotes: An Example of Caus...

renewableenergyworld.com 23 Mar '13, 4pm

Getting a free solar quote is probably the best way to open the door to a residential sale. People can finally see the num...

A Guide to Google's Think Insights

A Guide to Google's Think Insights

searchenginewatch.com 21 Mar '13, 7am

Last week, Google launched its updated Think Insights website. Maybe one reason it hasn't been written about much is due t...

YouTube, Get On This (Part 1): The YouTube Wish...

reelseo.com 23 Mar '13, 12am

YouTube changes all the time, so it's easy to imagine changes that might make the site better. Whether you are a viewer an...

YouTube, Get On This (Part 2): The YouTube Wish...

reelseo.com 23 Mar '13, 3am

Earlier, we talked about some things that needed to be improved with YouTube . But that was only the beginning. There are ...

Puppy Dogs and Solar Quotes: An Example of Caus...

renewableenergyworld.com 22 Mar '13, 2pm

Getting a free solar quote is probably the best way to open the door to a residential sale. People can finally see the num...