1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems, Inc.
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
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
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
* @file Simple named savepoint class.
26
#include <drizzled/transaction_context.h>
32
* This is a class which stores information about
33
* a named savepoint in a transaction
41
NamedSavepoint(const char *in_name, size_t in_name_length) :
42
name(in_name, in_name_length),
44
transaction_message(NULL)
49
NamedSavepoint(const NamedSavepoint &other);
51
void setResourceContexts(TransactionContext::ResourceContexts &new_contexts)
53
resource_contexts= new_contexts;
55
const TransactionContext::ResourceContexts &getResourceContexts() const
57
return resource_contexts;
59
TransactionContext::ResourceContexts &getResourceContexts()
61
return resource_contexts;
63
const std::string &getName() const
67
const std::string &getName()
71
message::Transaction *getTransactionMessage() const
73
return transaction_message;
75
void setTransactionMessage(message::Transaction *in_transaction_message)
77
transaction_message= in_transaction_message;
79
NamedSavepoint &operator=(const NamedSavepoint &other)
84
name= other.getName();
85
resource_contexts= other.getResourceContexts();
90
TransactionContext::ResourceContexts resource_contexts;
91
message::Transaction *transaction_message;
95
} /* namespace drizzled */