about summary refs log tree commit diff
path: root/src/database/file
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/file')
-rw-r--r--src/database/file/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/database/file/mod.rs b/src/database/file/mod.rs
index 27d3da1..46660ab 100644
--- a/src/database/file/mod.rs
+++ b/src/database/file/mod.rs
@@ -254,6 +254,20 @@ async fn hydrate_author<S: Storage>(
 #[async_trait]
 impl Storage for FileStorage {
     #[tracing::instrument(skip(self))]
+    async fn categories(&self, url: &str) -> Result<Vec<String>> {
+        // This requires an expensive scan through the entire
+        // directory tree.
+        //
+        // Until this backend has some kind of caching/indexing for
+        // categories (consider using symlinks?), this query won't
+        // perform well.
+        Err(std::io::Error::new(
+            std::io::ErrorKind::Unsupported,
+            "?q=category queries are not implemented due to resource constraints"
+        ))?
+    }
+
+    #[tracing::instrument(skip(self))]
     async fn post_exists(&self, url: &str) -> Result<bool> {
         let path = url_to_path(&self.root_dir, url);
         debug!("Checking if {:?} exists...", path);