package djdbc;

import java.sql.*;

public interface Driver {
  /**
   * Checks whether the exception represents a transaction conflict.
   * Is used for automatic retrying of the conflicting transactions.
   */
  boolean detectTransactionConflict(SQLException exception);

  Driver standard =
    new Driver() {
      /**
       * Implements the test according to the SQL standard.
       * https://en.wikibooks.org/wiki/Structured_Query_Language/SQLSTATE
       */
      @Override
      public boolean detectTransactionConflict(SQLException exception) {
        return exception.getSQLState().equals("40001");
      }
    };
}

@@ -29,16 +29,183 @@
 sql.*;%0A%0A
+/**%0A * For known databases the %7B@link #standard%7D instance of this interface will suffice.%0A * However, you're free to implement your own in cases, when it doesn't.%0A */%0A
 public i
@@ -434,16 +434,125 @@
 tion);%0A%0A
+  /**%0A   * A standard implementation of the Driver interface,%0A   * which should do for most databases.%0A   */%0A
   Driver

Add docs