[Dbix-class] Re: SELECT ..
FOR ... (and other db-specific clauses).
Matt S Trout
dbix-class at trout.me.uk
Sat Jul 7 18:50:32 GMT 2007
On Sun, Jul 08, 2007 at 01:51:50AM +0900, Daisuke Maki wrote:
>
> >Looks fairly reasonable. Why are you calling it 'locking' instead of 'for'
> >?
>
> Absolutely no reason, I just used the naming used in the original post
> that I based my initial changes on.
>
> I suppose
>
> $schema->resultset('Foo')->search(
> { ... },
> {
> for => 'update'
> }
> );
>
> Is fair, but within DBIC::SQL::Abstract, it would still be called
> 'locking' or 'for_locking' or something like that, otherwise it wouldn't
> make sense.
>
> But that seems like a style matter, and in this particular context I
> don't have a strong preference either way.
"locking => 'update'" just jarred me a bit. If we're going to call it
locking we should probably do 'exclusive' versus 'shared' ...
How about "lock_for => 'update'", "lock_for => 'shared'" ?
That could be uniform through the whole thing -and- seems semantically sane.
Thoughts?
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/
More information about the Dbix-class
mailing list