C# Class afung.MangaWeb3.Server.Database

Show file Open project: a-fung/MangaWeb3

Public Methods

Method Description
BuildWhereClauseOr ( string field, IEnumerable values ) : string
Clear ( string table ) : void
Delete ( string table, string where ) : void
ExecuteSql ( string sql ) : void
GetConnection ( string server, int port, string username, string password, string database ) : MySqlConnection
GetDistinctStringValues ( string table, string field ) : string[]
GetDistinctStringValues ( string table, string field, string where ) : string[]
Insert ( string table, object>.Dictionary data ) : void
InsertAndReturnId ( string table, object>.Dictionary data ) : int
Quote ( string str ) : string
Replace ( string table, object>.Dictionary data ) : void
Select ( string table ) : object>[].Dictionary
Select ( string table, string where ) : object>[].Dictionary
Select ( string table, string where, string order ) : object>[].Dictionary
Select ( string table, string where, string order, string limit ) : object>[].Dictionary
Select ( string table, string where, string order, string limit, string fields ) : object>[].Dictionary
Update ( string table, object>.Dictionary data, string where ) : void
Update ( string table, object>.Dictionary data, string where, string limit ) : void

Private Methods

Method Description
DefaultConnection ( ) : MySqlConnection
InsertOrReplace ( string method, string table, object>.Dictionary data ) : void
LastInsertId ( ) : int

Method Details

BuildWhereClauseOr() public static method

public static BuildWhereClauseOr ( string field, IEnumerable values ) : string
field string
values IEnumerable
return string

Clear() public static method

public static Clear ( string table ) : void
table string
return void

Delete() public static method

public static Delete ( string table, string where ) : void
table string
where string
return void

ExecuteSql() public static method

public static ExecuteSql ( string sql ) : void
sql string
return void

GetConnection() public static method

public static GetConnection ( string server, int port, string username, string password, string database ) : MySqlConnection
server string
port int
username string
password string
database string
return MySql.Data.MySqlClient.MySqlConnection

GetDistinctStringValues() public static method

public static GetDistinctStringValues ( string table, string field ) : string[]
table string
field string
return string[]

GetDistinctStringValues() public static method

public static GetDistinctStringValues ( string table, string field, string where ) : string[]
table string
field string
where string
return string[]

Insert() public static method

public static Insert ( string table, object>.Dictionary data ) : void
table string
data object>.Dictionary
return void

InsertAndReturnId() public static method

public static InsertAndReturnId ( string table, object>.Dictionary data ) : int
table string
data object>.Dictionary
return int

Quote() public static method

public static Quote ( string str ) : string
str string
return string

Replace() public static method

public static Replace ( string table, object>.Dictionary data ) : void
table string
data object>.Dictionary
return void

Select() public static method

public static Select ( string table ) : object>[].Dictionary
table string
return object>[].Dictionary

Select() public static method

public static Select ( string table, string where ) : object>[].Dictionary
table string
where string
return object>[].Dictionary

Select() public static method

public static Select ( string table, string where, string order ) : object>[].Dictionary
table string
where string
order string
return object>[].Dictionary

Select() public static method

public static Select ( string table, string where, string order, string limit ) : object>[].Dictionary
table string
where string
order string
limit string
return object>[].Dictionary

Select() public static method

public static Select ( string table, string where, string order, string limit, string fields ) : object>[].Dictionary
table string
where string
order string
limit string
fields string
return object>[].Dictionary

Update() public static method

public static Update ( string table, object>.Dictionary data, string where ) : void
table string
data object>.Dictionary
where string
return void

Update() public static method

public static Update ( string table, object>.Dictionary data, string where, string limit ) : void
table string
data object>.Dictionary
where string
limit string
return void