Skip to content

Added method get_native_connection: it retrieves a PyCapsule with MYSQL* C native pointer inside #269

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

Merged
merged 2 commits into from
Oct 20, 2018

Conversation

tiian
Copy link
Contributor

@tiian tiian commented Oct 8, 2018

This extension is necessary to retrieve MYSQL * C native pointer from the underlying C API and pass it to another Python module that requires it.
A PyCapsule object is used to retrieve the pointer.
A use case is described here: https://stackoverflow.com/questions/52687294/how-to-retrieve-mysql-native-connection-from-mysql-and-or-mysqldb-connection#
I have used the same method name that Psycopg2 is introducing in the next version: fogzot/psycopg2@81adddd

Kind Regards
Ch.F.

@methane
Copy link
Member

methane commented Oct 9, 2018

I don't have any interest on XA transaction. I never trust it. I never use it.
I don't want to add public, stable, supported API for expose underlaying data structure.
I'm very tired about replying to questions people asking here (issue tracker, not user forum)...

I'm OK to private API only for your project. It should be private, undocumented, and I don't maintain it.
I don't know how you treat ABI compatibility. For example, MYSQL structure is different between MySQL versions, and MariaDB. You should support all troubles caused by the API.

@methane methane merged commit 54c6943 into PyMySQL:master Oct 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants