I have a PostgreSQL database that I run queries on, then use

  $rs->result_class('DBIx::Class::ResultClass::HashRefInflator');

and send [ $rs->all ] to JSON::XS for serialization in a RESTful interface.

It works well, except that numeric values are being translated into strings
instead of numbers.

This doesn't happen with integers, because I cast the column as "::int" and
the system just does the right thing.  But when I cast numeric columns as
"::numeric", they still come out as strings.

I'm at the point where I want to write my own HashRefInflator, but I don't
understand what arguments the inflate_result method expects.

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to