mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-06-16 12:29:00 -04:00
[EGD-4487] Application notes implemented. (#1094)
* [EGD-4487] Implementation of notes application.
This commit is contained in:
45
module-db/queries/notes/QueryNotesGet.cpp
Normal file
45
module-db/queries/notes/QueryNotesGet.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
|
||||
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
||||
|
||||
#include "QueryNotesGet.hpp"
|
||||
|
||||
namespace db::query
|
||||
{
|
||||
QueryNotesGet::QueryNotesGet(unsigned int offset, unsigned int limit)
|
||||
: Query(Query::Type::Read), offset{offset}, limit{limit}
|
||||
{}
|
||||
|
||||
unsigned int QueryNotesGet::getOffset() const noexcept
|
||||
{
|
||||
return offset;
|
||||
}
|
||||
|
||||
unsigned int QueryNotesGet::getLimit() const noexcept
|
||||
{
|
||||
return limit;
|
||||
}
|
||||
|
||||
std::string QueryNotesGet::debugInfo() const
|
||||
{
|
||||
return {"QueryNotesGet"};
|
||||
}
|
||||
|
||||
NotesGetResult::NotesGetResult(std::vector<NotesRecord> notes, unsigned int dbRecordsCount)
|
||||
: records{std::move(notes)}, dbRecordsCount{dbRecordsCount}
|
||||
{}
|
||||
|
||||
const std::vector<NotesRecord> &NotesGetResult::getRecords() const noexcept
|
||||
{
|
||||
return records;
|
||||
}
|
||||
|
||||
unsigned int NotesGetResult::getCount() const noexcept
|
||||
{
|
||||
return dbRecordsCount;
|
||||
}
|
||||
|
||||
auto NotesGetResult::debugInfo() const -> std::string
|
||||
{
|
||||
return {"NotesGetResult"};
|
||||
}
|
||||
} // namespace db::query
|
||||
Reference in New Issue
Block a user