C# 클래스 BF2Statistics.Database.StatsDatabase

A class to provide common tasks against the Stats Database
상속: BF2Statistics.Database.DatabaseDriver, IDisposable
파일 보기 프로젝트 열기: BF2Statistics/ControlCenter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
LatestVersion System.Version
PlayerTables string[]
StatsTables string[]
VersionList System.Version[]

공개 메소드들

메소드 설명
CreateSqlTables ( IProgress TaskProgress = null ) : void

Tells the Database to install the Stats tables into the database

DeletePlayer ( int Pid, IProgress TaskProgress = null ) : void

Removes a player, based on pid, from the stats database

GetPlayerAwards ( int Pid ) : object>>.List

Returns a list of awards a player has earned

MigrateTables ( ) : void

If there is any table updates that need to be applied, calling this method will apply each update until the current database version is up to date

MigrateTables ( System.Version ToVersion ) : void

If there is any table updates that need to be applied, calling this method will apply each update until the specifed update version

PlayerExists ( int Pid ) : bool

Returns whether or not a player exists in the "player" table

StatsDatabase ( ) : System

Creates a connection to the Stats Database

Truncate ( ) : void

Clears all stats data from the stats database

보호된 메소드들

메소드 설명
GetTablesVersion ( ) : void

Fetches the current tables version

We have this in a seperate method because the table migration fetches the the version everytime an update is applied

비공개 메소드들

메소드 설명
CreateMysqlTables ( IProgress TaskProgress ) : void

On a new Mysql database, this method will create the default tables

CreateSqliteTables ( IProgress TaskProgress ) : void

On a new Sqlite database, this method will create the default tables

메소드 상세

CreateSqlTables() 공개 메소드

Tells the Database to install the Stats tables into the database
public CreateSqlTables ( IProgress TaskProgress = null ) : void
TaskProgress IProgress
리턴 void

DeletePlayer() 공개 메소드

Removes a player, based on pid, from the stats database
public DeletePlayer ( int Pid, IProgress TaskProgress = null ) : void
Pid int The players Id
TaskProgress IProgress The progress object to report to.
리턴 void

GetPlayerAwards() 공개 메소드

Returns a list of awards a player has earned
public GetPlayerAwards ( int Pid ) : object>>.List
Pid int The Player ID
리턴 object>>.List

GetTablesVersion() 보호된 메소드

Fetches the current tables version
We have this in a seperate method because the table migration fetches the the version everytime an update is applied
protected GetTablesVersion ( ) : void
리턴 void

MigrateTables() 공개 메소드

If there is any table updates that need to be applied, calling this method will apply each update until the current database version is up to date
public MigrateTables ( ) : void
리턴 void

MigrateTables() 공개 메소드

If there is any table updates that need to be applied, calling this method will apply each update until the specifed update version
public MigrateTables ( System.Version ToVersion ) : void
ToVersion System.Version
리턴 void

PlayerExists() 공개 메소드

Returns whether or not a player exists in the "player" table
public PlayerExists ( int Pid ) : bool
Pid int The Player ID
리턴 bool

StatsDatabase() 공개 메소드

Creates a connection to the Stats Database
public StatsDatabase ( ) : System
리턴 System

Truncate() 공개 메소드

Clears all stats data from the stats database
public Truncate ( ) : void
리턴 void

프로퍼티 상세

LatestVersion 공개적으로 정적으로 프로퍼티

Indicates the most up to date database table version
public static Version,System LatestVersion
리턴 System.Version

PlayerTables 공개적으로 정적으로 프로퍼티

An array of Table names that contain only player data
public static string[] PlayerTables
리턴 string[]

StatsTables 공개적으로 정적으로 프로퍼티

An array of all Stats specific table names
public static string[] StatsTables
리턴 string[]

VersionList 공개적으로 정적으로 프로퍼티

An array of all table versions that we can migrate from if updating from an old database tables version
public static Version[],System VersionList
리턴 System.Version[]