using lf instead crlf to decrease errors

This commit is contained in:
TinyAtoms
2019-06-27 00:32:09 -03:00
parent 77919e4ce0
commit 6be7af0933
6 changed files with 172 additions and 282 deletions

View File

@ -9,23 +9,19 @@
* or copy at http://opensource.org/licenses/MIT)
*/
#include <SQLiteCpp/Transaction.h>
#include <SQLiteCpp/Database.h>
#include <SQLiteCpp/Assertion.h>
namespace SQLite
{
// Begins the SQLite transaction
Transaction::Transaction(Database& aDatabase) :
mDatabase(aDatabase),
Transaction::Transaction(Database& aDatabase)
:
mDatabase(aDatabase)
,
mbCommited(false)
{
mDatabase.exec("BEGIN");
}
// Safely rollback the transaction if it has not been committed.
Transaction::~Transaction()
{
@ -41,7 +37,6 @@ Transaction::~Transaction()
}
}
}
// Commit the transaction.
void Transaction::commit()
{
@ -55,6 +50,4 @@ void Transaction::commit()
throw SQLite::Exception("Transaction already commited.");
}
}
} // namespace SQLite
} // namespace SQLite