One exclusive native progress owner per connection. SQLite has no getter * for an externally installed handler; direct replacement during this borrow * is outside the request-owned connection contract. */
| 1522 | * for an externally installed handler; direct replacement during this borrow |
| 1523 | * is outside the request-owned connection contract. */ |
| 1524 | static bool store_progress_acquire(cbm_store_t *s, const void *owner, int interval, |
| 1525 | int (*callback)(void *), void *context) { |
| 1526 | if (!s || !s->db || !owner || s->progress_owner) { |
| 1527 | return false; |
| 1528 | } |
| 1529 | s->progress_owner = owner; |
| 1530 | sqlite3_progress_handler(s->db, interval, callback, context); |
| 1531 | return true; |
| 1532 | } |
| 1533 | |
| 1534 | static bool store_progress_release(cbm_store_t *s, const void *owner) { |
| 1535 | if (!s || !s->db || s->progress_owner != owner) { |
no outgoing calls
no test coverage detected