2016-10-04 23:31:10 +08:00
|
|
|
|
using System;
|
2016-10-05 01:35:40 +08:00
|
|
|
|
using osu.Framework.OS;
|
2016-10-04 23:31:10 +08:00
|
|
|
|
using SQLite;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Database
|
|
|
|
|
{
|
|
|
|
|
public class BeatmapDatabase
|
|
|
|
|
{
|
|
|
|
|
private static SQLiteConnection Connection { get; set; }
|
|
|
|
|
|
2016-10-05 01:35:40 +08:00
|
|
|
|
public BeatmapDatabase(BasicStorage storage)
|
2016-10-04 23:31:10 +08:00
|
|
|
|
{
|
|
|
|
|
if (Connection == null)
|
|
|
|
|
{
|
2016-10-05 01:35:40 +08:00
|
|
|
|
Connection = storage.GetDb("beatmaps");
|
2016-10-04 23:31:10 +08:00
|
|
|
|
Connection.CreateTable<BeatmapMetadata>();
|
|
|
|
|
Connection.CreateTable<BeatmapSet>();
|
|
|
|
|
Connection.CreateTable<Beatmap>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|