db.Exec(query,args...)
can the sqlx engine print the query sentence like db.PrintSQL(true)?
You can turn on logging in your SQL server. Afaik almost any SQL derivate supports this feature.
I would echo @juliusmh's comment. In PostgreSQL you can enable SQL statement logging:
SHOW log_statement;
ALTER DATABASE mydb
SET log_statement = 'all';
-- restart postgres
SHOW log_statement;
ALTER DATABASE mydb
SET log_statement = 'none';
Or, by editing postgresql.conf and changing the log_statement setting to 'all'.
https://www.postgresql.org/docs/9.5/static/runtime-config-logging.html
Please it is necessary to consider enabling logging. We don't have to tamper with our database servers to see logs as developers
Well,not supported.
Most helpful comment
Please it is necessary to consider enabling logging. We don't have to tamper with our database servers to see logs as developers