Hello,

I was reading about the CheckConstraint documentation, and it looks 
promising. The examples in the docs are doing contraint with integers. 
But the cool thing would be able to define you're own contrainsts using 
ConstraintTypes, or already have pre-defined constraints, ie. 
EmailConstraint which would just be a some kind of regex matching on a 
given string.

A la django.

We could also have custum restrictions based on pre-defined contraints, 
ie. EmailConstraint(contains=["@mycomp.com", "@mycomp.fr"])

This would check if the given email is really at a valid email format 
and check it also contains either the given strings in the constraint.

If validation fails, we could catch the Column's name or a list of all 
failed Columns at the Table level.

Regards,
-- 
Alexandre CONRAD

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to