Mercurial > hg > monetdb-java
changeset 91:6f74e01c57da embedded
Made fixings regarding the null values retrieval. The JDBC embedded connection is working!!! :) Some more testing, optimizations and compilations fixes are still required.
line wrap: on
line diff
--- a/build.xml +++ b/build.xml @@ -5,7 +5,7 @@ This Source Code Form is subject to the License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. +Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. --> <!--
--- a/example/MJDBCTest.java +++ b/example/MJDBCTest.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/example/PreparedExample.java +++ b/example/PreparedExample.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/example/SQLImport.java +++ b/example/SQLImport.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/example/SQLcopyinto.java +++ b/example/SQLcopyinto.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/src/main/java/nl/cwi/monetdb/client/JMonetDB.java +++ b/src/main/java/nl/cwi/monetdb/client/JMonetDB.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.client;
--- a/src/main/java/nl/cwi/monetdb/client/JdbcClient.java +++ b/src/main/java/nl/cwi/monetdb/client/JdbcClient.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.client;
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetBlob.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetBlob.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.jdbc;
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetClob.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetClob.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.jdbc;
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @@ -1,7 +1,5 @@ package nl.cwi.monetdb.jdbc; -import nl.cwi.monetdb.jdbc.types.MonetINET; -import nl.cwi.monetdb.jdbc.types.MonetURL; import nl.cwi.monetdb.mcl.connection.*; import nl.cwi.monetdb.mcl.connection.SenderThread; import nl.cwi.monetdb.mcl.connection.mapi.MapiLanguage; @@ -72,7 +70,6 @@ public abstract class MonetConnection ex private Map<String,Class<?>> typeMap = new HashMap<String,Class<?>>() { private static final long serialVersionUID = 1L; { put("inet", MonetINET.class); - put("url", MonetURL.class); } };
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDataSource.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDataSource.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.jdbc;
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.jdbc;
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.jdbc;
new file mode 100644 --- /dev/null +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetINET.java @@ -0,0 +1,169 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. + */ + +package nl.cwi.monetdb.jdbc; + +import java.net.Inet4Address; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.sql.SQLData; +import java.sql.SQLException; +import java.sql.SQLInput; +import java.sql.SQLOutput; + +/** + * The INET class represents the INET datatype in MonetDB. It + * represents a IPv4 address with a certain mask applied. Currently, + * IPv6 is not supported. + * <br /> + * The input format for INET is x.x.x.x/y where x.x.x.x is an IP address + * and y is the number of bits in the netmask. If the /y part is left + * off, then the netmask is 32, and the value represents just a single + * host. On display, the /y portion is suppressed if the netmask is 32. + * <br /> + * This class allows to retrieve the value of this INET as InetAddress. + * This is probably meaningful only and only if the netmask is 32. The + * getNetmaskBits() method can be used to retrieve the subnet bits. + */ +public class MonetINET implements SQLData { + + private static String FromString(String newinet) throws Exception { + if (newinet == null) { + return null; + } + int slash = newinet.indexOf('/'); + String tinet = newinet; + if (slash != -1) { + int netmask; + // ok, see if it is a valid netmask + try { + netmask = Integer.parseInt(newinet.substring(slash + 1)); + } catch (NumberFormatException nfe) { + throw new Exception("cannot parse netmask bits: " + newinet.substring(slash + 1)); + } + if (netmask <= 0 || netmask > 32) + throw new Exception("netmask must be >0 and <32"); + tinet = newinet.substring(0, slash); + } + // check dotted quad + String quads[] = tinet.split("\\."); + if (quads.length != 4) + throw new Exception("expected dotted quad (xxx.xxx.xxx.xxx)"); + for (int i = 0; i < 4; i++) { + int quadv; + try { + quadv = Integer.parseInt(quads[i]); + } catch (NumberFormatException nfe) { + throw new Exception("cannot parse number: " + quads[i]); + } + if (quadv < 0 || quadv > 255) + throw new Exception("value must be between 0 and 255: " + quads[i]); + } + // everything is fine + return newinet; + } + + private String inet; + + public MonetINET(String inet) throws Exception { + this.inet = FromString(inet); + } + + @Override + public String getSQLTypeName() { + return "inet"; + } + + @Override + public void readSQL(SQLInput stream, String typeName) throws SQLException { + if (typeName.compareTo("inet") != 0) + throw new SQLException("can only use this class with 'inet' type", "M1M05"); + inet = stream.readString(); + } + + @Override + public void writeSQL(SQLOutput stream) throws SQLException { + stream.writeString(inet); + } + + @Override + public String toString() { + return inet; + } + + public void fromString(String newinet) throws Exception { + inet = FromString(newinet); + } + + public String getAddress() { + if (inet == null) + return null; + + // inet optionally has a /y part, if y < 32, chop it off + int slash = inet.indexOf('/'); + if (slash != -1) + return inet.substring(0, slash); + return inet; + } + + public void setAddress(String newinet) throws Exception { + if (newinet == null) { + inet = null; + return; + } + if (newinet.indexOf('/') != -1) + throw new Exception("IPv4 address cannot contain '/' " + "(use fromString() instead)"); + fromString(newinet); + } + + public int getNetmaskBits() throws SQLException { + if (inet == null) + return 0; + + // if netmask is 32, it is omitted in the output + int slash = inet.indexOf('/'); + if (slash == -1) + return 32; + try { + return Integer.parseInt(inet.substring(slash + 1)); + } catch (NumberFormatException nfe) { + throw new SQLException("cannot parse netmask bits: " + inet.substring(slash + 1), "M0M27"); + } + } + + public void setNetmaskBits(int bits) throws Exception { + String newinet = inet; + if (newinet == null) { + newinet = "0.0.0.0/" + bits; + } else { + int slash = newinet.indexOf('/'); + if (slash != -1) { + newinet = newinet.substring(0, slash + 1) + bits; + } else { + newinet = newinet + "/" + bits; + } + } + fromString(newinet); + } + + public InetAddress getInetAddress() throws SQLException { + if (inet == null) + return null; + try { + return InetAddress.getByName(getAddress()); + } catch (UnknownHostException uhe) { + throw new SQLException("could not resolve IP address", "M0M27"); + } + } + + public void setInetAddress(InetAddress iaddr) throws Exception { + if (!(iaddr instanceof Inet4Address)) + throw new Exception("only IPv4 are supported currently"); + fromString(iaddr.getHostAddress()); + } +}
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.jdbc;
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java @@ -3,13 +3,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.jdbc; -import nl.cwi.monetdb.jdbc.types.MonetINET; -import nl.cwi.monetdb.jdbc.types.MonetURL; import nl.cwi.monetdb.mcl.connection.helpers.GregorianCalendarParser; import nl.cwi.monetdb.mcl.protocol.ProtocolException; import nl.cwi.monetdb.mcl.responses.DataBlockResponse; @@ -1640,9 +1638,7 @@ public class MonetResultSet extends Mone case 3: if ("url".equals(MonetDBType)) { try { - MonetURL url_obj = new MonetURL(); - url_obj.fromString(val); - return url_obj; + return new URL(val); } catch (Exception exc) { // ignore exception and just return the val String object return val; @@ -1652,9 +1648,7 @@ public class MonetResultSet extends Mone case 4: if ("inet".equals(MonetDBType)) { try { - MonetINET inet_obj = new MonetINET(); - inet_obj.fromString(val); - return inet_obj; + return new MonetINET(val); } catch (Exception exc) { // ignore exception and just return the val String object return val;
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetSavepoint.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetSavepoint.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.jdbc;
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.jdbc;
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetWrapper.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetWrapper.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.jdbc;
deleted file mode 100644 --- a/src/main/java/nl/cwi/monetdb/jdbc/types/MonetINET.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. - */ - -package nl.cwi.monetdb.jdbc.types; - -import java.sql.*; -import java.net.*; - -/** - * The INET class represents the INET datatype in MonetDB. It - * represents a IPv4 address with a certain mask applied. Currently, - * IPv6 is not supported. - * <br /> - * The input format for INET is x.x.x.x/y where x.x.x.x is an IP address - * and y is the number of bits in the netmask. If the /y part is left - * off, then the netmask is 32, and the value represents just a single - * host. On display, the /y portion is suppressed if the netmask is 32. - * <br /> - * This class allows to retrieve the value of this INET as InetAddress. - * This is probably meaningful only and only if the netmask is 32. The - * getNetmaskBits() method can be used to retrieve the subnet bits. - */ -public class MonetINET implements SQLData { - - private String inet; - - @Override - public String getSQLTypeName() { - return "inet"; - } - - @Override - public void readSQL(SQLInput stream, String typeName) throws SQLException { - if (typeName.compareTo("inet") != 0) - throw new SQLException("can only use this class with 'inet' type", "M1M05"); - inet = stream.readString(); - } - - @Override - public void writeSQL(SQLOutput stream) throws SQLException { - stream.writeString(inet); - } - - @Override - public String toString() { - return inet; - } - - public void fromString(String newinet) throws Exception { - if (newinet == null) { - inet = null; - return; - } - int slash = newinet.indexOf('/'); - String tinet = newinet; - if (slash != -1) { - int netmask; - // ok, see if it is a valid netmask - try { - netmask = Integer.parseInt(newinet.substring(slash + 1)); - } catch (NumberFormatException nfe) { - throw new Exception("cannot parse netmask bits: " + newinet.substring(slash + 1)); - } - if (netmask <= 0 || netmask > 32) - throw new Exception("netmask must be >0 and <32"); - tinet = newinet.substring(0, slash); - } - // check dotted quad - String quads[] = tinet.split("\\."); - if (quads.length != 4) - throw new Exception("expected dotted quad (xxx.xxx.xxx.xxx)"); - for (int i = 0; i < 4; i++) { - int quadv; - try { - quadv = Integer.parseInt(quads[i]); - } catch (NumberFormatException nfe) { - throw new Exception("cannot parse number: " + quads[i]); - } - if (quadv < 0 || quadv > 255) - throw new Exception("value must be between 0 and 255: " + quads[i]); - } - // everything is fine - inet = newinet; - } - - public String getAddress() { - if (inet == null) - return null; - - // inet optionally has a /y part, if y < 32, chop it off - int slash = inet.indexOf('/'); - if (slash != -1) - return inet.substring(0, slash); - return inet; - } - - public void setAddress(String newinet) throws Exception { - if (newinet == null) { - inet = null; - return; - } - if (newinet.indexOf('/') != -1) - throw new Exception("IPv4 address cannot contain '/' (use fromString() instead)"); - fromString(newinet); - } - - public int getNetmaskBits() throws SQLException { - if (inet == null) - return 0; - - // if netmask is 32, it is omitted in the output - int slash = inet.indexOf('/'); - if (slash == -1) - return 32; - try { - return Integer.parseInt(inet.substring(slash + 1)); - } catch (NumberFormatException nfe) { - throw new SQLException("cannot parse netmask bits: " + inet.substring(slash + 1), "M0M27"); - } - } - - public void setNetmaskBits(int bits) throws Exception { - String newinet = inet; - if (newinet == null) { - newinet = "0.0.0.0/" + bits; - } else { - int slash = newinet.indexOf('/'); - if (slash != -1) { - newinet = newinet.substring(0, slash + 1) + bits; - } else { - newinet = newinet + "/" + bits; - } - } - fromString(newinet); - } - - public InetAddress getInetAddress() throws SQLException { - if (inet == null) - return null; - - try { - return InetAddress.getByName(getAddress()); - } catch (UnknownHostException uhe) { - throw new SQLException("could not resolve IP address", "M0M27"); - } - } - - public void setInetAddress(InetAddress iaddr) throws Exception { - if (!(iaddr instanceof Inet4Address)) - throw new Exception("only IPv4 are supported currently"); - fromString(iaddr.getHostAddress()); - } -}
deleted file mode 100644 --- a/src/main/java/nl/cwi/monetdb/jdbc/types/MonetURL.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. - */ - -package nl.cwi.monetdb.jdbc.types; - -import java.sql.*; -import java.net.*; - -/** - * The URL class represents the URL datatype in MonetDB. It - * represents an URL, that is, a well-formed string conforming to - * RFC2396. - */ -public class MonetURL implements SQLData { - - private String url; - - @Override - public String getSQLTypeName() { - return "url"; - } - - @Override - public void readSQL(SQLInput stream, String typeName) throws SQLException { - if (typeName.compareTo("url") != 0) - throw new SQLException("can only use this class with 'url' type", "M1M05"); - url = stream.readString(); - } - - @Override - public void writeSQL(SQLOutput stream) throws SQLException { - stream.writeString(url); - } - - @Override - public String toString() { - return url; - } - - public void fromString(String newurl) throws Exception { - if (newurl == null) { - url = null; - return; - } - new java.net.URL(newurl); - // if above doesn't fail (throws an Exception), it is fine - url = newurl; - } - - public java.net.URL getURL() throws SQLException { - if (url == null) - return null; - - try { - return new java.net.URL(url); - } catch (MalformedURLException mue) { - throw new SQLException("data is not a valid URL", "M0M27"); - } - } - - public void setURL(java.net.URL nurl) throws Exception { - url = nurl.toString(); - } -}
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/ControlCommands.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/ControlCommands.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection;
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/IMonetDBLanguage.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/IMonetDBLanguage.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection;
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/MCLException.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/MCLException.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection;
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/SenderThread.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/SenderThread.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection;
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/helpers/BufferReallocator.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/helpers/BufferReallocator.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection.helpers;
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/helpers/ChannelSecurity.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/helpers/ChannelSecurity.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection.helpers;
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/helpers/GregorianCalendarParser.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/helpers/GregorianCalendarParser.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection.helpers;
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/mapi/AbstractSocket.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/mapi/AbstractSocket.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection.mapi;
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/mapi/MapiConnection.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/mapi/MapiConnection.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection.mapi;
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/mapi/MapiLanguage.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/mapi/MapiLanguage.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection.mapi;
--- a/src/main/java/nl/cwi/monetdb/mcl/connection/mapi/OldMapiSocket.java +++ b/src/main/java/nl/cwi/monetdb/mcl/connection/mapi/OldMapiSocket.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.connection.mapi;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/AbstractProtocol.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/AbstractProtocol.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/ProtocolException.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/ProtocolException.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/ServerResponses.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/ServerResponses.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/StarterHeaders.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/StarterHeaders.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/TableResultHeaders.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/TableResultHeaders.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/newmapi/NewMapiProtocol.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/newmapi/NewMapiProtocol.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol.newmapi;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiProtocol.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiProtocol.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol.oldmapi;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiServerResponseParser.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiServerResponseParser.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol.oldmapi;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiStartOfHeaderParser.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiStartOfHeaderParser.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol.oldmapi;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTableHeaderParser.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTableHeaderParser.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol.oldmapi;
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTupleLineParser.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTupleLineParser.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol.oldmapi;
--- a/src/main/java/nl/cwi/monetdb/mcl/responses/AutoCommitResponse.java +++ b/src/main/java/nl/cwi/monetdb/mcl/responses/AutoCommitResponse.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.responses;
--- a/src/main/java/nl/cwi/monetdb/mcl/responses/DataBlockResponse.java +++ b/src/main/java/nl/cwi/monetdb/mcl/responses/DataBlockResponse.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.responses; @@ -48,9 +48,11 @@ public class DataBlockResponse implement /** The JdbcSQLTypes mapping */ private final int[] jdbcSQLTypes; /** A mapping of null values of the current Row */ - private boolean[][] nullMappings; + private boolean[][] nullMappings;// /** A 'pointer' to the current line */ private int blockLine; + /** The number of rows in the block */ + private final int rowcount; /** * Constructs a DataBlockResponse object. @@ -60,8 +62,9 @@ public class DataBlockResponse implement */ DataBlockResponse(int rowcount, int columncount, AbstractProtocol protocol, int[] JdbcSQLTypes) { this.pos = -1; + this.rowcount = rowcount; this.data = new Object[columncount]; - this.nullMappings = new boolean[rowcount][columncount]; + this.nullMappings = new boolean[columncount][rowcount]; this.protocol = protocol; this.jdbcSQLTypes = JdbcSQLTypes; } @@ -81,54 +84,54 @@ public class DataBlockResponse implement } if(this.pos == -1) { //if it's the first line, initialize the matrix - int numberOfColumns = this.data.length, numberOfRows = this.nullMappings.length; + int numberOfColumns = this.data.length; for (int i = 0 ; i < numberOfColumns ; i++) { switch (this.jdbcSQLTypes[i]) { case Types.BOOLEAN: - this.data[i] = new boolean[numberOfRows]; + this.data[i] = new boolean[this.rowcount]; break; case Types.TINYINT: - this.data[i] = new byte[numberOfRows]; + this.data[i] = new byte[this.rowcount]; break; case Types.SMALLINT: - this.data[i] = new short[numberOfRows]; + this.data[i] = new short[this.rowcount]; break; case Types.INTEGER: - this.data[i] = new int[numberOfRows]; + this.data[i] = new int[this.rowcount]; break; case Types.BIGINT: - this.data[i] = new long[numberOfRows]; + this.data[i] = new long[this.rowcount]; break; case Types.REAL: - this.data[i] = new float[numberOfRows]; + this.data[i] = new float[this.rowcount]; break; case Types.DOUBLE: - this.data[i] = new double[numberOfRows]; + this.data[i] = new double[this.rowcount]; break; case Types.DECIMAL: - this.data[i] = new BigDecimal[numberOfRows]; + this.data[i] = new BigDecimal[this.rowcount]; break; case Types.NUMERIC: - this.data[i] = new BigInteger[numberOfRows]; + this.data[i] = new BigInteger[this.rowcount]; break; case Types.BLOB: - this.data[i] = new MonetBlob[numberOfRows]; + this.data[i] = new MonetBlob[this.rowcount]; break; case Types.CLOB: - this.data[i] = new MonetClob[numberOfRows]; + this.data[i] = new MonetClob[this.rowcount]; break; case Types.TIME: case Types.TIME_WITH_TIMEZONE: case Types.DATE: case Types.TIMESTAMP: case Types.TIMESTAMP_WITH_TIMEZONE: - this.data[i] = new Calendar[numberOfRows]; + this.data[i] = new Calendar[this.rowcount]; break; case Types.LONGVARBINARY: - this.data[i] = new byte[numberOfRows][]; + this.data[i] = new byte[this.rowcount][]; break; default: //CHAR, VARCHAR, OTHER - this.data[i] = new String[numberOfRows]; + this.data[i] = new String[this.rowcount]; } } } @@ -146,7 +149,7 @@ public class DataBlockResponse implement @Override public boolean wantsMore() { // remember: pos is the value already stored - return (this.pos + 1) < this.nullMappings.length; + return (this.pos + 1) < this.rowcount; } /** @@ -179,7 +182,7 @@ public class DataBlockResponse implement } public boolean checkValueIsNull(int column) { - return this.nullMappings[this.blockLine][column]; + return this.nullMappings[column][this.blockLine]; } public boolean getBooleanValue(int column) {
--- a/src/main/java/nl/cwi/monetdb/mcl/responses/IIncompleteResponse.java +++ b/src/main/java/nl/cwi/monetdb/mcl/responses/IIncompleteResponse.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.responses;
--- a/src/main/java/nl/cwi/monetdb/mcl/responses/IResponse.java +++ b/src/main/java/nl/cwi/monetdb/mcl/responses/IResponse.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.responses;
--- a/src/main/java/nl/cwi/monetdb/mcl/responses/ResultSetResponse.java +++ b/src/main/java/nl/cwi/monetdb/mcl/responses/ResultSetResponse.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.responses;
--- a/src/main/java/nl/cwi/monetdb/mcl/responses/SchemaResponse.java +++ b/src/main/java/nl/cwi/monetdb/mcl/responses/SchemaResponse.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.responses;
--- a/src/main/java/nl/cwi/monetdb/mcl/responses/UpdateResponse.java +++ b/src/main/java/nl/cwi/monetdb/mcl/responses/UpdateResponse.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.responses;
--- a/src/main/java/nl/cwi/monetdb/merovingian/Control.java +++ b/src/main/java/nl/cwi/monetdb/merovingian/Control.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.merovingian;
--- a/src/main/java/nl/cwi/monetdb/merovingian/MerovingianException.java +++ b/src/main/java/nl/cwi/monetdb/merovingian/MerovingianException.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.merovingian;
--- a/src/main/java/nl/cwi/monetdb/merovingian/SabaothDB.java +++ b/src/main/java/nl/cwi/monetdb/merovingian/SabaothDB.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.merovingian;
--- a/src/main/java/nl/cwi/monetdb/util/CmdLineOpts.java +++ b/src/main/java/nl/cwi/monetdb/util/CmdLineOpts.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.util;
--- a/src/main/java/nl/cwi/monetdb/util/Exporter.java +++ b/src/main/java/nl/cwi/monetdb/util/Exporter.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.util;
--- a/src/main/java/nl/cwi/monetdb/util/Extract.java +++ b/src/main/java/nl/cwi/monetdb/util/Extract.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.util;
--- a/src/main/java/nl/cwi/monetdb/util/OptionsException.java +++ b/src/main/java/nl/cwi/monetdb/util/OptionsException.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.util;
--- a/src/main/java/nl/cwi/monetdb/util/SQLExporter.java +++ b/src/main/java/nl/cwi/monetdb/util/SQLExporter.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.util;
--- a/src/main/java/nl/cwi/monetdb/util/SQLRestore.java +++ b/src/main/java/nl/cwi/monetdb/util/SQLRestore.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.util;
--- a/src/main/java/nl/cwi/monetdb/util/XMLExporter.java +++ b/src/main/java/nl/cwi/monetdb/util/XMLExporter.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.util;
--- a/tests/BugConcurrent_clients_SF_1504657.java +++ b/tests/BugConcurrent_clients_SF_1504657.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/BugConcurrent_sequences.java +++ b/tests/BugConcurrent_sequences.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/BugDatabaseMetaData_Bug_3356.java +++ b/tests/BugDatabaseMetaData_Bug_3356.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/BugDecimalRound_Bug_3561.java +++ b/tests/BugDecimalRound_Bug_3561.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/BugExecuteUpdate_Bug_3350.java +++ b/tests/BugExecuteUpdate_Bug_3350.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/BugSetQueryTimeout_Bug_3357.java +++ b/tests/BugSetQueryTimeout_Bug_3357.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Cautocommit.java +++ b/tests/Test_Cautocommit.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Cforkbomb.java +++ b/tests/Test_Cforkbomb.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_CisValid.java +++ b/tests/Test_CisValid.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Clargequery.java +++ b/tests/Test_Clargequery.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Cmanycon.java +++ b/tests/Test_Cmanycon.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Creplysize.java +++ b/tests/Test_Creplysize.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Csavepoints.java +++ b/tests/Test_Csavepoints.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Csendthread.java +++ b/tests/Test_Csendthread.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Ctransaction.java +++ b/tests/Test_Ctransaction.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Dobjects.java +++ b/tests/Test_Dobjects.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_FetchSize.java +++ b/tests/Test_FetchSize.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Int128.java +++ b/tests/Test_Int128.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.math.BigDecimal;
--- a/tests/Test_PSgeneratedkeys.java +++ b/tests/Test_PSgeneratedkeys.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_PSgetObject.java +++ b/tests/Test_PSgetObject.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_PSlargeamount.java +++ b/tests/Test_PSlargeamount.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_PSlargebatchval.java +++ b/tests/Test_PSlargebatchval.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_PSlargeresponse.java +++ b/tests/Test_PSlargeresponse.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_PSmanycon.java +++ b/tests/Test_PSmanycon.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_PSmetadata.java +++ b/tests/Test_PSmetadata.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_PSsomeamount.java +++ b/tests/Test_PSsomeamount.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_PSsqldata.java +++ b/tests/Test_PSsqldata.java @@ -3,11 +3,13 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ +import java.net.URL; import java.sql.*; -import nl.cwi.monetdb.jdbc.types.*; + +import nl.cwi.monetdb.jdbc.MonetINET; public class Test_PSsqldata { public static void main(String[] args) throws Exception { @@ -37,11 +39,8 @@ public class Test_PSsqldata { System.out.println("\tclassname " + pmd.getParameterClassName(col)); } - MonetINET tinet = new MonetINET(); - MonetURL turl = new MonetURL(); - - tinet.fromString("172.5.5.5/24"); - turl.fromString("http://www.monetdb.org/"); + MonetINET tinet = new MonetINET("172.5.5.5/24"); + URL turl = new URL("http://www.monetdb.org/"); pstmt.setObject(1, tinet); pstmt.setObject(2, turl); pstmt.execute(); @@ -63,9 +62,9 @@ public class Test_PSsqldata { MonetINET inet = (MonetINET)x; System.out.println("\t" + inet.getAddress() + "/" + inet.getNetmaskBits()); System.out.println("\t" + inet.getInetAddress().toString()); - } else if (x instanceof MonetURL) { - MonetURL url = (MonetURL)x; - System.out.println("\t" + url.getURL().toString()); + } else if (x instanceof URL) { + URL url = (URL)x; + System.out.println("\t" + url.toString()); } } }
--- a/tests/Test_PStimedate.java +++ b/tests/Test_PStimedate.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_PStimezone.java +++ b/tests/Test_PStimezone.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_PStypes.java +++ b/tests/Test_PStypes.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Rbooleans.java +++ b/tests/Test_Rbooleans.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Rmetadata.java +++ b/tests/Test_Rmetadata.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Rpositioning.java +++ b/tests/Test_Rpositioning.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Rsqldata.java +++ b/tests/Test_Rsqldata.java @@ -3,11 +3,13 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ +import java.net.URL; import java.sql.*; -import nl.cwi.monetdb.jdbc.types.*; + +import nl.cwi.monetdb.jdbc.MonetINET; public class Test_Rsqldata { public static void main(String[] args) throws Exception { @@ -55,9 +57,9 @@ public class Test_Rsqldata { MonetINET inet = (MonetINET)x; System.out.println("\t" + inet.getAddress() + "/" + inet.getNetmaskBits()); System.out.println("\t" + inet.getInetAddress().toString()); - } else if (x instanceof MonetURL) { - MonetURL url = (MonetURL)x; - System.out.println("\t" + url.getURL().toString()); + } else if (x instanceof URL) { + URL url = (URL)x; + System.out.println("\t" + url.toString()); } } }
--- a/tests/Test_Rtimedate.java +++ b/tests/Test_Rtimedate.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Sbatching.java +++ b/tests/Test_Sbatching.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Smoreresults.java +++ b/tests/Test_Smoreresults.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/Test_Wrapper.java +++ b/tests/Test_Wrapper.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ import java.sql.*;
--- a/tests/build.xml +++ b/tests/build.xml @@ -5,7 +5,7 @@ This Source Code Form is subject to the License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. +Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. --> <!--
--- a/tests/drop.sql +++ b/tests/drop.sql @@ -2,7 +2,7 @@ -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. drop table "foreign"; drop table allnewtriples;
--- a/version.sh +++ b/version.sh @@ -4,7 +4,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. +# Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. if [[ -z $1 ]] ; then echo "Usage: $0 [-w] <(jdbc|mcl)> <(major|minor|suffix)=newversion> [...]"