Index: sql/connection.h |
diff --git a/sql/connection.h b/sql/connection.h |
index 9b81804bc1fafb68bac8bfb9a63dff4c6887305c..1e3414f40ca72912b0b8e0b64af1fa37d5e78a1f 100644 |
--- a/sql/connection.h |
+++ b/sql/connection.h |
@@ -181,6 +181,26 @@ class SQL_EXPORT Connection { |
// generally exist either. |
void Preload(); |
+ // Raze the database to the ground. This approximates creating a |
+ // fresh database from scratch, within the constraints of SQLite's |
+ // locking protocol (locks and open handles can make doing this with |
+ // filesystem operations problematic). Returns true if the database |
+ // was razed. |
+ // |
+ // false is returned if the database is locked by some other |
+ // process. RazeWithTimeout() may be used if appropriate. |
+ // |
+ // NOTE(shess): Raze() will DCHECK in the following situations: |
+ // - database is not open. |
+ // - the connection has a transaction open. |
+ // - a SQLite issue occurs which is structural in nature (like the |
+ // statements used are broken). |
+ // Since Raze() is expected to be called in unexpected situations, |
+ // these all return false, since it is unlikely that the caller |
+ // could fix them. |
+ bool Raze(); |
+ bool RazeWithTimout(base::TimeDelta timeout); |
+ |
// Transactions -------------------------------------------------------------- |
// Transaction management. We maintain a virtual transaction stack to emulate |