OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) | 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // FULL - SQLite moves all empty pages to the end of the DB file and truncat
es | 105 // FULL - SQLite moves all empty pages to the end of the DB file and truncat
es |
106 // the file to remove those pages after every transaction. This optio
n | 106 // the file to remove those pages after every transaction. This optio
n |
107 // requires SQLite to store additional information about each page in | 107 // requires SQLite to store additional information about each page in |
108 // the database file. | 108 // the database file. |
109 // INCREMENTAL - SQLite stores extra information for each page in the databa
se | 109 // INCREMENTAL - SQLite stores extra information for each page in the databa
se |
110 // file, but removes the empty pages only when PRAGMA INCREMAN
TAL_VACUUM | 110 // file, but removes the empty pages only when PRAGMA INCREMAN
TAL_VACUUM |
111 // is called. | 111 // is called. |
112 enum AutoVacuumPragma { AutoVacuumNone = 0, AutoVacuumFull = 1, AutoVacuumIn
cremental = 2 }; | 112 enum AutoVacuumPragma { AutoVacuumNone = 0, AutoVacuumFull = 1, AutoVacuumIn
cremental = 2 }; |
113 bool turnOnIncrementalAutoVacuum(); | 113 bool turnOnIncrementalAutoVacuum(); |
114 | 114 |
115 DECLARE_TRACE(); | 115 DEFINE_INLINE_TRACE() { } |
116 | 116 |
117 private: | 117 private: |
118 static int authorizerFunction(void*, int, const char*, const char*, const ch
ar*, const char*); | 118 static int authorizerFunction(void*, int, const char*, const char*, const ch
ar*, const char*); |
119 | 119 |
120 void enableAuthorizer(bool enable); | 120 void enableAuthorizer(bool enable); |
121 | 121 |
122 int pageSize(); | 122 int pageSize(); |
123 | 123 |
124 sqlite3* m_db; | 124 sqlite3* m_db; |
125 int m_pageSize; | 125 int m_pageSize; |
126 | 126 |
127 bool m_transactionInProgress; | 127 bool m_transactionInProgress; |
128 bool m_sharable; | 128 bool m_sharable; |
129 | 129 |
130 Mutex m_authorizerLock; | 130 Mutex m_authorizerLock; |
131 Member<DatabaseAuthorizer> m_authorizer; | 131 CrossThreadPersistent<DatabaseAuthorizer> m_authorizer; |
132 | 132 |
133 ThreadIdentifier m_openingThread; | 133 ThreadIdentifier m_openingThread; |
134 | 134 |
135 Mutex m_databaseClosingMutex; | 135 Mutex m_databaseClosingMutex; |
136 | 136 |
137 int m_openError; | 137 int m_openError; |
138 CString m_openErrorMessage; | 138 CString m_openErrorMessage; |
139 | 139 |
140 int m_lastChangesCount; | 140 int m_lastChangesCount; |
141 }; | 141 }; |
142 | 142 |
143 } // namespace blink | 143 } // namespace blink |
144 | 144 |
145 #endif | 145 #endif |
OLD | NEW |