C# Class SQLiteDatabase, HDHomeRun_Stream_Builder

Datei anzeigen Open project: robnewton/HDHomeRun_Stream_Builder Class Usage Examples

Public Methods

Method Description
ClearDB ( ) : bool

Allows the programmer to easily delete all data from the DB.

ClearTable ( String table ) : bool

Allows the user to easily clear all data from a specific table.

Delete ( String tableName, String where ) : bool

Allows the programmer to easily delete rows from the DB.

ExecuteNonQuery ( SQLiteCommand command ) : int

Allows the programmer to interact with the database for purposes other than a query.

ExecuteNonQuery ( string sql ) : int

Allows the programmer to interact with the database for purposes other than a query.

ExecuteScalar ( string sql ) : string

Allows the programmer to retrieve single items from the DB.

GetDataTable ( string sql ) : DataTable

Allows the programmer to run a query against the Database.

Insert ( String tableName, String>.Dictionary data ) : bool

Allows the programmer to easily insert into the DB

SQLiteDatabase ( ) : System

Default Constructor for SQLiteDatabase Class.

SQLiteDatabase ( String>.Dictionary connectionOpts ) : System

Single Param Constructor for specifying advanced connection options.

SQLiteDatabase ( String inputFile ) : System

Single Param Constructor for specifying the DB file.

Update ( String tableName, String>.Dictionary data, String where ) : bool

Allows the programmer to easily update rows in the DB.

Method Details

ClearDB() public method

Allows the programmer to easily delete all data from the DB.
public ClearDB ( ) : bool
return bool

ClearTable() public method

Allows the user to easily clear all data from a specific table.
public ClearTable ( String table ) : bool
table String The name of the table to clear.
return bool

Delete() public method

Allows the programmer to easily delete rows from the DB.
public Delete ( String tableName, String where ) : bool
tableName String The table from which to delete.
where String The where clause for the delete.
return bool

ExecuteNonQuery() public method

Allows the programmer to interact with the database for purposes other than a query.
public ExecuteNonQuery ( SQLiteCommand command ) : int
command System.Data.SQLite.SQLiteCommand The SQLCommand to be run.
return int

ExecuteNonQuery() public method

Allows the programmer to interact with the database for purposes other than a query.
public ExecuteNonQuery ( string sql ) : int
sql string The SQL to be run.
return int

ExecuteScalar() public method

Allows the programmer to retrieve single items from the DB.
public ExecuteScalar ( string sql ) : string
sql string The query to run.
return string

GetDataTable() public method

Allows the programmer to run a query against the Database.
public GetDataTable ( string sql ) : DataTable
sql string The SQL to run
return DataTable

Insert() public method

Allows the programmer to easily insert into the DB
public Insert ( String tableName, String>.Dictionary data ) : bool
tableName String The table into which we insert the data.
data String>.Dictionary A dictionary containing the column names and data for the insert.
return bool

SQLiteDatabase() public method

Default Constructor for SQLiteDatabase Class.
public SQLiteDatabase ( ) : System
return System

SQLiteDatabase() public method

Single Param Constructor for specifying advanced connection options.
public SQLiteDatabase ( String>.Dictionary connectionOpts ) : System
connectionOpts String>.Dictionary A dictionary containing all desired options and their values
return System

SQLiteDatabase() public method

Single Param Constructor for specifying the DB file.
public SQLiteDatabase ( String inputFile ) : System
inputFile String The File containing the DB
return System

Update() public method

Allows the programmer to easily update rows in the DB.
public Update ( String tableName, String>.Dictionary data, String where ) : bool
tableName String The table to update.
data String>.Dictionary A dictionary containing Column names and their new values.
where String The where clause for the update statement.
return bool