Skip to content

Commit

Permalink
0001920: Redshift database dialect - fix protocol error in version 9 …
Browse files Browse the repository at this point in the history
…driver
  • Loading branch information
erilong committed Aug 25, 2014
1 parent b405e41 commit 31187c6
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -35,11 +35,19 @@ public class RedshiftDatabasePlatform extends AbstractJdbcDatabasePlatform {
private Map<String, String> sqlScriptReplacementTokens;

public RedshiftDatabasePlatform(DataSource dataSource, SqlTemplateSettings settings) {
super(dataSource, settings);
super(dataSource, overrideSettings(settings));
sqlScriptReplacementTokens = new HashMap<String, String>();
sqlScriptReplacementTokens.put("current_timestamp", "sysdate");
}

protected static SqlTemplateSettings overrideSettings(SqlTemplateSettings settings) {
if (settings == null) {
settings = new SqlTemplateSettings();
}
settings.setQueryTimeout(0);
return settings;
}

@Override
protected RedshiftDdlBuilder createDdlBuilder() {
return new RedshiftDdlBuilder();
Expand Down

0 comments on commit 31187c6

Please sign in to comment.