| Index: sql/connection.h
|
| diff --git a/sql/connection.h b/sql/connection.h
|
| index a2e8f67f944bd8cde89a05f4345136a855d26944..4f84e36f295994cabdcb0760c386e7b5fcb5d07c 100644
|
| --- a/sql/connection.h
|
| +++ b/sql/connection.h
|
| @@ -28,6 +28,7 @@ class FilePath;
|
|
|
| namespace sql {
|
|
|
| +class Recovery;
|
| class Statement;
|
|
|
| // Uniquely identifies a statement. There are two modes of operation:
|
| @@ -157,6 +158,12 @@ class SQL_EXPORT Connection {
|
| // empty. You can call this or Open.
|
| bool OpenInMemory() WARN_UNUSED_RESULT;
|
|
|
| + // Create a temporary on-disk database. The database will be
|
| + // deleted after close. This kind of database is similar to
|
| + // OpenInMemory() for small databases, but can page to disk if the
|
| + // database becomes large.
|
| + bool OpenTemporary() WARN_UNUSED_RESULT;
|
| +
|
| // Returns true if the database has been successfully opened.
|
| bool is_open() const { return !!db_; }
|
|
|
| @@ -224,6 +231,9 @@ class SQL_EXPORT Connection {
|
| // cases.
|
| bool RazeAndClose();
|
|
|
| + // Like RazeAndClose(), but without the Raze().
|
| + void CloseAndPoison();
|
| +
|
| // Delete the underlying database files associated with |path|.
|
| // This should be used on a database which has no existing
|
| // connections. If any other connections are open to the same
|
| @@ -251,6 +261,10 @@ class SQL_EXPORT Connection {
|
| void RollbackTransaction();
|
| bool CommitTransaction();
|
|
|
| + // Rollback all outstanding transactions. Use with care, there may
|
| + // be scoped transactions on the stack.
|
| + void RollbackAllTransactions();
|
| +
|
| // Returns the current transaction nesting, which will be 0 if there are
|
| // no open transactions.
|
| int transaction_nesting() const { return transaction_nesting_; }
|
| @@ -347,6 +361,9 @@ class SQL_EXPORT Connection {
|
| const char* GetErrorMessage() const;
|
|
|
| private:
|
| + // For recovery module.
|
| + friend class Recovery;
|
| +
|
| // Allow test-support code to set/reset error ignorer.
|
| friend class ScopedErrorIgnorer;
|
|
|
|
|