may-day / olap

Python package to access OLAP data sources.
63 stars 47 forks source link

Closing a connection #5

Open kmcnayr opened 9 years ago

kmcnayr commented 9 years ago

This is not an issue but I don't know where else to submit a question for feedback.

Is there a way to close a connection using xmla? Following the examples, what do you do when a session is over? I see there is an EndSession definition in the connection module but it doesn't seem like this should be called directly since the corresponding BeginSession is never used by the user. The XMLAProvider and XMLAClass also do not appear to have any close method.

I was thinking there would be a connection.close() method or something similar to cleanly close the connection to the server. It feels weird just letting it hang and hoping the system will close correctly/eventually after a program is executed and closes.

Any comments/guidance are appreciated.

may-day commented 9 years ago

The session-thing you mention is unrelated to the open-connection/close-connection issue. For sessions see this: https://technet.microsoft.com/en-us/library/ms187187%28v=sql.110%29.aspx As for the connection issue: Although it's basically (for now) a http-connection (which times out eventually ) i agree we should have an explicit call to close a connection.