-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/nl/b3p/loader/jdbc/Oracle18JdbcConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package nl.b3p.loader.jdbc; | ||
|
||
import oracle.jdbc.OracleConnection; | ||
|
||
import java.sql.SQLException; | ||
|
||
public class Oracle18JdbcConverter extends Oracle12JdbcConverter { | ||
|
||
public Oracle18JdbcConverter(OracleConnection oc) throws SQLException { | ||
super(oc); | ||
} | ||
|
||
/** | ||
* Gets a statement to use in a prepared statement to restart a sequence. | ||
* This assumes no other interactions are going on with the sequence; | ||
* <em>can only be used to increase the value of the sequence, not decrease.</em> | ||
* | ||
* @param seqName name of sequence | ||
* @return SQL statement specific for the flavour of database | ||
*/ | ||
@Override | ||
public String getUpdateSequenceSQL(String seqName, long nextVal) { | ||
// zie: https://rogertroller.com/2018/02/20/oracle-18c-alter-sequence-restart/ | ||
return String.format("ALTER SEQUENCE %s RESTART START WITH %d",seqName, nextVal); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# evt. override met een local.oracle.properties | ||
dbtype=oracle | ||
staging.jdbc.driverClassName=oracle.jdbc.OracleDriver | ||
staging.jdbc.url=jdbc:oracle:thin:@192.168.1.16:15210:XE | ||
staging.jdbc.url=jdbc:oracle:thin:@192.168.1.26:15210:XE | ||
staging.user=jenkins_staging | ||
staging.passwd=jenkins_staging |