Skip to content

Commit

Permalink
Added missing config parameters for sqltypes of IMAGE an PLAYER item …
Browse files Browse the repository at this point in the history
…types (openhab#10524)

Signed-off-by: Christoph Weitkamp <[email protected]>
  • Loading branch information
cweitkamp authored and computergeek1507 committed Jul 13, 2021
1 parent 0b42c0b commit 05bcb42
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,20 +294,28 @@ private void testJDBCDriver(String driver) {
String warn = ""
+ "\n\n\t!!!\n\tTo avoid this error, place an appropriate JDBC driver file for serviceName '{}' in addons directory.\n"
+ "\tCopy missing JDBC-Driver-jar to your openHab/addons Folder.\n\t!!!\n" + "\tDOWNLOAD: \n";
if (serviceName.equals("derby")) {
warn += "\tDerby: version >= 10.11.1.1 from https://mvnrepository.com/artifact/org.apache.derby/derby\n";
} else if (serviceName.equals("h2")) {
warn += "\tH2: version >= 1.4.189 from https://mvnrepository.com/artifact/com.h2database/h2\n";
} else if (serviceName.equals("hsqldb")) {
warn += "\tHSQLDB: version >= 2.3.3 from https://mvnrepository.com/artifact/org.hsqldb/hsqldb\n";
} else if (serviceName.equals("mariadb")) {
warn += "\tMariaDB: version >= 1.2.0 from https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client\n";
} else if (serviceName.equals("mysql")) {
warn += "\tMySQL: version >= 5.1.36 from https://mvnrepository.com/artifact/mysql/mysql-connector-java\n";
} else if (serviceName.equals("postgresql")) {
warn += "\tPostgreSQL:version >= 9.4.1208 from https://mvnrepository.com/artifact/org.postgresql/postgresql\n";
} else if (serviceName.equals("sqlite")) {
warn += "\tSQLite: version >= 3.16.1 from https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc\n";
switch (serviceName) {
case "derby":
warn += "\tDerby: version >= 10.11.1.1 from https://mvnrepository.com/artifact/org.apache.derby/derby\n";
break;
case "h2":
warn += "\tH2: version >= 1.4.189 from https://mvnrepository.com/artifact/com.h2database/h2\n";
break;
case "hsqldb":
warn += "\tHSQLDB: version >= 2.3.3 from https://mvnrepository.com/artifact/org.hsqldb/hsqldb\n";
break;
case "mariadb":
warn += "\tMariaDB: version >= 1.2.0 from https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client\n";
break;
case "mysql":
warn += "\tMySQL: version >= 5.1.36 from https://mvnrepository.com/artifact/mysql/mysql-connector-java\n";
break;
case "postgresql":
warn += "\tPostgreSQL:version >= 9.4.1208 from https://mvnrepository.com/artifact/org.postgresql/postgresql\n";
break;
case "sqlite":
warn += "\tSQLite: version >= 3.16.1 from https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc\n";
break;
}
logger.warn(warn, serviceName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
<label>SqlType DIMMER</label>
<description><![CDATA[Overrides used JDBC/SQL datatype for DIMMER <br>(optional, default: "TINYINT").]]></description>
</parameter>
<parameter name="sqltype.IMAGE" type="text">
<label>SqlType IMAGE</label>
<description><![CDATA[Overrides used JDBC/SQL datatype for IMAGE <br>(optional, default: "VARCHAR(65500)").]]></description>
</parameter>
<parameter name="sqltype.LOCATION" type="text">
<label>SqlType LOCATION</label>
<description><![CDATA[Overrides used JDBC/SQL datatype for LOCATION <br>(optional, default: "VARCHAR(30)").]]></description>
Expand All @@ -111,6 +115,10 @@
<label>SqlType NUMBER</label>
<description><![CDATA[Overrides used JDBC/SQL datatype for NUMBER <br>(optional, default: "DOUBLE").]]></description>
</parameter>
<parameter name="sqltype.PLAYER" type="text">
<label>SqlType PLAYER</label>
<description><![CDATA[Overrides used JDBC/SQL datatype for PLAYER <br>(optional, default: "VARCHAR(20)").]]></description>
</parameter>
<parameter name="sqltype.ROLLERSHUTTER" type="text">
<label>SqlType ROLLERSHUTTER</label>
<description><![CDATA[Overrides used JDBC/SQL datatype for ROLLERSHUTTER <br>(optional, default: "TINYINT").]]></description>
Expand Down

0 comments on commit 05bcb42

Please sign in to comment.