Tomek C.
Tomek C.

Reputation: 667

MariaDB connector python get executed query

Does the python MariaDB connector has api to print out the actual query that it runs, after it has finished inserting the parameters (in the prepared statements)? Similarly to the solution in the python-mysql: cursor._executed. Sometimes logging query template and arguments is not enough in case of tracking some client compatibility issues.

Upvotes: 1

Views: 898

Answers (1)

meshkati
meshkati

Reputation: 2403

cursor.statement Does the job, according to documentation:

The last executed statement. (read only) Displays the last executed SQL statement. (read-only)

Upvotes: 1

Related Questions