On Mon, Mar 2, 2009 at 8:58 AM, Perrin Harkins <per...@elem.com> wrote:
> Ancient. Even Class::DBI has tools to automatically generate classes
> from your database and Rose::DB::Object takes that much further,
> including constraints.
>
Rose will refuse to attempt an insert/update if that data provided for a
column does not fit the type constraints ( how it refuses is configurable ).
If fact in Rose it's very straight forward to reuse the type constraint
metadata to check values that came from a user before you even attempt
the insert which enables you to do things like present a friendly error to
your end user.
Of course Rose also allows you to specify custom type constraints as
sub-classes of the Rose::DB::Object::Metadata::Column class,
which confer all of these benefits to you.
Clayton
>
> - Perrin
>
> On Mon, Mar 2, 2009 at 6:49 AM, Jonathan Yu <jonathan.i...@gmail.com>
> wrote:
> > A quick update-
> >
> > I failed to notice that the article is from 2006, and I'm not sure if
> > things have changed since then. I didn't do my homework, or else I
> > would have seen that SQL::Translator does have Constraint parsing for
> > CHECK constraints. Silly me.
> >
> > On the other hand, does DBIx::Class make use of this? I don't recall
> > reading anything in the documentation about it, so perhaps a doc patch
> > is in order. A cursory search of the Cookbook (ie, Ctrl+F search) for
> > the word "constraint" doesn't turn up anything. Did I miss something?
> >
> > Cheers,
> >
> > Jonathan
> >
> > On Mon, Mar 2, 2009 at 6:40 AM, Jonathan Yu <jonathan.i...@gmail.com>
> wrote:
> >> Hi all:
> >>
> >> Just wondering what all of your thoughts are with respect to this
> >> article: http://dave.org.uk/talks/lpm/2006/orm/
> >>
> >> I think he raises some valid points, so it's worthwhile to see what we
> >> can do in terms of patching SQL::Translator to provide a better
> >> interface.
> >>
> >> This is cross-posted to two mailing lists (DBIx::Class and
> >> SQL::Translator), so you may not see all replies unless you are part
> >> of both lists.
> >>
> >> I think the thing about constraints is important. Is it possible to
> >> implement custom constraints on data? What I mean is, parse the
> >> constraint from the SQL database, and then use that to validate data
> >> prior to INSERTs and UPDATEs? Then you could validate data before it
> >> even enters the database.
> >>
> >> Cheers,
> >>
> >> Jonathan
> >>
> >
> >
> ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> > -Strategies to boost innovation and cut costs with open source
> participation
> > -Receive a $600 discount off the registration fee with the source code:
> SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > --
> > sqlfairy-developers mailing list
> > sqlfairy-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers
> >
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> --
> sqlfairy-developers mailing list
> sqlfairy-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers
>
--
Clayton Scott
clayton.sc...@gmail.com
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
--
sqlfairy-developers mailing list
sqlfairy-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers