[DBIx-Class-Devel] [sql-abstract] Adding a 'select_for_update' wrapper around 'select' method (#5)

Dave notifications at github.com
Thu May 7 13:12:18 GMT 2015


I'm not sure I understand what you mean by "rather inflexible" ... it has a single purpose, and accomplishes that purpose in the simplest way possible.  Unless you aim is to avoid method bloat by doing something like "select_and_lock" providing an argument to the method to choose the locking mechanism. Honestly I think that having "select_for_update" and "select_for_share" as two methods would make for more self explanatory and easier to maintain code.

As for DBIx:Class, I am not using that in my currently application for a host of reasons, so given the choice between adding functionality to SQL::Abstract, or hacking in the `$sql .= " for update";` in the client code, the former seemed like the better option.

---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-abstract/pull/5#issuecomment-99859802
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20150507/c12c2ceb/attachment.htm>


More information about the DBIx-Class-Devel mailing list