MCPcopy Create free account
hub / github.com/Kitware/VTK / update_linked_chunks

Method update_linked_chunks

ThirdParty/libproj/vtklibproj/src/networkfilemanager.cpp:648–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

646// ---------------------------------------------------------------------------
647
648bool DiskChunkCache::update_linked_chunks(sqlite3_int64 link_id,
649 sqlite3_int64 prev,
650 sqlite3_int64 next) {
651 auto stmt =
652 prepare("UPDATE linked_chunks SET prev = ?, next = ? WHERE id = ?");
653 if (!stmt)
654 return false;
655 if (prev)
656 stmt->bindInt64(prev);
657 else
658 stmt->bindNull();
659 if (next)
660 stmt->bindInt64(next);
661 else
662 stmt->bindNull();
663 stmt->bindInt64(link_id);
664 const auto ret = stmt->execute();
665 if (ret != SQLITE_DONE) {
666 pj_log(ctx_, PJ_LOG_ERROR, "%s", sqlite3_errmsg(hDB_));
667 return false;
668 }
669 return true;
670}
671
672// ---------------------------------------------------------------------------
673

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