summaryrefslogtreecommitdiff
path: root/platform/default/sqlite3.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] finish must-revalidate supportKonstantin Käfer2017-08-081-0/+5
|
* [core] GCC 4.9 shadow member warningsBruno de Oliveira Abinader2017-07-121-2/+2
|
* [tidy] modernize-use-equals-defaultBruno de Oliveira Abinader2017-05-121-4/+2
|
* [tidy] modernize-use-autoBruno de Oliveira Abinader2017-05-121-1/+1
|
* [core] Remove unused bool() functionsBruno de Oliveira Abinader2017-04-141-8/+0
|
* [core] Do not throw on dtorsThiago Marcos P. Santos2017-04-011-1/+1
| | | | Fix build on GCC6 + Ubuntu 16.04.
* [ios] Clean-up conditionals for iOS <8Jason Wray2017-02-211-2/+2
|
* [core] Move sqlite::Statement::check to pimplBruno de Oliveira Abinader2017-01-231-21/+21
|
* [core] Move lastInsertRowId/changes to sqlite::StatementBruno de Oliveira Abinader2017-01-231-10/+15
|
* [core] Private implementation for SQLite interfaceBruno de Oliveira Abinader2017-01-231-111/+141
|
* [build] move logging to utilKonstantin Käfer2016-11-221-1/+1
|
* [core] Move SQLite logging setup to before database initializationJason Wray2016-09-091-7/+9
| | | | | | - Ensure that sqlite3_config() is always called before db init. - Should only be called once, now. - Move sqliteVersionCheck into mapbox::sqlite namespace.
* [core] Implement SQLite error logging (#6291)Jason Wray2016-09-081-0/+13
|
* [core] move from microsecond precision timestamp to integer second precisionKonstantin Käfer2016-05-131-7/+18
|
* [linux] Build with GCC 5 (#4901)John Firebaugh2016-04-291-5/+1
| | | | | | * [linux] Build with GCC 5 * [build] -fabi-version=0 is the default for GCC 5
* [core] Fix race condition that could lead to a UNIQUE constraint failure (#4677)John Firebaugh2016-04-111-0/+35
|
* [core] Fix subtle bug in OfflineDatabase with updated resourcesJohn Firebaugh2016-02-241-0/+18
| | | | | | SQLite REPLACE is *not* UPSERT. If a conflict occurs, it first deletes the existing row, then inserts a new row. This means that AUTOINCREMENT primary keys change. This will break foreign keys to that value, which we use. Instead we must try an UPDATE, and fall back to an INSERT if the UPDATE changes zero rows.
* [core] Implement an eviction policy for OfflineDatabaseJohn Firebaugh2016-02-101-0/+5
| | | | | | | | | | | | | When inserting an cached resource, or removing a region, remove least-recently used resources and tiles, not used by offline regions, until the used database size, as calculated by multiplying the number of in-use pages by the page size, is less than the maximum cache size minus 5 times the page size. In addition, OfflineDatabase may be configured to ignore cache puts of individual resources larger than a certain size. This policy is similar but not identical to the former SQLiteCache policy: * It accounts for offline, by exempting resources required by offline regions from eviction. * It must delete from two tables (resources and tiles), rather than one. Currently the strategy is naive: evict 50 rows at a time from each table. * It makes maximumCacheSize and maximumCacheEntrySize completely independent. The SQLiteCache implementation evicted when `usedSize > maximumCacheSize - 2 * maximumCacheEntrySize`. This evicts when `usedSize > maximumCacheSize - 5 * pageSize`. * It uses a non-unlimited default value for maximumCacheSize: 50 MB. We should have always had a limit in place; "a cache without an eviction policy is a resource leak".
* [core] Reset SQLite statements after use in order to release locksJohn Firebaugh2016-02-101-0/+5
|
* [core] Disable SQLite busy timeouts so that multiple readers can access the ↵John Firebaugh2016-02-101-0/+9
| | | | same database
* [core] Interface and implementation for offlineJohn Firebaugh2016-02-101-1/+40
|
* [core] Reimplement existing caching within an offline-capable database schemaJohn Firebaugh2016-02-101-2/+32
|
* [core] Use better types for modified / expires / etagJohn Firebaugh2016-01-211-1/+55
|
* [core] Eliminate macros in sqlite3.cppJohn Firebaugh2016-01-191-26/+20
|
* [core] throw values, catch referencesKonstantin Käfer2015-12-031-5/+5
|
* [core] add namespace comment to closing braceKonstantin Käfer2015-12-031-2/+2
|
* [core] Fix std::move() misuse that disables copy elisionKonstantin Käfer2015-12-031-1/+1
|
* Fix GCC5 complaining about -Wunused-variable.Thomas Voß2015-11-251-0/+3
|
* don't use certain STL functionsKonstantin Käfer2015-08-041-0/+1
| | | | 
some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
* make sqlite storage more resilient to sporadic errorsKonstantin Käfer2015-04-071-14/+19
| | | | | | | | - catch SQLite exceptions and report them - failed statements are ignored, we're really just caching here, so if it fails we're handling it gracefully elsewhere - handle cases where the database file goes away after we opened it - handle cases where the schema wasn't created after the database file was opened successfully - add tests
* Relax sqlite version check to major version onlyJohn Firebaugh2015-03-111-8/+1
| | | | | | | iOS 8.2 updates the included SQLite version to 3.8.4, while iOS 7.0 up to iOS 8.1 provides version 3.7.13. When compiling with the 8.2 SDK and running on 8.1 or below, or vice versa, a strict check fails. Fixes #968.
* add missing headersKonstantin Käfer2015-02-041-0/+1
|
* make storage lib separate so we can build without storage libsKonstantin Käfer2015-02-041-0/+185