@@ -1686,6 +1686,28 @@ _mysql_ConnectionObject_get_character_set_info(
1686
1686
}
1687
1687
#endif
1688
1688
1689
+ static char _mysql_ConnectionObject_get_native_connection__doc__ [] =
1690
+ "Return the internal MYSQL* wrapped in a PyCapsule object.\n\
1691
+ NOTE: this is a private API introduced ONLY for XTA integration,\n\
1692
+ don't use it for different use cases.\n\
1693
+ This method is supported only for XTA integration and support must\n\
1694
+ be asked to LIXA project: http://www.tiian.org/lixa/\n\
1695
+ Please DO NOT ask support to PyMySQL/mysqlclient-python project.\n\
1696
+ " ;
1697
+
1698
+ static PyObject *
1699
+ _mysql_ConnectionObject_get_native_connection (
1700
+ _mysql_ConnectionObject * self ,
1701
+ PyObject * noargs )
1702
+ {
1703
+ PyObject * result ;
1704
+ check_connection (self );
1705
+ result = PyCapsule_New (& (self -> connection ),
1706
+ "_mysql.connection.native_connection" , NULL );
1707
+ return result ;
1708
+ }
1709
+
1710
+
1689
1711
static char _mysql_get_client_info__doc__ [] =
1690
1712
"get_client_info() -- Returns a string that represents\n\
1691
1713
the client library version." ;
@@ -2271,6 +2293,12 @@ static PyMethodDef _mysql_ConnectionObject_methods[] = {
2271
2293
_mysql_ConnectionObject_get_character_set_info__doc__
2272
2294
},
2273
2295
#endif
2296
+ {
2297
+ "_get_native_connection" ,
2298
+ (PyCFunction )_mysql_ConnectionObject_get_native_connection ,
2299
+ METH_NOARGS ,
2300
+ _mysql_ConnectionObject_get_native_connection__doc__
2301
+ },
2274
2302
{
2275
2303
"close" ,
2276
2304
(PyCFunction )_mysql_ConnectionObject_close ,
0 commit comments