API to find autorecords based on multiple column values
Bug #503551 reported by
wouter bolsterlee
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Anewt |
Fix Released
|
Wishlist
|
wouter bolsterlee |
Bug Description
In addition to AnewtAutoRecord
I'm working on this, but need to cleanup my patch before I submit.
To post a comment you must log in.
Finally got around to cleaning things up:
1749 Wouter Bolsterlee 2010-02-16 {one,all} _by_columns( )
[autorecord] Implement ::db_find_
These methods takes an associative array of column names and
values and returns the records that match all values, using
AND in the WHERE clause.
This is a generalization of the existing functionality {one,all} _by_column methods, but
offered by the ::db_find_
extended to support multiple columns instead of just one.
The _by_column() methods now invoke their _by_columns()
counterparts instead of duplicating the SQL building logic.
Also extended the unit tests to test the new functionality.
Fixes bug #503551.