diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-08-02 10:57:25 +0200 |
---|---|---|
committer | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-08-02 15:39:52 +0200 |
commit | 6f92b92458a35c3c88b732dabe4d6242fafe9584 (patch) | |
tree | 02f87aa43a7d9be7a1e4ebf7bc82892d55d973d0 | |
parent | 5292d90f24b7d0f29445c4634dd9219d8d6ea3d7 (diff) |
Tidy up Transaction info in DatabaseMetaData. (firebird-sdbc)
Change-Id: I77af538722e7e512db9bcd48d90f5c98ead379a2
-rw-r--r-- | connectivity/source/drivers/firebird/DatabaseMetaData.cxx | 65 |
1 files changed, 39 insertions, 26 deletions
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index b12c79b0a609..43e4889b7efe 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -408,32 +408,59 @@ sal_Bool SAL_CALL ODatabaseMetaData:: { return sal_True; } -// ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) +//----- Transaction Support -------------------------------------------------- +sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions() + throw(SQLException, RuntimeException) { - return sal_False; + return sal_True; } -// ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) + +sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback() + throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) + +sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit() + throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) + +sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit() + throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException) + +sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback() + throw(SQLException, RuntimeException) { - (void) level; return sal_False; } + +sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions() + throw(SQLException, RuntimeException) +{ + return sal_True; +} + +sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( + sal_Int32 aLevel) + throw(SQLException, RuntimeException) +{ + return aLevel == TransactionIsolation::READ_UNCOMMITTED + || aLevel == TransactionIsolation::READ_COMMITTED + || aLevel == TransactionIsolation::REPEATABLE_READ + || aLevel == TransactionIsolation::SERIALIZABLE; +} + +sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation() + throw(SQLException, RuntimeException) +{ + return TransactionIsolation::REPEATABLE_READ; +} + // ------------------------------------------------------------------------- sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { @@ -461,11 +488,6 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLExc sal_Int32 nValue = 31; // TODO: confirm return nValue; } - -sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) -{ - return sal_True; -} // ------------------------------------------------------------------------- sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { @@ -519,10 +541,6 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLExcep return sal_False; } -sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) -{ - return sal_True; -} // ------------------------------------------------------------------------- sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { @@ -645,11 +663,6 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeExc return 1; } // ------------------------------------------------------------------------- -sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) -{ - return TransactionIsolation::NONE; -} -// ------------------------------------------------------------------------- sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { return 0; |