Finished clean on recommendation engines

This commit is contained in:
emeric
2021-09-30 19:02:49 +02:00
parent 4e9cf0d77f
commit 6baf0d313d
29 changed files with 648 additions and 634 deletions
+7
View File
@@ -66,6 +66,13 @@ Artist::getById(Session& session, ArtistId id)
return session.getDboSession().find<Artist>().where("id = ?").bind(id).resultValue();
}
bool
Artist::exists(Session& session, ArtistId id)
{
session.checkSharedLocked();
return session.getDboSession().query<int>("SELECT 1 FROM artist").where("id = ?").bind(id).resultValue() == 1;
}
Artist::pointer
Artist::create(Session& session, const std::string& name, const std::optional<UUID>& MBID)
{