determining database manager type from z database connection?
Is there a generic way to determine what 'brand' of database manager a Zope database connection is connected to by interrogating the connection object? I couldn't see anything in the source and I also walked a connection object using the debugger and couldn't locate any non-specific way to determine this, outside of triggering an exception and observing the exception contents...
Kent Polk wrote:
Is there a generic way to determine what 'brand' of database manager a Zope database connection is connected to by interrogating the connection object?
<dtml-in SQLConnectionIDs> <b>ID:</b><dtml-var sequence-key> <b>title:</b><dtml-var "_.getitem(_['sequence-item']).title"> <b>type:</b><dtml-var "_.getitem(_['sequence-item']).database_type"> <br> </dtml-in> database_type is the 'brand' of the Zope DA. If you are connectet to a PostgreSQL DB using ZPyGreSQLDA you get 'PyGreSQL'. Using ZPoPyDA it returns 'PoPy'. That's not exactly what you are looking for but I hope it helps. Andreas -- _______________________________________________________________________ Andreas Heckel andreas@easyleading.org LINUX is like a wigwam...no gates...no windows and an apache inside ;-)
On 3 May 2001 21:15:01 -0500, Andreas Heckel wrote:
Kent Polk wrote:
Is there a generic way to determine what 'brand' of database manager a Zope database connection is connected to by interrogating the connection object?
<dtml-in SQLConnectionIDs> <b>ID:</b><dtml-var sequence-key> <b>title:</b><dtml-var "_.getitem(_['sequence-item']).title"> <b>type:</b><dtml-var "_.getitem(_['sequence-item']).database_type"> <br> </dtml-in>
database_type is the 'brand' of the Zope DA. If you are connectet to a PostgreSQL DB using ZPyGreSQLDA you get 'PyGreSQL'. Using ZPoPyDA it returns 'PoPy'. That's not exactly what you are looking for but I hope it helps.
Actually, that is exactly what I was looking for. Thanks Much!
participants (2)
-
320011178755-0001@t-online.de -
kent@goathill.org