I want to make a custom type and I'm not sure whether to use
UserDefinedType or TypeDecorator.

for a UserDefinedType it seems I must write "bind_processor" and "
result_processor" or
for TypeDecorator it seems I must write "process_bind_param"  and
"process_result_value"

I think I need a UserDefinedType as I'm combining two primitive types
rather than specialising one. I want Vector2D(float, float) and an
ordered list of such vectors and to pass these into the DB using
something as close as possible to Python such as [(ax, ay), (bx, by),
(cx, cy)]

After reading some doco and posts I'm still unclear exactly what the
functions I have to write should do as they often seem to do very
little. Really, I just want to insert tuples into columns.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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