kexi

kexidbtransaction.cpp
1/***************************************************************************
2 * kexidbtransaction.cpp
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20
21#include "kexidbtransaction.h"
22#include "kexidbconnection.h"
23#include <api/variant.h>
24
25//#include <kdebug.h>
26
27using namespace Kross::KexiDB;
28
29KexiDBTransaction::KexiDBTransaction(::KexiDB::Transaction& transaction)
30 : Kross::Api::Class<KexiDBTransaction>("KexiDBTransaction")
31 , m_transaction(transaction)
32{
33 this->addFunction0< Kross::Api::Variant >("isActive", this, &KexiDBTransaction::isActive);
34 this->addFunction0< Kross::Api::Variant >("isNull", this, &KexiDBTransaction::isNull);
35}
36
37KexiDBTransaction::~KexiDBTransaction()
38{
39}
40
41const TQString KexiDBTransaction::getClassName() const
42{
43 return "Kross::KexiDB::KexiDBTransaction";
44}
45
46::KexiDB::Transaction& KexiDBTransaction::transaction()
47{
48 return m_transaction;
49}
50
51bool KexiDBTransaction::isActive() const { return m_transaction.active(); }
52bool KexiDBTransaction::isNull() const { return m_transaction.isNull(); }
This class encapsulates transaction handle.
Definition transaction.h:60
Transactions are used to ensure that integrity of a database is maintained.
KrossKexiDB provides access to the KexiDB database functionality.