internal static void Init() { if (SQLType == null) { Logger.Log("Starting Database Service", LogType.Debug); switch (ServerSettings.GetSetting("DatabaseType")) { case "mysql": SQLType = new MySQL(); break; case "sqlite": SQLType = new SQLite(); break; default: Logger.Log("Database Type not found!", Color.Red, Color.Gray); Logger.Log("Using SQLite", Color.Green, Color.Gray); SQLType = new SQLite(); break; } SQLType.onLoad(); } if (_worker == null) { Logger.Log("Database Queuing starting", LogType.Debug); _worker = new Thread(Flush); flushcommands = true; _worker.Start(); } }
internal static void init() { if (SQLType == null) { Logger.Log("Starting Database Service", LogType.Debug); switch (ServerSettings.GetSetting("DatabaseType")) { case "mysql": SQLType = new MySQL(); break; case "sqlite": SQLType = new SQLite(); break; default: Logger.Log("Database Type not found!",Color.Red, Color.Gray); Logger.Log("Using SQLite", Color.Green, Color.Gray); SQLType = new SQLite(); break; } SQLType.onLoad(); } if (_worker == null) { Logger.Log("Database Queuing starting", LogType.Debug); _worker = new Thread(Flush); flushcommands = true; _worker.Start(); } }
internal static void init() { if (SQLType != null) { switch (ServerSettings.GetSetting("DatabaseType")) { case "mysql": SQLType = new MySQL(); break; case "sqlite": SQLType = new SQLite(); break; default: Server.Log("Database Type not found!", ConsoleColor.Red, ConsoleColor.Gray); Server.Log("Using SQLite", ConsoleColor.Green, ConsoleColor.Gray); SQLType = new SQLite(); break; } SQLType.onLoad(); } }