C# Class wmib.Database

Database
Show file Open project: benapetr/wikimedia-bot Class Usage Examples

Public Properties

Property Type Description
DatabaseLock object
ErrorBuffer string

Public Methods

Method Description
CacheSize ( ) : int
Commit ( ) : void
Connect ( ) : void
Delete ( string table, string query ) : int
Disconnect ( ) : void
EscapeInput ( string data ) : string
ExecuteNonQuery ( string sql, List bind_var = null ) : void
InsertRow ( string table, Row row ) : bool
Rollback ( ) : void
Select ( string sql, List bind_var = null ) : List>

Select a data from db

Select ( string table, string rows, string query ) : List>

Select a data from db

Method Details

CacheSize() public method

public CacheSize ( ) : int
return int

Commit() public method

public Commit ( ) : void
return void

Connect() public method

public Connect ( ) : void
return void

Delete() public method

public Delete ( string table, string query ) : int
table string
query string
return int

Disconnect() public method

public Disconnect ( ) : void
return void

EscapeInput() public method

public EscapeInput ( string data ) : string
data string
return string

ExecuteNonQuery() public method

public ExecuteNonQuery ( string sql, List bind_var = null ) : void
sql string
bind_var List
return void

InsertRow() public method

public InsertRow ( string table, Row row ) : bool
table string
row Row
return bool

Rollback() public method

public Rollback ( ) : void
return void

Select() public method

Select a data from db
public Select ( string sql, List bind_var = null ) : List>
sql string
bind_var List
return List>

Select() public method

Select a data from db
public Select ( string table, string rows, string query ) : List>
table string name of table
rows string Rows separated by comma
query string Conditions
return List>

Property Details

DatabaseLock public property

This lock should be locked in case you are working with database to prevent other threads from working with it
public object DatabaseLock
return object

ErrorBuffer public property

Last db error is stored here
public string ErrorBuffer
return string