C# Class Nagru___Manga_Organizer.SQL.SQLAccess

Holds all the logic that updates, inserts, or queries information in the DB
Exibir arquivo Open project: Nagru/Manga-Organizer

Public Methods

Method Description
_EntryHasThumbnail ( int MangaID ) : bool

Convert's the manga's thumbnail blob into an image

_GetEntryThumbnail ( int MangaID ) : Image

Convert's the manga's thumbnail blob into an image

Private Methods

Method Description
ConvertToSQL ( bool>.Dictionary &dcTerms, int MangaID = -1 ) : string

Converts a dictionary of terms into a SQLite search expression

EntryExists ( string sArtist, string sTitle ) : bool

Check whether an entry already exists in the DB based on the Artist and Title

Obfuscate ( char RawChar ) : char

Preserve special characters by converting them into a different char type before parsing the string

Out ( string input ) : string

Parses ^/$ marks into SQL format

ParseSubTerms ( string rawTerms, bool>.Dictionary &parsedTerms ) : void

Turns a search string into a dictionary of categories and terms

SeparateTerms ( string &input ) : void

Turns pieces of a string into it's obfuscated version as necessary

Unobfuscate ( string &RawString ) : void

Removes obfuscation and prepares a string for use in the SQL command

_DeleteTag ( string asTags ) : int

Deletes a tag based on the text passed in

_DeleteUnusedArtists ( ) : int

Removes tags from the DB with no associated manga

_DeleteUnusedTags ( ) : int

Removes tags from the DB with no associated manga

_EntryDelete ( int iMangaID ) : int

Deletes an entry from the DB

_GetArtists ( ) : DataTable

Returns all the Artists in the database

_GetDefaultType ( ) : DataTable

Returns all the Types in the database

_GetEntries ( ) : DataTable

Returns all manga entries

_GetEntryDetails ( int mangaID ) : DataTable

Returns the full details of a specified manga

_GetSettings ( SQL dbSetting ) : object

Returns all the current settings values

_GetSystemEventLog ( ) : DataTable

Returns all records from the SystemEvent table

_GetTags ( ) : DataTable

Returns all the Tags in the database

_GetTypes ( ) : DataTable

Returns all the Types in the database

_LogSystemEvent ( string EventText, EventType eventType, string InnerException = null, string StackTrace = null, object Data = null ) : int

Logs exception details to the DB to support future debugging

_RecycleMangaTag ( ) : int

Re-creates the MangaTag table to normalize the PK values

_SaveEntry ( string sArtist, string sTitle, System.DateTime dtPubDate, string sTags = null, string sLoc = null, decimal iPages, int iPageReadCount = -1, string sType = null, decimal dRating, string sDesc = null, string sURL = null, bool bMangaRead = false, int iMangaID = -1 ) : int

Saves a manga record into the DB

_SaveMangaProgress ( int iMangaID, int iPageReadCount ) : int

Saves the last page read of a manga

_SaveMangaThumbnail ( int MangaID, byte asBytes ) : int

Saves an image as a byte blob

_Search ( string SearchTerms, int MangaID = -1 ) : DataTable

Parses search terms based on an EH-like scheme and returns all results in the DB that match

_UpdateSetting ( Setting DBSetting, object value ) : int

Updates a program setting

Method Details

_EntryHasThumbnail() public static method

Convert's the manga's thumbnail blob into an image
public static _EntryHasThumbnail ( int MangaID ) : bool
MangaID int
return bool

_GetEntryThumbnail() public static method

Convert's the manga's thumbnail blob into an image
public static _GetEntryThumbnail ( int MangaID ) : Image
MangaID int
return Image