Changeset: ff9049259602 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=ff9049259602 Modified Files: Makefile build.properties pom.xml src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in Branch: embedded Log Message:
Parse embedded JDBC connection parameters as well. diffs (88 lines): diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -10,4 +10,4 @@ doc: clean: rm -f src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java - rm -rf build tests/build jars doc + rm -rf build tests/build jars doc target diff --git a/build.properties b/build.properties --- a/build.properties +++ b/build.properties @@ -19,7 +19,7 @@ MCL_MINOR=14 # major release number JDBC_MAJOR=2 # minor release number -JDBC_MINOR=34 +JDBC_MINOR=35 # an additional identifying string JDBC_VER_SUFFIX=Liberica # the default port to connect on, if no port given when using SQL diff --git a/pom.xml b/pom.xml --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ <groupId>monetdb</groupId> <artifactId>monetdb-jdbc-new</artifactId> - <version>2.34</version> + <version>2.35</version> <name>MonetDB JDBC new</name> <description>MonetDB Adapted JDBC driver for embedded connection</description> <url>https://www.monetdb.org</url> diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java b/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java --- a/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @@ -1318,7 +1318,9 @@ public abstract class MonetConnection ex name.equals("treat_blob_as_binary") || name.equals("treat_clob_as_varchar") || name.equals("embedded") || - name.equals("directory")) + name.equals("directory") || + name.equals("silentFlag") || + name.equals("sequentialFlag")) { conn_props.setProperty(name, value); } else { diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in b/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in --- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in @@ -180,6 +180,16 @@ public final class MonetDriver implement prop.description = "What language to use for MonetDB conversations (experts only)"; props.add(prop); + prop = new DriverPropertyInfo("silentFlag", "true"); + prop.required = false; + prop.description = "Don't produce output from the server (i.e. debug) (Embedded connection only)"; + props.add(prop); + + prop = new DriverPropertyInfo("sequentialFlag", "false"); + prop.required = false; + prop.description = "Use sequential pipeline instead of default pipeline (Embedded connection only)"; + props.add(prop); + DriverPropertyInfo[] dpi = new DriverPropertyInfo[props.size()]; return props.toArray(dpi); } @@ -428,6 +438,9 @@ public final class MonetDriver implement if(isEmbedded) { //instantiate the connection try { String directory = props.getProperty("directory"); + Boolean silentFlag = props.getProperty("silentFlag", "true").equals("true"); + Boolean sequentialFlag = props.getProperty("sequentialFlag", "false").equals("true"); + if (directory != null && (directory.trim().isEmpty() || directory.equals(":memory:"))) directory = null; if(embeddedConnectionClass == null) { @@ -437,8 +450,8 @@ public final class MonetDriver implement } } res = (MonetConnection) embeddedConnectionClass - .getDeclaredConstructor(Properties.class, String.class, String.class, String.class) - .newInstance(props, hash, language, directory); + .getDeclaredConstructor(Properties.class, String.class, String.class, String.class, Boolean.class, Boolean.class) + .newInstance(props, hash, language, directory, silentFlag, sequentialFlag); } catch (InvocationTargetException | InstantiationException | IllegalAccessException | NoSuchMethodException | ClassNotFoundException e) { throw new SQLNonTransientConnectionException(e); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list