[Dbix-class] DBIx::Class::ResultSet (paging <-> slicing) proposed patch

2007-12-07 Thread James Kiser
I came across an issue when trying to slice a paged result set. Basically, it boils down to the offset not being calculated properly when slicing a paged result set. I wrote a patch (diff: http://scsys.co.uk:8001/11287) that corrects this issue and have tested the following (order of operation is

Re: [Dbix-class] update with result of a function

2007-12-07 Thread Cedric Boudin
my $rs=$schema->resultset('...')->search({}); my $what='not column'; $rs->update({column=>\$what}); Automagical thx cedric Cedric Boudin wrote: > Dear Members of the list, > > I want to do this on a table: > > update table set column=function(column) where fk=some_value; > > I'm general

[Dbix-class] update with result of a function

2007-12-07 Thread Cedric Boudin
Dear Members of the list, I want to do this on a table: update table set column=function(column) where fk=some_value; I'm generalising here, in fact in this first case function is "not" and column type is boolean. I tried : a) something inspired of "Using database functions or stored procedures