[JDBC/MariaDB] Persistence of only actual state?

mysql
jdbc
mariadb
Tags: #<Tag:0x00007f0147eb7c70> #<Tag:0x00007f0147eb79c8> #<Tag:0x00007f0147eb7748>

(Florian) #1

Hi,

I’m using mariadb as persistence unit via jdbc.
Now every change of an item state gets stored as new row in the item’s database table.
Is there an easy way to store only the actual state of an item in the item’s sql table?

Thanks, Florian


(Angelos) #2

I doubt it since there is no config option that would limit this: https://www.openhab.org/addons/persistence/jdbc/#configuration

If you only want the current state to be persisted you can use mapDB (this is what it does) https://www.openhab.org/addons/persistence/mapdb/