Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [core] consolidate database opening workflow | Konstantin Käfer | 2018-06-12 | 1 | -24/+1 |
| | | | | | | | | Before this change, we've tried to open the database in read/write, but not create mode. In situations where the database didn't exist yet, this logged an error to the console, and we proceeded to opening it again in read/write/create mode, which actually created the file. The reason we did this is so that we could detect really old caching databases from January 2016 in case a developer upgraded from an older SDK (iOS v3.1 and earlier, Android v3.2 and earlier) that didn't have https://github.com/mapbox/mapbox-gl-native/pull/3715 yet. However, these error messages, while innocent, look scary in the console and some users suspect that it's a bug. This change opens the file directly in read/write/create mode, omitting the first failed attempt. To handle old cache databases, we're now deleting the `http_cache` table, which was the only table in those old databases, and create the new schema, rather than deleting the entire file and recreating the Database object. In most scenarios, this will lead to one fewer opening attempt, while the database migration will continue to work for the few users who upgrade all the way from a January 2016 SDK. Additionally, this fixes a mismatch between the Qt and non-Qt implementation: Qt doesn't support opening a file in read/write mode without the create flag. This means that we've seen a different control flow on Qt compared to the non-Qt implementation when opening a database. | ||||
* | [core] support moving Database object during a Transaction | Konstantin Käfer | 2018-06-12 | 1 | -1/+0 |
| | |||||
* | [test] verify log messages of OfflineDatabase tests | Konstantin Käfer | 2018-06-12 | 1 | -19/+127 |
| | |||||
* | [test] standardize on database file name and move I/O functions to util | Konstantin Käfer | 2018-06-12 | 1 | -76/+47 |
| | |||||
* | [test] pull out using namespace mbgl to reduce verbosity | Konstantin Käfer | 2018-06-12 | 1 | -66/+3 |
| | |||||
* | [core] offline database - batch region resource inserts | Ivo van Dongen | 2018-06-04 | 1 | -0/+54 |
| | |||||
* | Avoid exceptions for flow control during database creation | John Firebaugh | 2018-05-09 | 1 | -6/+6 |
| | | | | Unfortuntely, it's difficult to avoid all exceptions, because sqlite3_open_v2 does not reliably return SQLITE_NOTADB if the file is not a database. However, this should avoid cases where developers misinterpret the SQLITE_CANTOPEN exception as a crash, which is the common case. | ||||
* | [core, qt] move self-resetting Statement/Query object to shared header | Konstantin Käfer | 2018-03-02 | 1 | -21/+26 |
| | |||||
* | [tests] Added a test for getting resources from the database | Thiago Marcos P. Santos | 2018-02-26 | 1 | -0/+34 |
| | | | | This test would have flagged the Qt regression. | ||||
* | [test] Only use our SQLite3 wrapper in tests | Bruno de Oliveira Abinader | 2018-01-08 | 1 | -44/+2 |
| | |||||
* | [tests] Enforce the schema downgrade behavior | Thiago Marcos P. Santos | 2017-08-22 | 1 | -0/+24 |
| | | | | Which is, delete and recreate the database. | ||||
* | [core] finish must-revalidate support | Konstantin Käfer | 2017-08-08 | 1 | -15/+54 |
| | |||||
* | [core] remove trailing whitespace, add trailing newlines, add space after // | Konstantin Käfer | 2017-01-27 | 1 | -2/+2 |
| | |||||
* | [Qt] Implement mapbox::sqlite::{Database,Statement} using QtSql | Bruno de Oliveira Abinader | 2017-01-23 | 1 | -19/+0 |
| | |||||
* | [core] Move lastInsertRowId/changes to sqlite::Statement | Bruno de Oliveira Abinader | 2017-01-23 | 1 | -0/+19 |
| | |||||
* | [core] Optimize OfflineDownload::ensureResource (#6707) | Tore Halset | 2016-10-17 | 1 | -0/+53 |
| | | | Add `OfflineDatabase::hasRegionResource`, for use when the actual contents are not needed by the caller, avoiding IO and decompression costs. | ||||
* | [test] add .test.cpp suffix to test case files | Konstantin Käfer | 2016-09-28 | 1 | -0/+647 |