///
/// HybridDuckDBSpec.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

#pragma once

#if __has_include(<NitroModules/HybridObject.hpp>)
#include <NitroModules/HybridObject.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif

// Forward declaration of `HybridDatabaseSpec` to properly resolve imports.
namespace margelo::nitro::rnduckdb { class HybridDatabaseSpec; }

#include <string>
#include <memory>
#include "HybridDatabaseSpec.hpp"
#include <unordered_map>

namespace margelo::nitro::rnduckdb {

  using namespace margelo::nitro;

  /**
   * An abstract base class for `DuckDB`
   * Inherit this class to create instances of `HybridDuckDBSpec` in C++.
   * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
   * @example
   * ```cpp
   * class HybridDuckDB: public HybridDuckDBSpec {
   * public:
   *   HybridDuckDB(...): HybridObject(TAG) { ... }
   *   // ...
   * };
   * ```
   */
  class HybridDuckDBSpec: public virtual HybridObject {
    public:
      // Constructor
      explicit HybridDuckDBSpec(): HybridObject(TAG) { }

      // Destructor
      ~HybridDuckDBSpec() override = default;

    public:
      // Properties
      virtual std::string getVersion() = 0;
      virtual std::string getDocumentsPath() = 0;
      virtual std::string getLibraryPath() = 0;
      virtual std::string getDatabasePath() = 0;
      virtual std::string getExternalStoragePath() = 0;
      virtual std::string getDefaultPath() = 0;

    public:
      // Methods
      virtual std::shared_ptr<HybridDatabaseSpec> open(const std::string& path, const std::unordered_map<std::string, std::string>& config) = 0;
      virtual void deleteDatabase(const std::string& path) = 0;

    protected:
      // Hybrid Setup
      void loadHybridMethods() override;

    protected:
      // Tag for logging
      static constexpr auto TAG = "DuckDB";
  };

} // namespace margelo::nitro::rnduckdb
