You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think option 1 makes sense in an interactive, but can introduce problems, if for example reusing code from a backend with databases with code reliying on con.current_database in con.list_databases(). Or having to handle special cases like if con.current_database is None:.
Option 2 solves this problem, but relying on a made up database name may not be ideal.
I would settle on option 3, where code won't fail silently. Maybe we can support it with a boolean attribute con.supports_databases, if we think users want to check that, in a nicer way than a try/except.
One issue here is with this phrasing: Backend foo does not support multiple databases.
The problem is this doesn't rule out supporting one database, when in fact I believe that most or all the backends that support databases support multiple databases. I could be wrong there, I haven't looked.
Should we phrase it in terms of "support or not support" instead of "may support one or none, but definitely not many"? :)
Following the discussion on #2912, for backends that doesn't support databases, there are 3 options:
Option 1 (original)
Option 2 (new implemented version,
mainis an arbitrary name)Option 3
I think option 1 makes sense in an interactive, but can introduce problems, if for example reusing code from a backend with databases with code reliying on
con.current_database in con.list_databases(). Or having to handle special cases likeif con.current_database is None:.Option 2 solves this problem, but relying on a made up database name may not be ideal.
I would settle on option 3, where code won't fail silently. Maybe we can support it with a boolean attribute
con.supports_databases, if we think users want to check that, in a nicer way than a try/except.@cpcloud @jreback how does this sound?
The text was updated successfully, but these errors were encountered: