summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo
diff options
context:
space:
mode:
authorSandeep Ravindra <srravin@amazon.com>2018-01-04 16:47:22 +0530
committerJesse Morgan <morganjm@amazon.com>2018-01-04 12:20:56 -0800
commit88d28b627c5e365584a6d513f0bdc84d9edffb29 (patch)
tree582b75918e8b7bb200df0f1349c9549b907d2c35 /src/main/java/com/amazon/carbonado/repo
parent6ea9896550f4c7718ec5ccc1f092a7059956b6ea (diff)
Adding default sequence select statement for PostgreSQL to pickup native sequencesHEADmaster
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/jdbc/PostgresqlSupportStrategy.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/PostgresqlSupportStrategy.java b/src/main/java/com/amazon/carbonado/repo/jdbc/PostgresqlSupportStrategy.java
index fffa5cf..43623be 100644
--- a/src/main/java/com/amazon/carbonado/repo/jdbc/PostgresqlSupportStrategy.java
+++ b/src/main/java/com/amazon/carbonado/repo/jdbc/PostgresqlSupportStrategy.java
@@ -25,11 +25,16 @@ package com.amazon.carbonado.repo.jdbc;
* @since 1.2
*/
class PostgresqlSupportStrategy extends JDBCSupportStrategy {
+
private static final String TRUNCATE_STATEMENT = "TRUNCATE TABLE %s";
+ private static final String DEFAULT_SEQUENCE_SELECT_STATEMENT = "SELECT NEXTVAL('%s')";
+
protected PostgresqlSupportStrategy(JDBCRepository repo) {
super(repo);
+ setSequenceSelectStatement(DEFAULT_SEQUENCE_SELECT_STATEMENT);
+
setTruncateTableStatement(TRUNCATE_STATEMENT);
}