Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: sql/transaction.h

Issue 8506027: build sql as a component - this will help ensure there is only one copy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't export DiagnosticErrorDelegate Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sql/statement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SQL_TRANSACTION_H_ 5 #ifndef SQL_TRANSACTION_H_
6 #define SQL_TRANSACTION_H_ 6 #define SQL_TRANSACTION_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "sql/sql_export.h"
10 11
11 namespace sql { 12 namespace sql {
12 13
13 class Connection; 14 class Connection;
14 15
15 class Transaction { 16 class SQL_EXPORT Transaction {
16 public: 17 public:
17 // Creates the scoped transaction object. You MUST call Begin() to begin the 18 // Creates the scoped transaction object. You MUST call Begin() to begin the
18 // transaction. If you have begun a transaction and not committed it, the 19 // transaction. If you have begun a transaction and not committed it, the
19 // constructor will roll back the transaction. If you want to commit, you 20 // constructor will roll back the transaction. If you want to commit, you
20 // need to manually call Commit before this goes out of scope. 21 // need to manually call Commit before this goes out of scope.
21 explicit Transaction(Connection* connection); 22 explicit Transaction(Connection* connection);
22 ~Transaction(); 23 ~Transaction();
23 24
24 // Returns true when there is a transaction that has been successfully begun. 25 // Returns true when there is a transaction that has been successfully begun.
25 bool is_open() const { return is_open_; } 26 bool is_open() const { return is_open_; }
(...skipping 22 matching lines...) Expand all
48 // True when the transaction is open, false when it's already been committed 49 // True when the transaction is open, false when it's already been committed
49 // or rolled back. 50 // or rolled back.
50 bool is_open_; 51 bool is_open_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(Transaction); 53 DISALLOW_COPY_AND_ASSIGN(Transaction);
53 }; 54 };
54 55
55 } // namespace sql 56 } // namespace sql
56 57
57 #endif // SQL_TRANSACTION_H_ 58 #endif // SQL_TRANSACTION_H_
OLDNEW
« no previous file with comments | « sql/statement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698