Skip to content

Commit

Permalink
fix(distributed-lock-jdbc): Removed semicolon from SQL statements for…
Browse files Browse the repository at this point in the history
… PSQL compatibility
  • Loading branch information
alturkovic committed Feb 1, 2023
1 parent 9fa3daa commit 8dc4186
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ You can also create an alias for your lock so you don't have to specify `@Locked

Started tracking the changes since 1.2.0 so no changelogs available for earlier versions.

==== 1.5.1

- BUGFIX: Removed semicolon from SQL statements for PSQL compatibility

==== 1.5.0

- CHANGE: Changed the default SQL table name from `lock` to `distributed_lock` to avoid issues with reserved database keywords
Expand Down
2 changes: 1 addition & 1 deletion distributed-lock-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.github.alturkovic</groupId>
<artifactId>distributed-lock</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
</parent>

<artifactId>distributed-lock-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion distributed-lock-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.github.alturkovic</groupId>
<artifactId>distributed-lock</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
</parent>

<artifactId>distributed-lock-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion distributed-lock-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.github.alturkovic</groupId>
<artifactId>distributed-lock</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
</parent>

<artifactId>distributed-lock-example</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion distributed-lock-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.github.alturkovic</groupId>
<artifactId>distributed-lock</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
</parent>

<artifactId>distributed-lock-jdbc</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
@Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRES_NEW)
public class SimpleJdbcLockSingleKeyService implements JdbcLockSingleKeyService {

public static final String ACQUIRE_FORMATTED_QUERY = "INSERT INTO %s (lock_key, token, expireAt) VALUES (?, ?, ?);";
public static final String RELEASE_FORMATTED_QUERY = "DELETE FROM %s WHERE lock_key = ? AND token = ?;";
public static final String DELETE_EXPIRED_FORMATTED_QUERY = "DELETE FROM %s WHERE expireAt < ?;";
public static final String REFRESH_FORMATTED_QUERY = "UPDATE %s SET expireAt = ? WHERE lock_key = ? AND token = ?;";
public static final String ACQUIRE_FORMATTED_QUERY = "INSERT INTO %s (lock_key, token, expireAt) VALUES (?, ?, ?)";
public static final String RELEASE_FORMATTED_QUERY = "DELETE FROM %s WHERE lock_key = ? AND token = ?";
public static final String DELETE_EXPIRED_FORMATTED_QUERY = "DELETE FROM %s WHERE expireAt < ?";
public static final String REFRESH_FORMATTED_QUERY = "UPDATE %s SET expireAt = ? WHERE lock_key = ? AND token = ?";

private final JdbcTemplate jdbcTemplate;

Expand Down
2 changes: 1 addition & 1 deletion distributed-lock-mongo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.github.alturkovic</groupId>
<artifactId>distributed-lock</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
</parent>

<artifactId>distributed-lock-mongo</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion distributed-lock-redis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.github.alturkovic</groupId>
<artifactId>distributed-lock</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
</parent>

<artifactId>distributed-lock-redis</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.alturkovic</groupId>
<artifactId>distributed-lock</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<packaging>pom</packaging>

<name>distributed-lock</name>
Expand Down

0 comments on commit 8dc4186

Please sign in to comment.