db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: column attribute inputValidator
Date Mon, 27 Sep 2010 17:43:31 GMT
On 27.09.10 16:21, Greg Monroe wrote:
> Even thought we don't use it, I think this is a valuable attribute.  I 
> know I've referenced it a few times when people ask about validation.  
> E.g., in you set it to your custom validation class, then in the Table 
> class override the base set method for the column so that it lookups 
> and calls this validator class.

I beg to differ. IMO, validation should be done at the input edge and
not in the Db layer.

> Although, I suppose that we could drop this in favor to the more generic
> "option" key/value attribute.  However, the disadvantage here is that
> the options attribute was designed for use by templates and are not
> carried into the Map classes. 

The Map classes are generated from templates, too.

> Maybe the options attribute key/value pairs should be carried into
> the Map structure.  This would be a more generic method for application
> or add-on developers to define custom items that can be used by either
> templates or code.

I second this one. Having this kind of extension mechanism available in
the code could be *very* useful.

Bye, Thomas.

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message