API to find autorecords based on multiple column values

Bug #503551 reported by wouter bolsterlee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Anewt
Fix Released
Wishlist
wouter bolsterlee

Bug Description

In addition to AnewtAutoRecord::db_find_{one,all}_by_column() I'd also like ::db_find_{one,all}_by_columns() that will find records based on mutiple column values (using AND in the SQL WHERE clause).

I'm working on this, but need to cleanup my patch before I submit.

Tags: autorecord
Revision history for this message
wouter bolsterlee (wbolster) wrote :

Finally got around to cleaning things up:

 1749 Wouter Bolsterlee 2010-02-16
      [autorecord] Implement ::db_find_{one,all}_by_columns()

      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
      offered by the ::db_find_{one,all}_by_column methods, but
      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.

Changed in anewt:
assignee: nobody → Wouter Bolsterlee (uws) (uws)
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.