New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider making check_and_return_mode
public
#10
Comments
There's a much simpler way to find out. Does this work for you?
Note that the mode of the driver is undefined until either a connection is established or a call to |
I guess that could work yes. Thanks for the quick response, I think we can close. It may just make sense to mention the |
I agree that the documentation should mention that information, too. I think the intent of that section was for someone tracing from the SQL side of things, not Python -- but let's see what @cjbj thinks. |
Sometimes I praise myself for foresight about what will be useful.... (which wipes out memory of all the things I predicted incorrectly). I knew a flag would be useful, and mentioned it more than once! We should add a python-oracledb boolean to indicate the mode - I would argue strongly that the initial state is 'Thin', not undefined. Just like any state flag the value can change during an app's life. Yes at some point in python-oracledb it will become unchangeable, but that's not important. Regarding doc, towards the end of the 1.0.0 development phase the tracing.html section morphed into a general tracing section so it makes sense to mention connection.thin and pool.thin. |
I've added the necessary code. This is the documentation for the new method:
|
This enhancement has been implemented in python-oracledb 1.1.0 which was just released. |
thanks! |
I think it would be useful to have a way of finding the mode of the oracledb library without having to connect to the db to execute the suggested https://python-oracledb.readthedocs.io/en/latest/user_guide/tracing.html#vsessconinfo
Looking at the library it seems that there is an internal function
check_and_return_mode
that returns this information.Given its returning value also a simpler wrapper called something like
def is_thin_mode()->bool: ...
would be enoughn/a
The text was updated successfully, but these errors were encountered: