June 15, 2022
At SQ, we had a family of Transacter interfaces:
public interface Transacter { void transaction(Function<Session, Void> session); public interface Session { DSLContext dsl(); } } where DSLContext is a jOOQ concept & is the handle for doing work against the database. Then this would be used in some class like
public class KvDao { @Inject Transacter transacter; void put(String ns, String k, String v) { transacter.transaction(session -> { KvRecord record = new KvRecord(ns, k, v); session.