Mercurial > hg > orthanc-databases
diff Framework/PostgreSQL/PostgreSQLTransaction.cpp @ 214:ab96698c73a3
removed useless information about read-only in ITransaction and IPrecompiledStatement
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 25 Mar 2021 13:56:26 +0100 |
parents | 3236894320d6 |
children | fbb52129158a |
line wrap: on
line diff
--- a/Framework/PostgreSQL/PostgreSQLTransaction.cpp Wed Mar 24 15:59:23 2021 +0100 +++ b/Framework/PostgreSQL/PostgreSQLTransaction.cpp Thu Mar 25 13:56:26 2021 +0100 @@ -31,8 +31,7 @@ { PostgreSQLTransaction::PostgreSQLTransaction(PostgreSQLDatabase& database) : database_(database), - isOpen_(false), - readOnly_(true) + isOpen_(false) { Begin(); } @@ -66,7 +65,6 @@ database_.Execute("BEGIN"); database_.Execute("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE"); - readOnly_ = true; isOpen_ = true; } @@ -102,14 +100,7 @@ IResult* PostgreSQLTransaction::Execute(IPrecompiledStatement& statement, const Dictionary& parameters) { - std::unique_ptr<IResult> result(dynamic_cast<PostgreSQLStatement&>(statement).Execute(*this, parameters)); - - if (!statement.IsReadOnly()) - { - readOnly_ = false; - } - - return result.release(); + return dynamic_cast<PostgreSQLStatement&>(statement).Execute(*this, parameters); } @@ -117,10 +108,5 @@ const Dictionary& parameters) { dynamic_cast<PostgreSQLStatement&>(statement).ExecuteWithoutResult(*this, parameters); - - if (!statement.IsReadOnly()) - { - readOnly_ = false; - } } }