|
KiCad PCB EDA Suite
|
Owns one connection, which a worker thread opens and uses. More...
Public Member Functions | |
| SQLITE_DB (std::string aPath, std::string aUri, int aTimeout) | |
| ~SQLITE_DB () | |
| SQLITE_DB (const SQLITE_DB &)=delete | |
| SQLITE_DB & | operator= (const SQLITE_DB &)=delete |
| void | Close () |
| CALL_RESULT | Open () |
| CALL_RESULT | Connect () |
| Opens the file and proves it is a database. | |
| CALL_RESULT | Refresh () |
| Reopens the connection if the path now names a different file than the one opened. | |
Static Public Member Functions | |
| static void | closeHandle (sqlite3 *aHandle) |
Public Attributes | |
| sqlite3 * | handle = nullptr |
| std::string | path |
| std::string | uri |
| int | timeout |
| FILE_ID | id |
| bool | closeWhenIdle = false |
Owns one connection, which a worker thread opens and uses.
Definition at line 241 of file sqlite_backend.cpp.
|
inline |
Definition at line 243 of file sqlite_backend.cpp.
References move, path, timeout, and uri.
Referenced by operator=(), and SQLITE_DB().
|
inline |
Definition at line 251 of file sqlite_backend.cpp.
References Close(), closeHandle(), handle, and DB_WORKER_THREAD::OnWorkerThread().
|
delete |
References SQLITE_DB().
|
inline |
Definition at line 276 of file sqlite_backend.cpp.
References closeHandle(), and handle.
Referenced by Connect(), Open(), Refresh(), and ~SQLITE_DB().
|
inlinestatic |
Definition at line 292 of file sqlite_backend.cpp.
Referenced by Close(), and ~SQLITE_DB().
| CALL_RESULT SQLITE_DB::Connect | ( | ) |
Opens the file and proves it is a database.
Definition at line 453 of file sqlite_backend.cpp.
| CALL_RESULT SQLITE_DB::Open | ( | ) |
Definition at line 408 of file sqlite_backend.cpp.
References Close(), closeWhenIdle, FILE_NOT_FOUND, handle, SQLITE_BACKEND::IsNetworkPath(), NETWORK_WAL, path, result, timeout, and uri.
References SQLITE_DB().
| CALL_RESULT SQLITE_DB::Refresh | ( | ) |
| bool SQLITE_DB::closeWhenIdle = false |
Definition at line 299 of file sqlite_backend.cpp.
Referenced by Open().
| sqlite3* SQLITE_DB::handle = nullptr |
Definition at line 294 of file sqlite_backend.cpp.
Referenced by Close(), Open(), Refresh(), and ~SQLITE_DB().
| FILE_ID SQLITE_DB::id |
Definition at line 298 of file sqlite_backend.cpp.
| std::string SQLITE_DB::path |
Definition at line 295 of file sqlite_backend.cpp.
Referenced by Open(), Refresh(), and SQLITE_DB().
| int SQLITE_DB::timeout |
Definition at line 297 of file sqlite_backend.cpp.
Referenced by Open(), and SQLITE_DB().
| std::string SQLITE_DB::uri |
Definition at line 296 of file sqlite_backend.cpp.
Referenced by Open(), and SQLITE_DB().