Hi,

I've to parse raw user input which ends up as filter-parameters for querys. 
Consider the following examples, which will end up as where-clauses against 
date- and decimal-columns (among others).

FooDate = 2005/12/04
FooDate = 04.12.2005
BarValue = 100,000.00$
BarValue = USD 100000


My question is >where< to put the code that will parse the 
right-hand-side-values and bring it to the appropriate type. 

The database- and python-type can be inferred from reflection and the raw 
strings are parsed by regular expressions. My idea is to put this into 
types.TypeDecorators (e.g. process_bind_param()) so code building queries 
from raw user input does not have to care about doing type coercion itself.

Ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/kcRKhm_H6rEJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to