C# Class Nagru___Manga_Organizer.SQL.SQLBase

Holds the connection object and provides the 'base' functionality of the SQL implementation
Inheritance: IDisposable
Mostra file Open project: Nagru/Manga-Organizer

Private Properties

Property Type Description
BackupDB void
BeginTransaction int
Cleanse string
Close void
Connect void
CreateDatabase void
EndTransaction int
ExecuteNonQuery int
ExecuteQuery System.Data.DataTable
HandledDisconnect bool
NewParameter System.Data.SQLite.SQLiteParameter
SQLBase System
UpdateVersion void

Public Methods

Method Description
Dispose ( ) : void

Public implementation of Dispose

Protected Methods

Method Description
Dispose ( bool Disposing ) : void

Protected implementation of Dispose

Private Methods

Method Description
BackupDB ( ) : void

Creates a backup of the database

BeginTransaction ( bool SetGlobal = false ) : int

Begins a transaction. NOTE: SQLite ONLY SUPPORTS ONE TRANSACTION AT A TIME

Cleanse ( string sRaw ) : string

Removes SQl characters from raw strings. Should be removed at some point in favor of parameters.

Close ( ) : void

Closes the connection to the database

Connect ( ) : void

Establishes a connection with the database or, if one is not found, create a new instance

CreateDatabase ( ) : void

Creates the tables and triggers in the new DB

EndTransaction ( bool Commit = true, bool EndGlobal = false ) : int

Ends the current transaction.

ExecuteNonQuery ( string CommandText ) : int

Wrapper around SQLite's ExecuteNonQuery for convenience

ExecuteQuery ( string CommandText ) : DataTable

Wrapper around SQLite's ExecuteQuery for convenience

HandledDisconnect ( ) : bool

Displays an error if the connection is lost. Used to wrap the base access functions to prevent possible hard errors.

NewParameter ( string ParameterName, DbType dbType, object value ) : SQLiteParameter

Wrapper around SQLiteParameter for convenience

SQLBase ( ) : System

Establish a DB connection when instantiated

UpdateVersion ( ) : void

Check if there are updates to the DB, and if so deploy them

Method Details

Dispose() public method

Public implementation of Dispose
public Dispose ( ) : void
return void

Dispose() protected method

Protected implementation of Dispose
protected Dispose ( bool Disposing ) : void
Disposing bool Whether we are calling the method from the Dispose override
return void