[storm] What's the best way to handle Python Boolean values with Oracle?

Jamu Kakar jkakar at kakar.ca
Tue Jun 23 18:01:51 BST 2009


Hi Vernon,

On Tue, Jun 23, 2009 at 8:42 AM, Vernon Cole<vernondcole at gmail.com> wrote:
>   I think it would be handy if such a function (or perhaps an attribute)
> were added to the database object. It could contain the "scheme" as a
> string, perhaps, or perhaps something more definitive.  Such a feature would
> be very helpful in an ADO implementation.
>
> Would the group entertain such a thing?
>
> Could it/how should it be done?

When you pass a string like "sqlite:" to create_database it gets
converted to a URI object.  That URI object is passed to a
backend-specific Database subclass that uses it to setup its
internal state.  Currently, the URI object is used to create this
internal state, but not stored.  I think it could make sense to
provide a 'uri' attribute to make it easy to get the information you
describe.

So you'd be able to do something like:

database = create_database("sqlite:wubble.sqlite")
print database.uri.database

Does it matter that we'd be exposing the connection password through
this API?  It feels a bit wrong, but I'm not sure how wrong it
really is.

Thanks,
J.



More information about the storm mailing list