C# 클래스 Nagru___Manga_Organizer.SQL

Controls access to the database
파일 보기 프로젝트 열기: Nagru/Manga-Organizer 1 사용 예제들

공개 메소드들

메소드 설명
BeginTransaction ( ) : int

Starts a new transaction USE WITH CAUTION: SQLite DOES NOT SUPPORT MULTIPLE TRANSACTIONS

CleanUpArtists ( ) : int

Deletes all unused artists from the DB

CleanUpReferences ( ) : int

Re-creates the MangaTag table to remove PK value gaps

CleanUpTags ( ) : int

Deletes all unused tags from the DB

CommitTransaction ( ) : int

Commits the current transaction

Connect ( ) : bool

Opens a connection to the database and imports any previous Manga DB's if possible

ContainsEntry ( string Artist, string Title ) : bool

Returns whether the entry exists in the DB

DeleteManga ( int mangaID ) : bool

Deletes an entry from the database

DeleteTag ( string TagText ) : int

Deletes a tag based on the text passed in

Disconnect ( bool Recycle = false ) : void

Vacuum's the DB and closes the connection

GetAllManga ( string SearchText = null, int MangaID = -1 ) : DataTable

Returns the details of every manga in the database

GetArtists ( ) : string[]

Returns all the artists in the database

GetDefaultType ( ) : string

Returns the default manga category

GetLogContents ( ) : DataTable

Returns the details of everything logged so far

GetManga ( int mangaID ) : DataTable

Returns the full details of a specified manga

GetMangaDetail ( int mangaID, Manga Column ) : string

Returns a single detail of a specified manga

GetMangaTitle ( int mangaID ) : string

Returns the EH formatted title of a Manga

GetSetting ( Setting DBSetting ) : object

Returns a setting from the DB

GetTags ( ) : string[]

Returns all the tags in the database

GetThumbnail ( int MangaID ) : Image

Returns the manga's thumbnail

GetTypes ( ) : string[]

Returns all the manga types in the database

HasThumbnail ( int MangaID ) : bool

Returns true if the entry has a thumbnail for it

IsConnected ( ) : bool

Returns whether or not the DB connection is currently open

LogMessage ( Exception exception, EventType eventType, object Source = null ) : bool

Logs exception details to the DB to support future debugging

LogMessage ( string LogMessage, EventType eventType, object Source = null ) : bool

Logs exception details to the DB to support future debugging

RollbackTransaction ( ) : int

Rollbacks the current transaction

SaveManga ( string Artist, string Title, System.DateTime PublishedDate, string Tags = null, string Location = null, decimal Pages, int PageReadCount = -1, string Type = null, decimal Rating, string Description = null, string URL = null, bool ReadManga = false, int MangaID = -1 ) : int

Insert or updates a manga

SaveReadProgress ( int MangaID, int PageReadCount = -1 ) : int

Stores the last page read of a manga and updates it's read status

SaveThumbnail ( int MangaID, Image image ) : bool

Saves a thumbnail image to the database

UpdateSetting ( Setting DBSetting, object setting ) : bool

Update the indicated setting

VacuumDatabase ( ) : bool

Runs the vacuum command on the database to reduce filesize if possible

비공개 메소드들

메소드 설명
SQL ( ) : System

Instantiates the non-static sqlBase that holds the DB connection

메소드 상세

BeginTransaction() 공개 정적인 메소드

Starts a new transaction USE WITH CAUTION: SQLite DOES NOT SUPPORT MULTIPLE TRANSACTIONS
public static BeginTransaction ( ) : int
리턴 int

CleanUpArtists() 공개 정적인 메소드

Deletes all unused artists from the DB
public static CleanUpArtists ( ) : int
리턴 int

CleanUpReferences() 공개 정적인 메소드

Re-creates the MangaTag table to remove PK value gaps
public static CleanUpReferences ( ) : int
리턴 int

CleanUpTags() 공개 정적인 메소드

Deletes all unused tags from the DB
public static CleanUpTags ( ) : int
리턴 int

CommitTransaction() 공개 정적인 메소드

Commits the current transaction
public static CommitTransaction ( ) : int
리턴 int

Connect() 공개 정적인 메소드

Opens a connection to the database and imports any previous Manga DB's if possible
public static Connect ( ) : bool
리턴 bool

ContainsEntry() 공개 정적인 메소드

Returns whether the entry exists in the DB
public static ContainsEntry ( string Artist, string Title ) : bool
Artist string The artist's name
Title string The title of the maga
리턴 bool

DeleteManga() 공개 정적인 메소드

Deletes an entry from the database
public static DeleteManga ( int mangaID ) : bool
mangaID int The ID of the record to be deleted
리턴 bool

DeleteTag() 공개 정적인 메소드

Deletes a tag based on the text passed in
public static DeleteTag ( string TagText ) : int
TagText string The tag(s) to delete
리턴 int

Disconnect() 공개 정적인 메소드

Vacuum's the DB and closes the connection
public static Disconnect ( bool Recycle = false ) : void
Recycle bool
리턴 void

GetAllManga() 공개 정적인 메소드

Returns the details of every manga in the database
public static GetAllManga ( string SearchText = null, int MangaID = -1 ) : DataTable
SearchText string The user search parameters to compare against
MangaID int
리턴 System.Data.DataTable

GetArtists() 공개 정적인 메소드

Returns all the artists in the database
public static GetArtists ( ) : string[]
리턴 string[]

GetDefaultType() 공개 정적인 메소드

Returns the default manga category
public static GetDefaultType ( ) : string
리턴 string

GetLogContents() 공개 정적인 메소드

Returns the details of everything logged so far
public static GetLogContents ( ) : DataTable
리턴 System.Data.DataTable

GetManga() 공개 정적인 메소드

Returns the full details of a specified manga
public static GetManga ( int mangaID ) : DataTable
mangaID int The ID of the record
리턴 System.Data.DataTable

GetMangaDetail() 공개 정적인 메소드

Returns a single detail of a specified manga
public static GetMangaDetail ( int mangaID, Manga Column ) : string
mangaID int The ID of the record
Column Manga
리턴 string

GetMangaTitle() 공개 정적인 메소드

Returns the EH formatted title of a Manga
public static GetMangaTitle ( int mangaID ) : string
mangaID int The ID of the record to access
리턴 string

GetSetting() 공개 정적인 메소드

Returns a setting from the DB
public static GetSetting ( Setting DBSetting ) : object
DBSetting Setting
리턴 object

GetTags() 공개 정적인 메소드

Returns all the tags in the database
public static GetTags ( ) : string[]
리턴 string[]

GetThumbnail() 공개 정적인 메소드

Returns the manga's thumbnail
public static GetThumbnail ( int MangaID ) : Image
MangaID int
리턴 Image

GetTypes() 공개 정적인 메소드

Returns all the manga types in the database
public static GetTypes ( ) : string[]
리턴 string[]

HasThumbnail() 공개 정적인 메소드

Returns true if the entry has a thumbnail for it
public static HasThumbnail ( int MangaID ) : bool
MangaID int The ID of the record
리턴 bool

IsConnected() 공개 정적인 메소드

Returns whether or not the DB connection is currently open
public static IsConnected ( ) : bool
리턴 bool

LogMessage() 공개 정적인 메소드

Logs exception details to the DB to support future debugging
public static LogMessage ( Exception exception, EventType eventType, object Source = null ) : bool
exception System.Exception The exception that occurred
eventType EventType The type of event being logged
Source object
리턴 bool

LogMessage() 공개 정적인 메소드

Logs exception details to the DB to support future debugging
public static LogMessage ( string LogMessage, EventType eventType, object Source = null ) : bool
LogMessage string Coder explanation of the situation
eventType EventType The type of event being logged
Source object The object that caused the error
리턴 bool

RollbackTransaction() 공개 정적인 메소드

Rollbacks the current transaction
public static RollbackTransaction ( ) : int
리턴 int

SaveManga() 공개 정적인 메소드

Insert or updates a manga
public static SaveManga ( string Artist, string Title, System.DateTime PublishedDate, string Tags = null, string Location = null, decimal Pages, int PageReadCount = -1, string Type = null, decimal Rating, string Description = null, string URL = null, bool ReadManga = false, int MangaID = -1 ) : int
Artist string The name of the artist
Title string The title of the manga
PublishedDate System.DateTime The date the manga was published to EH
Tags string The comma-delimited tags
Location string The local filepath
Pages decimal The number of pages
PageReadCount int The last page read
Type string The type of the manga
Rating decimal The decimal rating
Description string User comments
URL string The source URL of the gallery
ReadManga bool Whether the manga has been read
MangaID int If passed through, attempts to update the indicated record
리턴 int

SaveReadProgress() 공개 정적인 메소드

Stores the last page read of a manga and updates it's read status
public static SaveReadProgress ( int MangaID, int PageReadCount = -1 ) : int
MangaID int The ID of the manga to update
PageReadCount int The last page read
리턴 int

SaveThumbnail() 공개 정적인 메소드

Saves a thumbnail image to the database
public static SaveThumbnail ( int MangaID, Image image ) : bool
MangaID int The manga the image is for
image Image The cover thumbnail to save
리턴 bool

UpdateSetting() 공개 정적인 메소드

Update the indicated setting
public static UpdateSetting ( Setting DBSetting, object setting ) : bool
DBSetting Setting The name of the setting to update
setting object The new value
리턴 bool

VacuumDatabase() 공개 정적인 메소드

Runs the vacuum command on the database to reduce filesize if possible
public static VacuumDatabase ( ) : bool
리턴 bool