package do_postgres;

import data_objects.drivers.AbstractDriverDefinition;
import java.util.Properties;

public class PostgresDriverDefinition extends AbstractDriverDefinition {

    public final static String URI_SCHEME = "postgresql";
    public final static String JDBC_URI_SCHEME = "postgresql";
    public final static String RUBY_MODULE_NAME = "Postgres";

    public PostgresDriverDefinition() {
        super(URI_SCHEME, RUBY_MODULE_NAME);
    }

    @Override
    protected void verifyScheme(String scheme) {
        if (!"postgres".equals(scheme)) {
            throw new RuntimeException(
                    "scheme mismatch, expected: postgres but got: " + scheme);
        }
    }

    @Override
    public boolean supportsJdbcGeneratedKeys()
    {
        return false;
    }

    @Override
    public boolean supportsJdbcScrollableResultSets() {
        return true;
    }

    @Override
    public boolean supportsConnectionEncodings()
    {
        return true;
    }

    @Override
    public void setEncodingProperty(Properties props, String encodingName) {
        // this is redundant as of Postgres 8.0, according to the JDBC documentation:
        // http://jdbc.postgresql.org/documentation/80/connect.html
        props.put("charSet", encodingName);
    }

}

@@ -218,37 +218,35 @@
 HEME = %22postgres
-ql
 %22;%0A
+
     public final
@@ -420,16 +420,33 @@
 _SCHEME,
+ JDBC_URI_SCHEME,
  RUBY_MO
@@ -468,249 +468,8 @@
  %7D%0A%0A
-    @Override%0A    protected void verifyScheme(String scheme) %7B%0A        if (!%22postgres%22.equals(scheme)) %7B%0A            throw new RuntimeException(%0A                    %22scheme mismatch, expected: postgres but got: %22 + scheme);%0A        %7D%0A    %7D%0A%0A
     

Fix omission in previous commit 490d652