Commit Graph

135 Commits

Author SHA1 Message Date
J-N-K
5f8214f08a
Adapt to core changes (addon.xml) (#13289)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-15 20:31:42 +01:00
Jacob Laursen
4dd6d3a8a2
Update license headers to 2023 (#14154)
* Update copyright year in configuration
* Update license headers

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-01-06 09:49:54 +01:00
Jacob Laursen
0b59be62b6
Skip loading/migrating items with invalid name (#14054)
Fixes #14053

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-27 11:41:59 +01:00
Jacob Laursen
127f998a69
Upgrade MySQL Connector/J to 8.0.31 (#13991)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-19 23:49:51 +01:00
J-N-K
4d6d6443ef
fix spotless after release (#14014)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 15:22:17 +01:00
openhab-bot
7993786dc9 [unleash-maven-plugin] Preparation for next development cycle. 2022-12-19 00:55:11 +00:00
Kai Takac
36137992a5
[jdbc] Update org.xerial/sqlite-jdbc to 3.40.0.0 (#14003)
* [jdbc] Update org.xerial/sqlite-jdbc to 3.40.0.0

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Kai Takac <kai.takac@gmail.com>
2022-12-18 19:04:43 +01:00
Jacob Laursen
a3fccc6390
Fix console command 'tables clean' (#13916)
NullPointerException was thrown because index table was not provided

Fixes #13911

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-11 22:47:37 +01:00
Jacob Laursen
dd8b7c8b65
[jdbc] Fix date filter to be inclusive (Derby) (#13850)
Fixes #9906

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-05 17:09:13 +01:00
Jacob Laursen
a0ac57cfd9
Fix date filter to be inclusive (PostgreSQL) (#13843)
Fixes #9906

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-05 00:27:54 +01:00
Jacob Laursen
312b4e2faf
Fix console command 'tables' for SQLite (#13837)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-04 14:54:12 +01:00
Jacob Laursen
e979be4911
Fix Derby/H2/HSQLDB/SQLite queries for storing timestamps (#13817)
Fixes #13816

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-02 08:14:23 +01:00
dependabot[bot]
9cc3cd0cf9
[jdbc] Update PostgreSQL JDBC driver to 42.4.3 (#13770)
* Bump postgresql in /bundles/org.openhab.persistence.jdbc

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.4.1 to 42.4.3.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.4.1...REL42.4.3)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-01 22:32:55 +01:00
Jacob Laursen
3912487305
[jdbc] Add safety valve for suspicious migrations (#13797)
* Abort migration from real names when most tables have table name prefix
* Add missing checks for database connection from console commands
* Add additional documentation for check/fix schema

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-28 23:38:55 +01:00
Jacob Laursen
22ea587d20
[jdbc] Add console command for checking/repairing schema integrity (#13765)
* Add console command for checking schema integrity
* Remove unneeded logging
* Add console command for fixing schema integrity
* Provide documentation
* Try to add support for Derby and PostgreSQL
* Sort alphabetically by item name

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-27 19:02:43 +01:00
Jacob Laursen
f9aa20e488
[jdbc] Fix date filter to be inclusive (#13734)
Fixes #9906

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-22 07:13:45 +01:00
Jacob Laursen
d3348327a9
Fix PostgreSQL query for storing timestamps (#13745)
Fixes #13121

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-19 20:57:51 +01:00
Jacob Laursen
d075f141d7
Make itemsManageTable configurable (#13737)
Fixes #9637

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-18 17:34:10 +01:00
Jacob Laursen
b6f9f6339e
[jdbc] Add warning about using tableCaseSensitiveItemNames without dedicated schema (#13732)
* Add warning about using tableCaseSensitiveItemNames without dedicated schema
* Move warning to extended description
* Rephrase explanation
* Fix commands

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-17 20:05:10 +01:00
Jacob Laursen
dbf2358280
Do not modify index or create tables when uninitialized (#13728)
Fixes #13727

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-17 20:00:31 +01:00
Jacob Laursen
2f786b87b4
Add console command for reloading index/schema (#13733)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-17 19:52:54 +01:00
Jacob Laursen
3ef974df17
Fix NoSuchElementException when there are no tables (#13731)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-17 00:58:14 +01:00
Jacob Laursen
0873dd3ddf
[jdbc] Improve error handling safety (#13726)
* Wrap YankSQLException into checked exception for all Yank calls

* Move files into internal

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-16 09:28:46 +01:00
Jacob Laursen
7eb2c9fb81
[jdbc] Improve error handling (#13719)
* Enable wrapped exceptions being thrown by Yank

Fixes #13718

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Fix SAT warning about hashCode implementation

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-15 08:44:12 +01:00
Jacob Laursen
159054a99c
[jdbc] Add console maintenance commands (#13662)
* Add console command for listing tables
* Query row counts only when needed and while generating output
* Add cleanup command
* Add documentation

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-12 12:30:53 +01:00
openhab-bot
62899e0fa5
New translations jdbc.properties (German) (#13697) 2022-11-11 22:36:39 +01:00
Jacob Laursen
64791b386c
[jdbc] Upgrade MariaDB connector to 3.0.8 (#13659)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-09 23:01:15 +01:00
openhab-bot
a8f671960d
New translations jdbc.properties (German) (#13686) 2022-11-09 10:52:30 +01:00
openhab-bot
cdff5a06e7
New translations jdbc.properties (German) (#13678) 2022-11-08 11:07:37 +01:00
Jacob Laursen
2c30756fdd
[jdbc] Fix MySQL deprecation notice on startup (#13660)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-05 20:27:38 +01:00
Jacob Laursen
70abb5d1f6
[jdbc] Add support for case sensitive table names reflecting item names 1:1 (#13544)
* Do not append number when using real item names
* Extract getTableName to separate class
* Add initial test coverage
* Extract migration logic to separate class
* Support migration from real names back to numbered
* Simplify zero-padding
* Fix NullPointerException
* Fix MySQL compatibility when CLIENT_MULTI_STATEMENTS option is not set
* Add option for case sensitive table names
* Add real name with suffix mode for backwards compatibility
* Remove real name in lower case without suffix mode
* Map directly from item name to table name
* Fix ambiguous table name scenario
* Add additional testcase
* Add migration path for changed table prefix
* Drop items table when using direct mapping
* Add configuration note
* Fix table alignment
* Extend description as more migration paths are now supported
* Do not stop halfway through a migration
* For clarity, do not use abbreviation for operating system

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-05 10:41:31 +01:00
dependabot[bot]
97956d30e9
[jdbc] Upgrade derby from 10.12.1.1 to 10.14.2.0 (#13038)
* Use derby instead of derbyclient, fix bnd optional package imports
* Update versions add dynamic package import for custom JDBC drivers
* Prevent redundant null check warnings

Signed-off-by: Wouter Born <github@maindrain.net>
2022-10-11 21:54:19 +02:00
Jacob Laursen
12389f083d
Consolidate and optimize datetime conversions (#13483)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-10-04 08:59:59 +02:00
Jacob Laursen
c706ac8478
[jdbc] Fix warnings and apply null annotations (#13429)
* Fix warnings and apply null annotations

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-10-02 11:14:41 +02:00
Jacob Laursen
3e5dde0474
Fix ClassCastException for LocalDateTime (#13425)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-09-21 19:10:02 +02:00
Jacob Laursen
474be93710
Fix date cast exception (#13382)
After upgrading mysql-connector to 8.0.30 this exception was thrown: class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-09-12 18:16:25 +02:00
Jacob Laursen
dddf463e09
Upgrade MySQL connector to 8.0.30 (#13242)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-08-31 21:56:39 +02:00
dependabot[bot]
4bf7a4a51e
[jdbc] Update PostgreSQL JDBC driver to 42.4.1 (#13221)
Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

Also-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-08-10 10:34:08 +02:00
dependabot[bot]
8a8add71df
Bump mysql-connector-java in /bundles/org.openhab.persistence.jdbc (#12981)
Bumps [mysql-connector-java](https://github.com/mysql/mysql-connector-j) from 8.0.22 to 8.0.28.
- [Release notes](https://github.com/mysql/mysql-connector-j/releases)
- [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.0/CHANGES)
- [Commits](https://github.com/mysql/mysql-connector-j/compare/8.0.22...8.0.28)

---
updated-dependencies:
- dependency-name: mysql:mysql-connector-java
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-30 12:44:40 +02:00
Kai Kreuzer
440f603e88
Apply spotless and resolver (#13027)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-27 16:00:37 +02:00
openhab-bot
ed4858ebbb [unleash-maven-plugin] Preparation for next development cycle. 2022-06-26 18:18:40 +00:00
openhab-bot
598d88648c
New Crowdin updates (#12849)
* New translations boschshc.properties (German)
* New translations jinja.properties (German)
* New translations regex.properties (German)
* New translations jsonpath.properties (German)
* New translations xpath.properties (German)
* New translations dynamodb.properties (German)
* New translations jdbc.properties (German)
* New translations neeo.properties (German)
* New translations fsinternetradio.properties (German)
* New translations sonyaudio.properties (German)
* New translations systeminfo.properties (German)
* New translations wemo.properties (German)
* New translations googlestt.properties (German)
* New translations voicerss.properties (German)
* New translations porcupineks.properties (German)
* New translations watsonstt.properties (German)
* New translations voskstt.properties (German)
* New translations deutschebahn.properties (German)
* New translations dwdunwetter.properties (German)
* New translations shelly.properties (German)
* New translations googletts.properties (German)
* New translations http.properties (Italian)
* New translations evcc.properties (German)
* New translations imperihome.properties (Italian)
* New translations voicerss.properties (German)
* New translations dwdunwetter.properties (German)
2022-06-01 12:11:04 +02:00
Dan Cunningham
5712de5e63
[jdbc] Rework TimescaleDB code to actually work (#12525)
Fixes #12513

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2022-04-02 18:11:32 +02:00
Christoph Weitkamp
9e6b901d53
Fixed parameter ordering while storing values (#12467)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-03-13 12:13:00 +01:00
dependabot[bot]
f28ef254cf
[jdbc] Update PostgreSQL JDBC driver to 42.3.3 (#12442)
* Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 9.4.1212 to 42.3.3.
* Update docs and feature
* Update README

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-07 22:35:20 +01:00
Christoph Weitkamp
187937fbd1
Catch exception in case of connection to database failed during activation of servive (#12313)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-19 21:37:23 +01:00
Christoph Weitkamp
d707420ec5
[jdbc] Fixed ClassCastException for ColorItem / HSBType (#12225)
* Fixed ClassCastException for ColorItem / HSBType

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-06 15:45:03 +01:00
Christoph Weitkamp
67b701b6b4
[jdbc] Removed check if item exists to allow to truncate data for clean-ups (#12052)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-15 17:09:54 +01:00
Christoph Weitkamp
bb2e4c7c65
[jdbc] Implement 'ModifiablePersistenceService' interface (#11922)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-15 14:29:06 +01:00
Hilbrand Bouwkamp
da59cdd255
Update license headers to 2022 (#11973)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2022-01-06 18:14:47 +01:00
Christoph Weitkamp
346fcd068c
Do not create table on 'query', only on 'store' (#11961)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-04 21:26:52 +01:00
Christoph Weitkamp
0988c040a6
Add mime data to restored image (#11962)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-04 16:52:56 +01:00
Christoph Weitkamp
ef46e126b4
[jdbc] Fixed NPE when SQL query failed (#11954)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-04 10:37:04 +01:00
Marcel
0b79d87d9f
Fix pom http://maven.apache.org/xsd/maven-v4_0_0.xsd entries (#11850)
* Fix pom http://maven.apache.org/xsd/maven-v4_0_0.xsd entries
* Fix http://maven.apache.org/maven-v4_0_0.xsd entries in pom.xml

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2021-12-24 11:36:42 +01:00
Kai Kreuzer
48746f5e3f Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 09:07:55 +01:00
openhab-bot
6dc031e6cf [unleash-maven-plugin] Preparation for next development cycle. 2021-12-20 00:30:46 +00:00
Wouter Born
e7849c0060
Add default translations for persistence add-ons (#11754)
This makes the texts used by these add-ons translatable with Crowdin.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-11 18:02:00 +01:00
nimric
ba3dfe3ed6
[jdbc] Add support for TimescaleDB (#11090) (#11091)
Signed-off-by: Riccardo Nimser-Joseph <github@nimric.de>

Co-authored-by: Riccardo Nimser-Joseph <github@nimric.de>
2021-12-11 17:50:40 +01:00
Wouter Born
589400e223
Fix/suppress PMD CompareObjectsWithEquals findings (#11476)
Newer PMD versions discover more CompareObjectsWithEquals findings.

Related to https://github.com/openhab/static-code-analysis/pull/423

Signed-off-by: Wouter Born <github@maindrain.net>
2021-11-02 10:43:53 +01:00
nimric
cf6729adef
[jdbc] Select the proper schema when retrieving the item tables (#11023)
Signed-off-by: Riccardo Nimser-Joseph <github@nimric.de>
2021-07-24 21:29:15 +02:00
Kai Kreuzer
bebab9ce29 applied spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:25:35 +02:00
jenkins
8c5c81e256 [unleash-maven-plugin] Preparation for next development cycle. 2021-06-27 17:35:01 +00:00
Jerome Luckenbach
10f88c0934
Fix http -> https where applyable. (#10573)
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
2021-04-24 20:39:51 +02:00
Christoph Weitkamp
0c390ab9c9
[jdbc] Increased size of column type for Location Item (#10542)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-24 12:39:05 +02:00
Christoph Weitkamp
7a22d65406
Added missing config parameters for sqltypes of IMAGE an PLAYER item types (#10524)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-15 17:51:35 +02:00
Christoph Weitkamp
e24d43aecb
Use TypeParser to get matching Item State (#10501)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-14 23:35:16 +02:00
Wouter Born
6e1119a49a
Fix broken configfile GAV with karaf:kar (#10391)
The groupId variable results in the wrong configfile GAV when building a single KAR with karaf:kar for an add-on.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-26 08:50:31 +01:00
Christoph Weitkamp
37bc57f856
Do not define bundel related versions in OH feature file (#9904)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-22 13:24:28 +01:00
Christoph Weitkamp
04d87f33db
[jdbc] Bump mysql-connector-java to version 8.0.22 (#9810)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-13 23:03:56 +01:00
Christoph Weitkamp
9394dc4676
[jdbc] Return QuantityTypes for number items with dimension (#9426)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-03 17:34:53 +01:00
Wouter Born
d6364aceb1
Update license headers to 2021 (#9620)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-02 22:03:14 +01:00
Christoph Weitkamp
133df3aa40
[jdbc] Consider local timezone to create time filter (#9445)
* Consider local timezone to create time filter
* Use user-defined timeZone

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-23 17:19:08 -08:00
Wouter Born
ecac667258
Apply Spotless, update skeleton project version, resolve itest runbundles (#9459)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-22 10:37:44 +01:00
jenkins
e4554f4aa6 [unleash-maven-plugin] Preparation for next development cycle. 2020-12-21 10:36:42 +00:00
Christoph Weitkamp
42de762b43
[jdbc] Reduce size for VARCHAR columns (#9394)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-15 22:36:35 -08:00
Mark Hilbush
7451df9865
[jdbc] Add missing item types Player and Image (#9334)
- Add missing item types Player and Image

Closes #2819 

Signed-off-by: Mark Hilbush <mark@hilbush.com>
2020-12-12 08:51:12 +01:00
Wouter Born
c755e85281
Fix missing feature configfiles (#9324)
* Update configfile lines for renamed openhab-addons-external artifactId
* Add missing 2.5.x configfiles files which were never merged into the main branch
* Fix configfile lines not aggregated in feature.xml file

Fixes openhab/openhab-distro#1205

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-11 14:34:44 +01:00
Christoph Weitkamp
7e9b27ec41
[jdbc] Fixed ClassCastException (#9296)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-09 11:52:04 -08:00
Christoph Weitkamp
64b15bcc48
Added OSGi configurable service declarations (#9132)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-11-25 22:16:10 +01:00
Wouter Born
b423f93b1f
Remove Map null annotation workarounds (#8916)
These workarounds to prevent false positives can be removed now the EEAs allow for proper null analysis.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-04 13:57:24 +01:00
Christoph Weitkamp
9992a67990
Fixed ClassCastException; Update mariadb-java-client to version 1.4.6 (#8883)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-28 00:30:43 +01:00
Christoph Weitkamp
ab011242ad
Use 'everyChange' as default strategy for JDBC persistence (#8841)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-24 22:43:39 +02:00
Kai Kreuzer
5788ad095e
Fixed mvn reference for config files (#8572)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-24 22:45:01 +02:00
Wouter Born
7f39d01a0f
Remove/ignore Eclipse project files (#8529)
Fixes #8451

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-21 22:50:37 +02:00
Kai Kreuzer
bbf1a7fd29 Codebase as of c53e4aed26 as an initial commit for the shrunk repo
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-20 23:57:58 +02:00