#200 √ resolved
Alex Suraci

Improve SQL interfacing

Reported by Alex Suraci | September 1st, 2008 @ 12:14 AM | in 2.0 rc2

The current method is verbose, redundant, and fairly limiting:


Post::find(array("where" => "foo = :foo",
                 "params" => array(":foo" => "This is reundant.")));

I propose removing the need for the params option entirely, by having it simply assumed by a new, more concise "where" format:


Post::find(array("where" => array("foo" => "This is awesome.")));

Other potential uses:


Post::find(array("where" => array("foo" => array("one", "of", "these")))); // foo IN ('one', 'of', 'these')
Post::find(array("where" => array("foo" => null))); // foo IS NULL
Post::find(array("where" => array("foo" => true))); // foo = 1

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Tags