// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Database { public interface IDatabaseContextFactory { /// /// Get a context for read-only usage. /// OsuDbContext Get(); /// /// Request a context for write usage. Can be consumed in a nested fashion (and will return the same underlying context). /// This method may block if a write is already active on a different thread. /// /// Whether to start a transaction for this write. /// A usage containing a usable context. DatabaseWriteUsage GetForWrite(bool withTransaction = true); } }