Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
|
- #pragma once
-
- #include <cppmariadb/config.h>
-
- namespace cppmariadb
- {
-
- /**
- * @brief Locks the queries executed at a connection.
- *
- * This will start an transaction if the object is created and
- * automatically execute the rollback in the destructor, if the
- * transaction ws not commited.
- */
- struct transaction
- {
- private:
- connection& _connection; //!< Connection this transaction object protects
- bool _closed; //!< True if the transaction is closed/finished.
-
- public:
- /**
- * @brief Constructor.
- *
- * @param[in] connection Connection to protect.
- */
- inline transaction(connection& connection);
-
- /**
- * @brief Destructor.
- */
- inline ~transaction();
-
- /**
- * @brief Commit the changes made on the connection.
- */
- inline void commit();
-
- /**
- * @brief Rollback the changes made on the connection.
- */
- inline void rollback();
-
- private:
- /**
- * @brief Begin the transaction.
- */
- inline void begin();
- };
-
- }
|