MCPcopy Create free account
hub / github.com/OSGeo/PROJ / update_linked_chunks

Method update_linked_chunks

src/networkfilemanager.cpp:670–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668// ---------------------------------------------------------------------------
669
670bool DiskChunkCache::update_linked_chunks(sqlite3_int64 link_id,
671 sqlite3_int64 prev,
672 sqlite3_int64 next) {
673 auto stmt =
674 prepare("UPDATE linked_chunks SET prev = ?, next = ? WHERE id = ?");
675 if (!stmt)
676 return false;
677 if (prev)
678 stmt->bindInt64(prev);
679 else
680 stmt->bindNull();
681 if (next)
682 stmt->bindInt64(next);
683 else
684 stmt->bindNull();
685 stmt->bindInt64(link_id);
686 const auto ret = stmt->execute();
687 if (ret != SQLITE_DONE) {
688 pj_log(ctx_, PJ_LOG_ERROR, "%s", sqlite3_errmsg(hDB_));
689 return false;
690 }
691 return true;
692}
693
694// ---------------------------------------------------------------------------
695

Callers

nothing calls this directly

Calls 4

pj_logFunction · 0.85
bindInt64Method · 0.80
bindNullMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected