pelenthium / clickhouse-dialect-spring-boot-starter

Clickhouse dialect to Spring JDBC
Apache License 2.0
27 stars 1 forks source link

Lock not supported in Clickhouse exception #8

Closed alexsarrell closed 1 year ago

alexsarrell commented 1 year ago

Hello! Im trying to create simple CrudRepository and store entities in it, but getting UnsupportedOperationException "Lock not supported in Clickhouse" from the ClickhouseDialect.java

Can i use Repository implementations to store data with this dialect? Or should I disable locking somehow? Thanks for help

pelenthium commented 1 year ago

Hi @alexsarrell, it's because Clickhouse doesn't support a locking mechanism at all, updating queries with different syntax of standart (using ALTER TABLE) so updating data in this database is not a good idea, so using CrudRepository is useless.

But as I see LockCause is used to build query strings by Spring data, so I agree to not throw an exception in this method, I will push a new version soon

pelenthium commented 1 year ago

fixed in 1.2.0 version