fukamachi / cl-dbi

Database independent interface for Common Lisp
202 stars 28 forks source link

Add SQL logging #48

Closed fukamachi closed 5 years ago

fukamachi commented 5 years ago

This patch allows to add hooks when SQL execution by adding a function to dbi:*sql-execution-hooks*.

The hook function takes these 4 values:

Row count and took time could be null if those values are not available for the driver in some reason.

dbi:simple-sql-logger is also provided for just printing those values to *standard-output*.