[Dbix-class] DBIx::Class, another data validation approach

Eden Cardim edencardim at gmail.com
Tue Jul 21 18:48:18 GMT 2009


On Tue, Jul 21, 2009 at 1:10 PM, Rob Kinyon<rob.kinyon at gmail.com> wrote:
> First off, I think this is better than DBIC::Validation. It is a
> better fit to the ResultSet/Row separation that DBIC is all about.
>
> That said, there's a few things that I'd like to see be done:
> 1) With one setting, I should be able to turn on validation for all my
> columns that have a type set for them. So, if I have a column that is
> an integer, that should just turn on for me.
> 2) I should be able to chain validations. So, something like
> "validation => [ 'foo', 'bar' ]". Look at how Moose does this.

Once DBIC migrates to Moose we should get all of this relatively transparently.

> 3) Different DBMSes have different types. So, maybe producer-specific
> validations would be helpful (q.v. #1).

For Moose I'd make the storage class load up the adequate
TypeConstraints/Coercions for each backend.

-- 
   Eden Cardim       Need help with your Catalyst or DBIx::Class project?
  Code Monkey                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://edenc.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the DBIx-Class mailing list