summaryrefslogtreecommitdiffstats
path: root/include/djinterop/database.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/djinterop/database.hpp')
-rw-r--r--include/djinterop/database.hpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/include/djinterop/database.hpp b/include/djinterop/database.hpp
index 9f68d61..b947733 100644
--- a/include/djinterop/database.hpp
+++ b/include/djinterop/database.hpp
@@ -25,17 +25,12 @@
#include <cstdint>
#include <memory>
-#include <optional>
#include <stdexcept>
#include <string>
#include <vector>
#include <djinterop/config.hpp>
-
-namespace sqlite
-{
-class database;
-}
+#include <djinterop/optional.hpp>
namespace djinterop
{
@@ -70,9 +65,9 @@ public:
/// Returns the crate with the given ID
///
- /// If no such crate exists in the database, then `djinterop::std::nullopt`
+ /// If no such crate exists in the database, then `djinterop::stdx::nullopt`
/// is returned.
- std::optional<crate> crate_by_id(int64_t id) const;
+ stdx::optional<crate> crate_by_id(int64_t id) const;
/// Returns all crates contained in the database
std::vector<crate> crates() const;
@@ -125,8 +120,8 @@ public:
/// Returns the root-level crate with the given name.
///
- /// If no such crate exists, then `djinterop::std::nullopt` is returned.
- std::optional<crate> root_crate_by_name(const std::string& name) const;
+ /// If no such crate exists, then `djinterop::stdx::nullopt` is returned.
+ stdx::optional<crate> root_crate_by_name(const std::string& name) const;
/// Returns all root crates contained in the database
///
@@ -135,9 +130,9 @@ public:
/// Returns the track with the given id
///
- /// If no such track exists in the database, then `djinterop::std::nullopt`
+ /// If no such track exists in the database, then `djinterop::stdx::nullopt`
/// is returned.
- std::optional<track> track_by_id(int64_t id) const;
+ stdx::optional<track> track_by_id(int64_t id) const;
/// Returns all tracks whose `relative_path` attribute in the database
/// matches the given string