comparison src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @ 199:e87d89d371f1

Make some public non-JDBC methods accessable only to classes of the same package. Improve robustness of the connect() method by checking on null of input argument.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 14 Dec 2017 18:07:59 +0100 (2017-12-14)
parents 1296dbcc4958
children c38d4eaf5479
comparison
equal deleted inserted replaced
198:376a15ce49e3 199:e87d89d371f1
1643 1643
1644 /** 1644 /**
1645 * @return the MonetDB JDBC Connection URL (without user name and password). 1645 * @return the MonetDB JDBC Connection URL (without user name and password).
1646 * Defined as public because it is called from: MonetDatabaseMetaData.java getURL() 1646 * Defined as public because it is called from: MonetDatabaseMetaData.java getURL()
1647 */ 1647 */
1648 public String getJDBCURL() { 1648 String getJDBCURL() {
1649 String language = ""; 1649 String language = "";
1650 if (lang == LANG_MAL) 1650 if (lang == LANG_MAL)
1651 language = "?language=mal"; 1651 language = "?language=mal";
1652 return "jdbc:monetdb://" + hostname + ":" + port + "/" + database + language; 1652 return MonetDriver.MONETURL + hostname + ":" + port + "/" + database + language;
1653 } 1653 }
1654 1654
1655 /** 1655 /**
1656 * @return whether the JDBC BLOB type should be mapped to VARBINARY type. 1656 * @return whether the JDBC BLOB type should be mapped to VARBINARY type.
1657 * This allows generic JDBC programs to fetch Blob data via getBytes() 1657 * This allows generic JDBC programs to fetch Blob data via getBytes()
1658 * instead of getBlob() and Blob.getBinaryStream() to reduce overhead. 1658 * instead of getBlob() and Blob.getBinaryStream() to reduce overhead.
1659 */ 1659 */
1660 public boolean mapBlobAsVarBinary() { 1660 boolean mapBlobAsVarBinary() {
1661 return treatBlobAsVarBinary; 1661 return treatBlobAsVarBinary;
1662 } 1662 }
1663 1663
1664 /** 1664 /**
1665 * @return whether the JDBC CLOB type should be mapped to VARCHAR type. 1665 * @return whether the JDBC CLOB type should be mapped to VARCHAR type.
1666 * This allows generic JDBC programs to fetch Clob data via getString() 1666 * This allows generic JDBC programs to fetch Clob data via getString()
1667 * instead of getClob() and Clob.getCharacterStream() to reduce overhead. 1667 * instead of getClob() and Clob.getCharacterStream() to reduce overhead.
1668 */ 1668 */
1669 public boolean mapClobAsVarChar() { 1669 boolean mapClobAsVarChar() {
1670 return treatClobAsVarChar; 1670 return treatClobAsVarChar;
1671 } 1671 }
1672 1672
1673 /** 1673 /**
1674 * Sends the given string to MonetDB as special transaction command. 1674 * Sends the given string to MonetDB as special transaction command.