On Jan 24, 1:50 am, "chris e" <[EMAIL PROTECTED]> wrote:
> I am planning on using sqlalchemy to build the api for a database I am
> developing, and I was wondering if there is any type of column
> verification that occurs before database commit.
>
> I.E.:  a string column with length 40 would throw a verification
> exception if a value longer that 40 characters was placed into it and
> saved.

your database will throw an error.  why reinvent the wheel ?

>
> Additionally has anyone thought of implementing some sort of
> verification support for objects that are mapped which would allow the
> object to perform pre database action logic?  The intent being that the
> instance would check to see that the object meets additional business
> logic requirements before it is inserted or updated.
>
> I.E.: a User business object would verify that the userid was part of
> the [a-z] [A-Z]and [0-9] character classes, and if not an exception
> would be raised to prevent the database action.

thats exactly the kind of thing you should write into your 
application.  has nothing to do with an ORM.  for generic validation 
widgets to help, check out formencode ( http://formencode.org/ ).



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to