2023-12-30 19:42:11 -03:00
|
|
|
//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
|
|
|
//SPDX-License-Identifier: GPL-3.0-or-later
|
2023-12-22 20:25:20 -03:00
|
|
|
|
2023-12-20 19:42:13 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "mysql.h"
|
|
|
|
|
2023-12-29 14:40:00 -03:00
|
|
|
namespace DB {
|
2023-12-20 19:42:13 -03:00
|
|
|
class MySQL::Transaction {
|
|
|
|
public:
|
|
|
|
Transaction(MYSQL* connection);
|
|
|
|
~Transaction();
|
|
|
|
|
|
|
|
void commit();
|
|
|
|
void abort();
|
|
|
|
|
|
|
|
private:
|
|
|
|
MYSQL* con;
|
|
|
|
bool opened;
|
|
|
|
};
|
2023-12-29 14:40:00 -03:00
|
|
|
}
|