mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Optimise file lookups and other database operations
FirstOrDefault when called on a TableQuery with a predicate doesn't use table indices
This commit is contained in:
@ -41,7 +41,7 @@ namespace osu.Game.Database
|
||||
{
|
||||
var storeName = GetType().Name;
|
||||
|
||||
var reportedVersion = Connection.Table<StoreVersion>().FirstOrDefault(s => s.StoreName == storeName) ?? new StoreVersion
|
||||
var reportedVersion = Connection.Table<StoreVersion>().Where(s => s.StoreName == storeName).FirstOrDefault() ?? new StoreVersion
|
||||
{
|
||||
StoreName = storeName,
|
||||
Version = 0
|
||||
|
Reference in New Issue
Block a user