Use QuerySingle instead of QueryFirst

This commit is contained in:
Dean Herbert 2020-05-03 09:32:33 +09:00
parent b9b5779251
commit 035b513b68
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ private void update(BeatmapSetInfo set, BeatmapInfo beatmap)
{ {
using (var db = new SqliteConnection(storage.GetDatabaseConnectionString("online"))) using (var db = new SqliteConnection(storage.GetDatabaseConnectionString("online")))
{ {
var found = db.QueryFirstOrDefault<CachedOnlineBeatmapLookup>( var found = db.QuerySingleOrDefault<CachedOnlineBeatmapLookup>(
"SELECT * FROM osu_beatmaps WHERE checksum = @MD5Hash OR beatmap_id = @OnlineBeatmapID OR filename = @Path", beatmap); "SELECT * FROM osu_beatmaps WHERE checksum = @MD5Hash OR beatmap_id = @OnlineBeatmapID OR filename = @Path", beatmap);
if (found != null) if (found != null)