IMO current way as of src (sorry i havent read docs at user level), 
u'll need two-side implementaion - one abstract SA, and one 
dialect-dependent. In each dialect, there are 2 mappings: one 
abstractSAtype->specificDialectType (look for something named 
colspecs), and another one used for reflection - named 'pragmanames' 
or ischemanames' or 'similar.

so u have to create your custom abstract type and a custom dialect 
type(s) and add them to those mappings - eventualy substituting with 
some available type where inapplicable.

see in some dialect (in database/*) how a dialect-specific type is 
made, subclassing the abstract one.

of course there might be easier "official" way...

> Hello,
>
> apologies if I'm the obvious or important things in the
> documentation - and I'm obviously very new to SQLAlchemy...
>
> I'd like to create my own types which are aware of different
> database dialects. For example, I need a type 'Double' which holds
> a representation of a double precision floating point number. With
> MySQL, I would  robably use the native DOUBLE type, with Oracle
> BINARY_DOUBLE. I would like to encapsulate the data base dependency
> with a properly defined custom type.
>
> Is there a straigtforward way to achieve this? I have managed to
> build custom types, of course, but I haven't found a way on how to
> deduce the current data base engine / dialect from the
> types.TypeEngine...
>

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