@Test public void testToString() { String s = Database.test().select("select score from person order by score") .transactedValuesOnly() .getAs(Integer.class) .map(tx -> tx.toString()) .firstOrError() .blockingGet(); assertTrue(s.startsWith("TxImpl [")); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("TxImpl [con="); builder.append(con); if (isValue()) { builder.append(", value="); builder.append(value); } else if (isError()) { builder.append(", error="); builder.append(e); } else { builder.append(", completed="); builder.append(completed); } builder.append("]"); return builder.toString(); }
TxImpl implements Tx<T> { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("TxImpl [con="); builder.append(con); if (isValue()) { builder.append(", value="); builder.append(value); } else if (isError()) { builder.append(", error="); builder.append(e); } else { builder.append(", completed="); builder.append(completed); } builder.append("]"); return builder.toString(); } }
TxImpl implements Tx<T> { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("TxImpl [con="); builder.append(con); if (isValue()) { builder.append(", value="); builder.append(value); } else if (isError()) { builder.append(", error="); builder.append(e); } else { builder.append(", completed="); builder.append(completed); } builder.append("]"); return builder.toString(); } TxImpl(Connection con, T value, Throwable e, boolean completed, Database db); }
TxImpl implements Tx<T> { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("TxImpl [con="); builder.append(con); if (isValue()) { builder.append(", value="); builder.append(value); } else if (isError()) { builder.append(", error="); builder.append(e); } else { builder.append(", completed="); builder.append(completed); } builder.append("]"); return builder.toString(); } TxImpl(Connection con, T value, Throwable e, boolean completed, Database db); @Override boolean isValue(); @Override boolean isComplete(); @Override boolean isError(); @Override T value(); @Override Throwable throwable(); TransactedConnection connection(); @Override TransactedSelectBuilder select(String sql); @Override TransactedUpdateBuilder update(String sql); @Override TransactedCallableBuilder call(String sql); @Override String toString(); }
TxImpl implements Tx<T> { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("TxImpl [con="); builder.append(con); if (isValue()) { builder.append(", value="); builder.append(value); } else if (isError()) { builder.append(", error="); builder.append(e); } else { builder.append(", completed="); builder.append(completed); } builder.append("]"); return builder.toString(); } TxImpl(Connection con, T value, Throwable e, boolean completed, Database db); @Override boolean isValue(); @Override boolean isComplete(); @Override boolean isError(); @Override T value(); @Override Throwable throwable(); TransactedConnection connection(); @Override TransactedSelectBuilder select(String sql); @Override TransactedUpdateBuilder update(String sql); @Override TransactedCallableBuilder call(String sql); @Override String toString();  }