code: public static void beginTransaction() {
          ifNullThen(localConnection.get(),
                  () -> {
                      Connection connection = getSql2o().beginTransaction();
                      localConnection.set(connection);
                  });
      }
docs: Begin a transaction.