MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / QueryVisitRecords

Method QueryVisitRecords

src/render_panel/database/visit_record_operator.cpp:51–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 }
50
51 std::vector<std::shared_ptr<VisitRecord>> VisitRecordOperator::QueryVisitRecords(int page, int page_size) {
52 using Storage = decltype(db_->GetStorageTypeValue());
53 auto storage = std::any_cast<Storage>(db_->GetDbStorage());
54 auto qrs = storage.get_all_pointer<VisitRecord>(
55 order_by(&VisitRecord::id_),
56 limit(page_size, offset((page-1)*page_size)));
57 std::vector<std::shared_ptr<VisitRecord>> records;
58 for (auto& r : qrs) {
59 records.push_back(std::move(r));
60 }
61 return records;
62 }
63
64 void VisitRecordOperator::Delete(int id) {
65 using Storage = decltype(db_->GetStorageTypeValue());

Callers 1

LoadPageMethod · 0.80

Calls 2

GetStorageTypeValueMethod · 0.80
GetDbStorageMethod · 0.80

Tested by

no test coverage detected