Search in sources :

Example 11 with JdbcSqlTransaction

use of org.jumpmind.db.sql.JdbcSqlTransaction in project symmetric-ds by JumpMind.

the class AseSymmetricDialect method switchCatalogForTriggerInstall.

@Override
protected String switchCatalogForTriggerInstall(String catalog, ISqlTransaction transaction) {
    if (catalog != null) {
        Connection c = ((JdbcSqlTransaction) transaction).getConnection();
        String previousCatalog;
        try {
            previousCatalog = c.getCatalog();
            c.setCatalog(catalog);
            return previousCatalog;
        } catch (SQLException e) {
            throw new SqlException(e);
        }
    } else {
        return null;
    }
}
Also used : SQLException(java.sql.SQLException) Connection(java.sql.Connection) SqlException(org.jumpmind.db.sql.SqlException) JdbcSqlTransaction(org.jumpmind.db.sql.JdbcSqlTransaction)

Aggregations

Connection (java.sql.Connection)11 SQLException (java.sql.SQLException)11 JdbcSqlTransaction (org.jumpmind.db.sql.JdbcSqlTransaction)11 SqlException (org.jumpmind.db.sql.SqlException)4 Statement (java.sql.Statement)3 DatabaseInfo (org.jumpmind.db.platform.DatabaseInfo)2 BulkSqlException (org.jumpmind.db.sql.BulkSqlException)2 AmazonClientException (com.amazonaws.AmazonClientException)1 AmazonServiceException (com.amazonaws.AmazonServiceException)1 BasicAWSCredentials (com.amazonaws.auth.BasicAWSCredentials)1 AmazonS3 (com.amazonaws.services.s3.AmazonS3)1 AmazonS3Client (com.amazonaws.services.s3.AmazonS3Client)1 Timestamp (java.sql.Timestamp)1 ParseException (java.text.ParseException)1 Calendar (java.util.Calendar)1 TimeZone (java.util.TimeZone)1 OracleCallableStatement (oracle.jdbc.internal.OracleCallableStatement)1 ARRAY (oracle.sql.ARRAY)1 ArrayDescriptor (oracle.sql.ArrayDescriptor)1 Datum (oracle.sql.Datum)1