Rebornbuddy
Loading...
Searching...
No Matches
ff14bot.Managers.Database Class Reference
Inheritance diagram for ff14bot.Managers.Database:
SQLite.SQLiteConnection

Public Member Functions

 Database (string path, SQLiteOpenFlags openFlags=SQLiteOpenFlags.ReadOnly)
IEnumerable< T > All< T > ()
IEnumerable< PurifyDBResultAllPurifyDBResults ()
Dictionary< uint, T > AllAsDictionary< T > ()
IEnumerable< AuraResultAllAuras ()
IEnumerable< ZoneMappingAllZones ()
IEnumerable< EventNPCResultAllEventNPCs ()
IEnumerable< BattleNPCResultAllBattleNPCs ()
IEnumerable< SpellResultAllSpells ()
IEnumerable< PetSpellResultAllPetSpells ()
IEnumerable< GatheringResultAllGatheringResults ()
IEnumerable< ItemAllItems ()
void InsertSpells (IEnumerable< SpellResult > spells)
Public Member Functions inherited from SQLite.SQLiteConnection
 SQLiteConnection (string databasePath, bool storeDateTimeAsTicks=false)
 Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
 SQLiteConnection (string databasePath, SQLiteOpenFlags openFlags, bool storeDateTimeAsTicks=false)
 Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
void EnableLoadExtension (int onoff)
TableMapping GetMapping (Type type, CreateFlags createFlags=CreateFlags.None)
 Retrieves the mapping that is automatically generated for the given type.
TableMapping GetMapping< T > ()
 Retrieves the mapping that is automatically generated for the given type.
int DropTable< T > ()
 Executes a "drop table" on the database. This is non-recoverable.
int CreateTable< T > (CreateFlags createFlags=CreateFlags.None)
 Executes a "create table if not exists" on the database. It also creates any specified indexes on the columns of the table. It uses a schema automatically generated from the specified type. You can later access this schema by calling GetMapping.
int CreateTable (Type ty, CreateFlags createFlags=CreateFlags.None)
 Executes a "create table if not exists" on the database. It also creates any specified indexes on the columns of the table. It uses a schema automatically generated from the specified type. You can later access this schema by calling GetMapping.
int CreateIndex (string indexName, string tableName, string[] columnNames, bool unique=false)
 Creates an index for the specified table and columns.
int CreateIndex (string indexName, string tableName, string columnName, bool unique=false)
 Creates an index for the specified table and column.
int CreateIndex (string tableName, string columnName, bool unique=false)
 Creates an index for the specified table and column.
int CreateIndex (string tableName, string[] columnNames, bool unique=false)
 Creates an index for the specified table and columns.
void CreateIndex< T > (Expression< Func< T, object > > property, bool unique=false)
 Creates an index for the specified object property. e.g. CreateIndex<Client>(c => c.Name);.
List< ColumnInfoGetTableInfo (string tableName)
SQLiteCommand CreateCommand (string cmdText, params object[] ps)
 Creates a new SQLiteCommand given the command text with arguments. Place a '?' in the command text for each of the arguments.
int Execute (string query, params object[] args)
 Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text for each of the arguments and then executes that command. Use this method instead of Query when you don't expect rows back. Such cases include INSERTs, UPDATEs, and DELETEs. You can set the Trace or TimeExecution properties of the connection to profile execution.
ExecuteScalar< T > (string query, params object[] args)
List< T > Query< T > (string query, params object[] args)
 Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text for each of the arguments and then executes that command. It returns each row of the result using the mapping automatically generated for the given type.
IEnumerable< T > DeferredQuery< T > (string query, params object[] args)
 Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text for each of the arguments and then executes that command. It returns each row of the result using the mapping automatically generated for the given type.
List< object > Query (TableMapping map, string query, params object[] args)
 Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text for each of the arguments and then executes that command. It returns each row of the result using the specified mapping. This function is only used by libraries in order to query the database via introspection. It is normally not used.
IEnumerable< object > DeferredQuery (TableMapping map, string query, params object[] args)
 Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text for each of the arguments and then executes that command. It returns each row of the result using the specified mapping. This function is only used by libraries in order to query the database via introspection. It is normally not used.
TableQuery< T > Table< T > ()
 Returns a queryable interface to the table represented by the given type.
Get< T > (object pk)
 Attempts to retrieve an object with the given primary key from the table associated with the specified type. Use of this method requires that the given type have a designated PrimaryKey (using the PrimaryKeyAttribute).
Get< T > (Expression< Func< T, bool > > predicate)
 Attempts to retrieve the first object that matches the predicate from the table associated with the specified type.
Find< T > (object pk)
 Attempts to retrieve an object with the given primary key from the table associated with the specified type. Use of this method requires that the given type have a designated PrimaryKey (using the PrimaryKeyAttribute).
object Find (object pk, TableMapping map)
 Attempts to retrieve an object with the given primary key from the table associated with the specified type. Use of this method requires that the given type have a designated PrimaryKey (using the PrimaryKeyAttribute).
Find< T > (Expression< Func< T, bool > > predicate)
 Attempts to retrieve the first object that matches the predicate from the table associated with the specified type.
void BeginTransaction ()
 Begins a new transaction. Call Commit to end the transaction.
string SaveTransactionPoint ()
 Creates a savepoint in the database at the current point in the transaction timeline. Begins a new transaction if one is not in progress.
void Rollback ()
 Rolls back the transaction that was begun by BeginTransaction or SaveTransactionPoint.
void RollbackTo (string savepoint)
 Rolls back the savepoint created by BeginTransaction or SaveTransactionPoint.
void Release (string savepoint)
 Releases a savepoint returned from SaveTransactionPoint. Releasing a savepoint makes changes since that savepoint permanent if the savepoint began the transaction, or otherwise the changes are permanent pending a call to Commit.
void Commit ()
 Commits the transaction that was begun by BeginTransaction.
void RunInTransaction (Action action)
 Executes

Parameters
actionwithin a (possibly nested) transaction by wrapping it in a SAVEPOINT. If an exception occurs the whole transaction is rolled back, not just the current savepoint. The exception is rethrown.

int InsertAll (System.Collections.IEnumerable objects)
 Inserts all specified objects.
int InsertAll (System.Collections.IEnumerable objects, string extra)
 Inserts all specified objects.
int InsertAll (System.Collections.IEnumerable objects, Type objType)
 Inserts all specified objects.
int Insert (object obj)
 Inserts the given object and retrieves its auto incremented primary key if it has one.
int InsertOrReplace (object obj)
 Inserts the given object and retrieves its auto incremented primary key if it has one. If a UNIQUE constraint violation occurs with some pre-existing object, this function deletes the old object.
int Insert (object obj, Type objType)
 Inserts the given object and retrieves its auto incremented primary key if it has one.
int InsertOrReplace (object obj, Type objType)
 Inserts the given object and retrieves its auto incremented primary key if it has one. If a UNIQUE constraint violation occurs with some pre-existing object, this function deletes the old object.
int Insert (object obj, string extra)
 Inserts the given object and retrieves its auto incremented primary key if it has one.
int Insert (object obj, string extra, Type objType)
 Inserts the given object and retrieves its auto incremented primary key if it has one.
int Update (object obj)
 Updates all of the columns of a table using the specified object except for its primary key. The object is required to have a primary key.
int Update (object obj, Type objType)
 Updates all of the columns of a table using the specified object except for its primary key. The object is required to have a primary key.
int UpdateAll (System.Collections.IEnumerable objects)
 Updates all specified objects.
int Delete (object objectToDelete)
 Deletes the given object from the database using its primary key.
int Delete< T > (object primaryKey)
 Deletes the object with the specified primary key.
int DeleteAll< T > ()
 Deletes all the objects from the specified table. WARNING WARNING: Let me repeat. It deletes ALL the objects from the specified table. Do you really want to do that?
void Dispose ()
void Close ()

Additional Inherited Members

Protected Member Functions inherited from SQLite.SQLiteConnection
virtual SQLiteCommand NewCommand ()
 Creates a new SQLiteCommand. Can be overridden to provide a sub-class.
virtual void Dispose (bool disposing)
Properties inherited from SQLite.SQLiteConnection
Sqlite3DatabaseHandle Handle [get]
string DatabasePath [get]
bool TimeExecution [get, set]
bool Trace [get, set]
bool StoreDateTimeAsTicks [get]
TimeSpan BusyTimeout [get, set]
 Sets a busy handler to sleep the specified amount of time when a table is locked. The handler will sleep multiple times until a total time of BusyTimeout has accumulated.
IEnumerable< TableMappingTableMappings [get]
 Returns the mappings from types to tables that the connection currently understands.
bool IsInTransaction [get]
 Whether BeginTransaction has been called and the database is waiting for a Commit.
Events inherited from SQLite.SQLiteConnection
EventHandler< NotifyTableChangedEventArgsTableChanged

Constructor & Destructor Documentation

◆ Database()

ff14bot.Managers.Database.Database ( string path,
SQLiteOpenFlags openFlags = SQLiteOpenFlags::ReadOnly )

Member Function Documentation

◆ All< T >()

IEnumerable< T > ff14bot.Managers.Database.All< T > ( )
Type Constraints
T :LocalizeableResult 
T :new() 

◆ AllAsDictionary< T >()

Dictionary< uint, T > ff14bot.Managers.Database.AllAsDictionary< T > ( )
Type Constraints
T :LocalizeableResult 
T :new() 

◆ AllAuras()

IEnumerable< AuraResult > ff14bot.Managers.Database.AllAuras ( )

◆ AllBattleNPCs()

IEnumerable< BattleNPCResult > ff14bot.Managers.Database.AllBattleNPCs ( )

◆ AllEventNPCs()

IEnumerable< EventNPCResult > ff14bot.Managers.Database.AllEventNPCs ( )

◆ AllGatheringResults()

IEnumerable< GatheringResult > ff14bot.Managers.Database.AllGatheringResults ( )

◆ AllItems()

IEnumerable< Item > ff14bot.Managers.Database.AllItems ( )

◆ AllPetSpells()

IEnumerable< PetSpellResult > ff14bot.Managers.Database.AllPetSpells ( )

◆ AllPurifyDBResults()

IEnumerable< PurifyDBResult > ff14bot.Managers.Database.AllPurifyDBResults ( )

◆ AllSpells()

IEnumerable< SpellResult > ff14bot.Managers.Database.AllSpells ( )

◆ AllZones()

IEnumerable< ZoneMapping > ff14bot.Managers.Database.AllZones ( )

◆ InsertSpells()

void ff14bot.Managers.Database.InsertSpells ( IEnumerable< SpellResult > spells)