1 // Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
5 #include "src/sql_transaction.h"
7 #include "src/sql_connection.h"
11 void SQLTransaction::lock() const {
12 sql_conn_->BeginTransaction();
15 void SQLTransaction::unlock() const {
16 if (!sql_conn_->GetErrorCode())
17 sql_conn_->CommitTransaction();
19 sql_conn_->RollbackTransaction();