On Jun 22, 5:18 pm, d_henderson <[EMAIL PROTECTED]> wrote:
>
> I like the idea of a call which enumerates available engines. It's
> certainly easy to see if the module is installed, but a bit more
> difficult to see if it is supported
> ...
>
> I think we need all the help we can get to discover and diagnose the
> environment. I'd like to see engine_descriptors left in, documented
> more prominently, and perhaps even enhanced.
sure, but the feature you describe above is not at all what
engine_descriptors() does. engine_descriptors() returns you a list
that has information along the lines of: "postgres", "mssql",
"mysql", "sqlite", etc. nothing whatsoever about DBAPI. it also
attempts to have a kind of "template" for how to format the arguments
for each database, which was the real point of it - so a web
application could figure out how to connect generically. but this
feature is completely incorrect and obsolete now since SA 0.2 moved to
RFC-1738 urls so now you connect to each database in exactly the same
way.
what youre looking for is a DBAPI module search feature....manually,
you can do this by just trying to import each module. sqlalchemy
dialects have their own module importer functions that try to find a
suitable module as well, but only one thats relevant to that dialect.
im not sure what the use case is exactly for an automated function
that returns yes/no for every DBAPI potentially used by every
dialect...if you want an application to say, "you need to install XYZ
to run", you can just try connecting and if no error/warning, then
youre good (i.e. i think exception propigation, rather than "dig in
and inspect ahead of time", is the way to go here).
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---