eloqstore-sys 1.1.1

Low-level Rust FFI bindings for EloqStore
#pragma once

#include <utility>
#include <vector>

#include "tasks/write_task.h"

namespace eloqstore
{
class BackgroundWrite : public WriteTask
{
public:
    TaskType Type() const override
    {
        return TaskType::BackgroundWrite;
    }
    /**
     * @brief Compact data files with a low utilization rate. Copy all pages
     * referenced by the latest mapping and append them to the latest data file.
     */
    KvError CompactDataFile();

    KvError CreateArchive(std::string_view tag = {});

    KvError RunLocalFileGc();

    KvError CreateBranch(std::string_view branch_name);

    KvError DeleteBranch(std::string_view branch_name);

private:
    void HeapSortFpIdsWithYield(
        std::vector<std::pair<FilePageId, PageId>> &fp_ids);
};
}  // namespace eloqstore