Closed mirromutth closed 7 months ago
Motivation:
See also #138 .
When driver executing a text statement (no binding), log will like:
2023-12-31 | 23:59:59.999 | reactor-tcp-nio-1 | DEBUG | i.a.r2dbc.mysql.QUERY | Executing statement [SELECT 1]
When user is using client-preparing statements, log will like:
2023-12-31 | 23:59:59.999 | reactor-tcp-nio-1 | DEBUG | i.a.r2dbc.mysql.QUERY | Executing statement [SELECT value FROM test WHERE id=?] with [1]
When user is using server-preparing statements, log will like:
2023-12-31 | 23:59:59.999 | reactor-tcp-nio-1 | DEBUG | i.a.r2dbc.mysql.QUERY | Executing statement [INSERT INTO test VALUES(DEFAULT,?)] 2023-12-31 | 23:59:59.999 | reactor-tcp-nio-1 | DEBUG | i.a.r2dbc.mysql.QUERY | Prepared statement 1 [INSERT INTO test VALUES(DEFAULT,?)] 2023-12-31 | 23:59:59.999 | reactor-tcp-nio-1 | DEBUG | i.a.r2dbc.mysql.QUERY | Executing prepared statement 1 with [10]
Modification:
AbstractMySqlParameter
toString
Result:
More human-friendly SQL debugging logging.
I fixed a little miss in the README, and I added an override of toString() in the example of MySqlParameter.
toString()
MySqlParameter
Motivation:
See also #138 .
When driver executing a text statement (no binding), log will like:
When user is using client-preparing statements, log will like:
When user is using server-preparing statements, log will like:
Modification:
AbstractMySqlParameter
need to overridetoString
.Result:
More human-friendly SQL debugging logging.