~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/start_transaction.h

  • Committer: Olaf van der Spek
  • Date: 2011-03-24 00:16:14 UTC
  • mto: This revision was merged to the branch mainline in revision 2251.
  • Revision ID: olafvdspek@gmail.com-20110324001614-wvmgc6eg52oq2321
Remove const_reference and reference from Session

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef DRIZZLED_STATEMENT_START_TRANSACTION_H
22
 
#define DRIZZLED_STATEMENT_START_TRANSACTION_H
 
21
#pragma once
23
22
 
24
23
#include <drizzled/statement.h>
25
24
 
36
35
  start_transaction_option_t start_transaction_opt;
37
36
 
38
37
public:
39
 
  StartTransaction(Session *in_session, start_transaction_option_t opt= START_TRANS_NO_OPTIONS)
40
 
    :
41
 
      Statement(in_session),
42
 
      start_transaction_opt(opt)
43
 
  {}
 
38
  StartTransaction(Session *in_session, start_transaction_option_t opt= START_TRANS_NO_OPTIONS) :
 
39
    Statement(in_session),
 
40
    start_transaction_opt(opt)
 
41
  {
 
42
    set_command(SQLCOM_BEGIN);
 
43
  }
44
44
 
45
45
  bool execute();
 
46
 
 
47
  /* we kinda cheat here as START TRANSACTION will start a transaction,
 
48
     so having an autocommit=off implicit start txn doesn't make sense. */
 
49
  bool isTransactional()
 
50
  {
 
51
    return false;
 
52
  }
46
53
};
47
54
 
48
55
} /* namespace statement */
49
56
 
50
57
} /* namespace drizzled */
51
58
 
52
 
#endif /* DRIZZLED_STATEMENT_START_TRANSACTION_H */