Antura  1.1.0
Antura.Database.DBService Class Reference

Service that connects to SQLite. we are using Mysqlite from https://github.com/codecoding/SQLite4Unity3d and engine from https://github.com/praeclarum/sqlite-net More...

Classes

class  EnumContainerData
 

Public Member Functions

void GenerateTables (bool create, bool drop)
 
void CreateAllTables ()
 
void DropAllTables ()
 
void RecreateAllTables ()
 
void MigrateAllTables ()
 
void ForceFileDeletion ()
 
void Insert< T > (T data)
 
void InsertOrReplace< T > (T data)
 
void InsertAll< T > (IEnumerable< T > objects)
 
void InsertAllObjects (IEnumerable objects)
 
void InsertOrReplaceAll< T > (IEnumerable< T > objects)
 
void DeleteAll< T > ()
 
LogInfoData FindLogInfoDataById (string target_id)
 
PlayerProfileData GetPlayerProfileData ()
 
List< T > FindAll< T > ()
 
List< T > FindAll< T > (Expression< Func< T, bool >> expression)
 
List< T > Query< T > (string customQuery)
 
List< object > Query (Type t, string customQuery)
 
string GetTableName< T > ()
 
List< object > FindByQueryCustom (TableMapping mapping, string customQuery)
 
TableQuery< T > CreateQuery< T > ()
 
void CloseConnection ()
 
void GenerateStaticExportTables ()
 
void ExportEnum< T > ()
 

Static Public Member Functions

static string GetDatabaseFilePath (string fileName, string dirName)
 
static string GetDatabaseDirectoryPath (string dirName)
 
static DBService OpenFromFileName (bool createIfNotFound, string fileName, string dirName=AppConstants.DbPlayersFolder)
 
static DBService OpenFromFilePath (bool createIfNotFound, string filePath)
 
static DBService OpenFromPlayerUUID (bool createIfNotFound, string playerUuid, string fileName="", string dirName=AppConstants.DbPlayersFolder)
 
static DBService ExportAndOpenFromPlayerUUID (string playerUuid, string fileName="", string dirName=AppConstants.DbPlayersFolder)
 
static void ExportFromPlayerUUID (string playerUuid, string fileName, string dirName)
 

Detailed Description

Service that connects to SQLite. we are using Mysqlite from https://github.com/codecoding/SQLite4Unity3d and engine from https://github.com/praeclarum/sqlite-net

Member Function Documentation

◆ CloseConnection()

void Antura.Database.DBService.CloseConnection ( )

◆ CreateAllTables()

void Antura.Database.DBService.CreateAllTables ( )

◆ CreateQuery< T >()

TableQuery<T> Antura.Database.DBService.CreateQuery< T > ( )
Type Constraints
T :IData 
T :new() 

◆ DeleteAll< T >()

void Antura.Database.DBService.DeleteAll< T > ( )
Type Constraints
T :IData 
T :new() 

◆ DropAllTables()

void Antura.Database.DBService.DropAllTables ( )

◆ ExportAndOpenFromPlayerUUID()

static DBService Antura.Database.DBService.ExportAndOpenFromPlayerUUID ( string  playerUuid,
string  fileName = "",
string  dirName = AppConstants.DbPlayersFolder 
)
static

◆ ExportEnum< T >()

void Antura.Database.DBService.ExportEnum< T > ( )
Type Constraints
T :struct 
T :IConvertible 

◆ ExportFromPlayerUUID()

static void Antura.Database.DBService.ExportFromPlayerUUID ( string  playerUuid,
string  fileName,
string  dirName 
)
static

◆ FindAll< T >() [1/2]

List<T> Antura.Database.DBService.FindAll< T > ( )
Type Constraints
T :IData 
T :new() 

◆ FindAll< T >() [2/2]

List<T> Antura.Database.DBService.FindAll< T > ( Expression< Func< T, bool >>  expression)
Type Constraints
T :IData 
T :new() 

◆ FindByQueryCustom()

List<object> Antura.Database.DBService.FindByQueryCustom ( TableMapping  mapping,
string  customQuery 
)

◆ FindLogInfoDataById()

LogInfoData Antura.Database.DBService.FindLogInfoDataById ( string  target_id)

◆ ForceFileDeletion()

void Antura.Database.DBService.ForceFileDeletion ( )

◆ GenerateStaticExportTables()

void Antura.Database.DBService.GenerateStaticExportTables ( )

◆ GenerateTables()

void Antura.Database.DBService.GenerateTables ( bool  create,
bool  drop 
)

◆ GetDatabaseDirectoryPath()

static string Antura.Database.DBService.GetDatabaseDirectoryPath ( string  dirName)
static

◆ GetDatabaseFilePath()

static string Antura.Database.DBService.GetDatabaseFilePath ( string  fileName,
string  dirName 
)
static

◆ GetPlayerProfileData()

PlayerProfileData Antura.Database.DBService.GetPlayerProfileData ( )

◆ GetTableName< T >()

string Antura.Database.DBService.GetTableName< T > ( )

◆ Insert< T >()

void Antura.Database.DBService.Insert< T > ( data)
Type Constraints
T :IData 
T :new() 

◆ InsertAll< T >()

void Antura.Database.DBService.InsertAll< T > ( IEnumerable< T >  objects)
Type Constraints
T :IData 
T :new() 

◆ InsertAllObjects()

void Antura.Database.DBService.InsertAllObjects ( IEnumerable  objects)

◆ InsertOrReplace< T >()

void Antura.Database.DBService.InsertOrReplace< T > ( data)
Type Constraints
T :IData 
T :new() 

◆ InsertOrReplaceAll< T >()

void Antura.Database.DBService.InsertOrReplaceAll< T > ( IEnumerable< T >  objects)
Type Constraints
T :IData 
T :new() 

◆ MigrateAllTables()

void Antura.Database.DBService.MigrateAllTables ( )

◆ OpenFromFileName()

static DBService Antura.Database.DBService.OpenFromFileName ( bool  createIfNotFound,
string  fileName,
string  dirName = AppConstants.DbPlayersFolder 
)
static

◆ OpenFromFilePath()

static DBService Antura.Database.DBService.OpenFromFilePath ( bool  createIfNotFound,
string  filePath 
)
static

◆ OpenFromPlayerUUID()

static DBService Antura.Database.DBService.OpenFromPlayerUUID ( bool  createIfNotFound,
string  playerUuid,
string  fileName = "",
string  dirName = AppConstants.DbPlayersFolder 
)
static

◆ Query()

List<object> Antura.Database.DBService.Query ( Type  t,
string  customQuery 
)

◆ Query< T >()

List<T> Antura.Database.DBService.Query< T > ( string  customQuery)
Type Constraints
T :IData 
T :new() 

◆ RecreateAllTables()

void Antura.Database.DBService.RecreateAllTables ( )

The documentation for this class was generated from the following file: