Files
MuditaOS/module-db/queries/notes/QueryNoteStore.hpp
Piotr Tański 50a73ca638 [EGD-7051] Fixed saving multiple notes at once
When creating a new note, it was possible to save multiple notes
with 1 click.
2021-07-01 16:00:56 +02:00

39 lines
966 B
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <string>
#include <Common/Query.hpp>
#include "Interface/NotesRecord.hpp"
namespace db::query
{
class QueryNoteStore : public Query
{
public:
explicit QueryNoteStore(NotesRecord record);
[[nodiscard]] const NotesRecord &getRecord() const noexcept;
[[nodiscard]] std::string debugInfo() const override;
private:
NotesRecord record;
};
class NoteStoreResult : public QueryResult
{
public:
NoteStoreResult(bool isSuccess, std::uint32_t noteId);
[[nodiscard]] bool succeed() const noexcept;
[[nodiscard]] std::uint32_t getNoteId() const noexcept;
[[nodiscard]] std::string debugInfo() const override;
private:
bool isSuccess;
std::uint32_t noteId;
};
} // namespace db::query