MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / File

Class File

src/util/fd-vfs.cpp:214–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 // The sqlite3_file subclass used for main database files and journals.
213 // SQLite allocates this memory itself, so it must remain a plain struct.
214 struct File {
215 sqlite3_file base;
216 int fd; // For journals, a duplicate of the main database File's journal_fd
217 bool writable;
218 int eFileLock;
219 Inode* inode; // NULL for journals
220 int journal_fd; // Owned by the main database File
221 bool journal_writable;
222 const char* name; // Valid until xClose (guaranteed by SQLite)
223 int error_code; // See TakeErrorMessage() (main database Files only)
224 const char* error_message;
225 unsigned long long error_operation; // The operation that recorded the error
226 };
227
228 static std::mutex& Mutex() {
229 static std::mutex* mutex = new std::mutex(); // Intentionally leaked

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected