~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/named_savepoint.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
namespace drizzled
30
30
{
31
31
 
 
32
namespace message
 
33
{
 
34
class Transaction;
 
35
}
 
36
 
32
37
/**
33
38
 * This is a class which stores information about
34
39
 * a named savepoint in a transaction
41
46
   */
42
47
  NamedSavepoint(const char *in_name, size_t in_name_length) :
43
48
    name(in_name, in_name_length),
44
 
    resource_contexts()
45
 
  {}
46
 
  ~NamedSavepoint()
47
 
  {}
 
49
    resource_contexts(),
 
50
    transaction_message(NULL)
 
51
  {}
 
52
 
 
53
  ~NamedSavepoint();
 
54
 
 
55
  NamedSavepoint(const NamedSavepoint &other);
48
56
 
49
57
  void setResourceContexts(TransactionContext::ResourceContexts &new_contexts)
50
58
  {
66
74
  {
67
75
    return name;
68
76
  }
69
 
  NamedSavepoint(const NamedSavepoint &other)
70
 
  {
71
 
    name.assign(other.getName());
72
 
    const TransactionContext::ResourceContexts &other_resource_contexts= other.getResourceContexts();
73
 
    resource_contexts.assign(other_resource_contexts.begin(),
74
 
                             other_resource_contexts.end());
 
77
  message::Transaction *getTransactionMessage() const
 
78
  {
 
79
    return transaction_message;
 
80
  }
 
81
  void setTransactionMessage(message::Transaction *in_transaction_message)
 
82
  {
 
83
    transaction_message= in_transaction_message;
75
84
  }
76
85
  NamedSavepoint &operator=(const NamedSavepoint &other)
77
86
  {
87
96
private:
88
97
  std::string name;
89
98
  TransactionContext::ResourceContexts resource_contexts;
 
99
  message::Transaction *transaction_message;
90
100
  NamedSavepoint();
91
101
};
92
102