@Test public void txHelperPrepare() throws SQLException { TransactionHelper txHelper = pgConnection.getStrictTransactionHelper(null, "__digdag_status", Duration.ofDays(1)); UUID queryId = UUID.randomUUID(); txHelper.prepare(queryId); verify(pgConnection).execute(eq( "CREATE TABLE IF NOT EXISTS \"__digdag_status\"" + " (query_id text NOT NULL UNIQUE, created_at timestamptz NOT NULL, completed_at timestamptz)")); }
@Override public TransactionHelper getStrictTransactionHelper(String statusTableSchema, String statusTableName, Duration cleanupDuration) { return new PgPersistentTransactionHelper(statusTableSchema, statusTableName, cleanupDuration); }
PgConnection extends AbstractJdbcConnection { @Override public TransactionHelper getStrictTransactionHelper(String statusTableSchema, String statusTableName, Duration cleanupDuration) { return new PgPersistentTransactionHelper(statusTableSchema, statusTableName, cleanupDuration); } }
PgConnection extends AbstractJdbcConnection { @Override public TransactionHelper getStrictTransactionHelper(String statusTableSchema, String statusTableName, Duration cleanupDuration) { return new PgPersistentTransactionHelper(statusTableSchema, statusTableName, cleanupDuration); } protected  PgConnection(Connection connection); }
PgConnection extends AbstractJdbcConnection { @Override public TransactionHelper getStrictTransactionHelper(String statusTableSchema, String statusTableName, Duration cleanupDuration) { return new PgPersistentTransactionHelper(statusTableSchema, statusTableName, cleanupDuration); } protected  PgConnection(Connection connection); @VisibleForTesting static PgConnection open(PgConnectionConfig config); @Override void executeReadOnlyQuery(String sql, Consumer<JdbcResultSet> resultHandler); @Override String escapeIdent(String ident); @Override TransactionHelper getStrictTransactionHelper(String statusTableSchema, String statusTableName, Duration cleanupDuration); }
PgConnection extends AbstractJdbcConnection { @Override public TransactionHelper getStrictTransactionHelper(String statusTableSchema, String statusTableName, Duration cleanupDuration) { return new PgPersistentTransactionHelper(statusTableSchema, statusTableName, cleanupDuration); } protected  PgConnection(Connection connection); @VisibleForTesting static PgConnection open(PgConnectionConfig config); @Override void executeReadOnlyQuery(String sql, Consumer<JdbcResultSet> resultHandler); @Override String escapeIdent(String ident); @Override TransactionHelper getStrictTransactionHelper(String statusTableSchema, String statusTableName, Duration cleanupDuration);  }