:-'Generic Commit'
All checks were successful
Build-Test-Publish / Build (push) Successful in 1m8s

This commit is contained in:
Your Name
2025-05-30 23:57:26 +12:00
parent fd6cc5bef4
commit 439ad79524
2 changed files with 17 additions and 5 deletions

View File

@@ -237,7 +237,7 @@ bool Database::get(const std::string& hash_or_labeltag, dbEntry& entry) {
// try with a :latest tag
std::string with_latest = hash_or_labeltag + ":latest";
return (run_sql_text("SELECT hash, labeltags, metadata FROM objects WHERE hash = ?;", with_latest, entry));
return (run_sql_text("SELECT hash, labeltags, metadata FROM objects WHERE json_array_length(labeltags) > 0 AND EXISTS (SELECT 1 FROM json_each(labeltags) WHERE value = ?);", with_latest, entry));
}
bool Database::list(std::vector<dbEntry>& entries) {