the simple example demonstrating all the functions defined in the library

Normally you want to use a connection pool, so the db_txn() takes a pool interfaced object. For demonstration, passing in a lambda is much cleaner, but anyway...