You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cursor.execute("INSERT INTO test (testField) VALUES (123)")
52
+
cursor.close()
53
+
cnx.close()
54
+
55
+
For example,
56
+
::
57
+
Invoking cursor.execute("INSERT INTO test (testField) VALUES (123)") will lead to sql query "INSERT INTO test (testField) VALUES (123)" but when SQLCommenter is enabled
58
+
the query will get appended with some configurable tags like "INSERT INTO test (testField) VALUES (123) /*tag=value*/;"
59
+
60
+
SQLCommenter Configurations
61
+
***************************
62
+
We can configure the tags to be appended to the sqlquery log by adding configuration inside commenter_options(default:{}) keyword
63
+
64
+
db_driver = True(Default) or False
65
+
66
+
For example,
67
+
::
68
+
Enabling this flag will add mysql.connector and its version, e.g. /*mysql.connector%%3A1.2.3*/
69
+
70
+
dbapi_threadsafety = True(Default) or False
71
+
72
+
For example,
73
+
::
74
+
Enabling this flag will add threadsafety /*dbapi_threadsafety=2*/
75
+
76
+
dbapi_level = True(Default) or False
77
+
78
+
For example,
79
+
::
80
+
Enabling this flag will add dbapi_level /*dbapi_level='2.0'*/
81
+
82
+
mysql_client_version = True(Default) or False
83
+
84
+
For example,
85
+
::
86
+
Enabling this flag will add mysql_client_version /*mysql_client_version='123'*/
87
+
88
+
driver_paramstyle = True(Default) or False
89
+
90
+
For example,
91
+
::
92
+
Enabling this flag will add driver_paramstyle /*driver_paramstyle='pyformat'*/
93
+
94
+
opentelemetry_values = True(Default) or False
95
+
96
+
For example,
97
+
::
98
+
Enabling this flag will add traceparent values /*traceparent='00-03afa25236b8cd948fa853d67038ac79-405ff022e8247c46-01'*/
0 commit comments