C# Class Universe.DataManager.MySQL.MySQLDataLoader

Inheritance: DataManagerBase
ファイルを表示 Open project: Virtual-Universe/Virtual-Universe Class Usage Examples

Public Methods

Method Description
CloseDatabase ( DataReaderConnection connection ) : void
CloseDatabase ( MySqlConnection connection ) : void
ConCat ( string toConcat ) : string
ConnectToDatabase ( string connectionString, string migratorName, bool validateTables ) : void
Copy ( ) : IGenericData
CreateTable ( string table, ColumnDefinition columns, IndexDefinition indexDefinitions ) : void
Delete ( string table, QueryFilter queryFilter ) : bool
DeleteByTime ( string table, string key ) : bool
DropTable ( string tableName ) : void
ExecuteNonQuery ( string sql, object>.Dictionary parameters ) : void
ExecuteNonQuery ( string connStr, string sql, object>.Dictionary parameters ) : void
ExecuteNonQuery ( string connStr, string sql, object>.Dictionary parameters, bool spamConsole ) : void
ForceRenameTable ( string oldTableName, string newTableName ) : void
GetColumnTypeStringSymbol ( ColumnTypeDef coldef ) : string
GetColumnTypeStringSymbol ( ColumnTypes type ) : string
Insert ( string table, object>.Dictionary row ) : bool
Insert ( string table, object values ) : bool
Insert ( string table, object values, string updateKey, object updateValue ) : bool
InsertMultiple ( string table, List values ) : bool
InsertSelect ( string tableA, string fieldsA, string tableB, string valuesB ) : bool
Query ( string sql, object>.Dictionary parameters ) : IDataReader
Query ( string wantedValue, QueryTables tables, QueryFilter queryFilter, bool>.Dictionary sort, uint start, uint count ) : List
Query ( string wantedValue, string table, QueryFilter queryFilter, bool>.Dictionary sort, uint start, uint count ) : List
QueryData ( string whereClause, QueryTables tables, string wantedValue ) : DataReaderConnection
QueryData ( string whereClause, string table, string wantedValue ) : DataReaderConnection
QueryFullData ( string whereClause, QueryTables tables, string wantedValue ) : List
QueryFullData ( string whereClause, string table, string wantedValue ) : List
QueryNames ( string keyRow, object keyValue, QueryTables tables, string wantedValue ) : List>.Dictionary
QueryNames ( string keyRow, object keyValue, string table, string wantedValue ) : List>.Dictionary
Replace ( string table, object>.Dictionary row ) : bool
TableExists ( string table ) : bool
Update ( string table, object>.Dictionary values, int>.Dictionary incrementValue, QueryFilter queryFilter, uint start, uint count ) : bool
UpdateTable ( string table, ColumnDefinition columns, IndexDefinition indexDefinitions, string>.Dictionary renameColumns ) : void

Protected Methods

Method Description
CopyAllDataBetweenMatchingTables ( string sourceTableName, string destinationTableName, ColumnDefinition columnDefinitions, IndexDefinition indexDefinitions ) : void
ExtractColumnsFromTable ( string tableName ) : List
ExtractIndicesFromTable ( string tableName ) : IndexDefinition>.Dictionary

Private Methods

Method Description
AddValueToList ( Dictionary &dic, string key, string value ) : void
InsertOrReplace ( string table, object>.Dictionary row, bool insert ) : bool
Query2 ( string sqll, QueryFilter queryFilter, bool>.Dictionary sort, uint start, uint count ) : List
QueryData2 ( string query ) : IDataReader
QueryFullData2 ( string query ) : List
QueryNames2 ( string keyRow, object keyValue, string query ) : List>.Dictionary

Method Details

CloseDatabase() public method

public CloseDatabase ( DataReaderConnection connection ) : void
connection DataReaderConnection
return void

CloseDatabase() public method

public CloseDatabase ( MySqlConnection connection ) : void
connection MySql.Data.MySqlClient.MySqlConnection
return void

ConCat() public method

public ConCat ( string toConcat ) : string
toConcat string
return string

ConnectToDatabase() public method

public ConnectToDatabase ( string connectionString, string migratorName, bool validateTables ) : void
connectionString string
migratorName string
validateTables bool
return void

Copy() public method

public Copy ( ) : IGenericData
return IGenericData

CopyAllDataBetweenMatchingTables() protected method

protected CopyAllDataBetweenMatchingTables ( string sourceTableName, string destinationTableName, ColumnDefinition columnDefinitions, IndexDefinition indexDefinitions ) : void
sourceTableName string
destinationTableName string
columnDefinitions Universe.Framework.Utilities.ColumnDefinition
indexDefinitions Universe.Framework.Utilities.IndexDefinition
return void

CreateTable() public method

public CreateTable ( string table, ColumnDefinition columns, IndexDefinition indexDefinitions ) : void
table string
columns Universe.Framework.Utilities.ColumnDefinition
indexDefinitions Universe.Framework.Utilities.IndexDefinition
return void

Delete() public method

public Delete ( string table, QueryFilter queryFilter ) : bool
table string
queryFilter QueryFilter
return bool

DeleteByTime() public method

public DeleteByTime ( string table, string key ) : bool
table string
key string
return bool

DropTable() public method

public DropTable ( string tableName ) : void
tableName string
return void

ExecuteNonQuery() public method

public ExecuteNonQuery ( string sql, object>.Dictionary parameters ) : void
sql string
parameters object>.Dictionary
return void

ExecuteNonQuery() public method

public ExecuteNonQuery ( string connStr, string sql, object>.Dictionary parameters ) : void
connStr string
sql string
parameters object>.Dictionary
return void

ExecuteNonQuery() public method

public ExecuteNonQuery ( string connStr, string sql, object>.Dictionary parameters, bool spamConsole ) : void
connStr string
sql string
parameters object>.Dictionary
spamConsole bool
return void

ExtractColumnsFromTable() protected method

protected ExtractColumnsFromTable ( string tableName ) : List
tableName string
return List

ExtractIndicesFromTable() protected method

protected ExtractIndicesFromTable ( string tableName ) : IndexDefinition>.Dictionary
tableName string
return IndexDefinition>.Dictionary

ForceRenameTable() public method

public ForceRenameTable ( string oldTableName, string newTableName ) : void
oldTableName string
newTableName string
return void

GetColumnTypeStringSymbol() public method

public GetColumnTypeStringSymbol ( ColumnTypeDef coldef ) : string
coldef Universe.Framework.Utilities.ColumnTypeDef
return string

GetColumnTypeStringSymbol() public method

public GetColumnTypeStringSymbol ( ColumnTypes type ) : string
type ColumnTypes
return string

Insert() public method

public Insert ( string table, object>.Dictionary row ) : bool
table string
row object>.Dictionary
return bool

Insert() public method

public Insert ( string table, object values ) : bool
table string
values object
return bool

Insert() public method

public Insert ( string table, object values, string updateKey, object updateValue ) : bool
table string
values object
updateKey string
updateValue object
return bool

InsertMultiple() public method

public InsertMultiple ( string table, List values ) : bool
table string
values List
return bool

InsertSelect() public method

public InsertSelect ( string tableA, string fieldsA, string tableB, string valuesB ) : bool
tableA string
fieldsA string
tableB string
valuesB string
return bool

Query() public method

public Query ( string sql, object>.Dictionary parameters ) : IDataReader
sql string
parameters object>.Dictionary
return IDataReader

Query() public method

public Query ( string wantedValue, QueryTables tables, QueryFilter queryFilter, bool>.Dictionary sort, uint start, uint count ) : List
wantedValue string
tables QueryTables
queryFilter QueryFilter
sort bool>.Dictionary
start uint
count uint
return List

Query() public method

public Query ( string wantedValue, string table, QueryFilter queryFilter, bool>.Dictionary sort, uint start, uint count ) : List
wantedValue string
table string
queryFilter QueryFilter
sort bool>.Dictionary
start uint
count uint
return List

QueryData() public method

public QueryData ( string whereClause, QueryTables tables, string wantedValue ) : DataReaderConnection
whereClause string
tables QueryTables
wantedValue string
return DataReaderConnection

QueryData() public method

public QueryData ( string whereClause, string table, string wantedValue ) : DataReaderConnection
whereClause string
table string
wantedValue string
return DataReaderConnection

QueryFullData() public method

public QueryFullData ( string whereClause, QueryTables tables, string wantedValue ) : List
whereClause string
tables QueryTables
wantedValue string
return List

QueryFullData() public method

public QueryFullData ( string whereClause, string table, string wantedValue ) : List
whereClause string
table string
wantedValue string
return List

QueryNames() public method

public QueryNames ( string keyRow, object keyValue, QueryTables tables, string wantedValue ) : List>.Dictionary
keyRow string
keyValue object
tables QueryTables
wantedValue string
return List>.Dictionary

QueryNames() public method

public QueryNames ( string keyRow, object keyValue, string table, string wantedValue ) : List>.Dictionary
keyRow string
keyValue object
table string
wantedValue string
return List>.Dictionary

Replace() public method

public Replace ( string table, object>.Dictionary row ) : bool
table string
row object>.Dictionary
return bool

TableExists() public method

public TableExists ( string table ) : bool
table string
return bool

Update() public method

public Update ( string table, object>.Dictionary values, int>.Dictionary incrementValue, QueryFilter queryFilter, uint start, uint count ) : bool
table string
values object>.Dictionary
incrementValue int>.Dictionary
queryFilter QueryFilter
start uint
count uint
return bool

UpdateTable() public method

public UpdateTable ( string table, ColumnDefinition columns, IndexDefinition indexDefinitions, string>.Dictionary renameColumns ) : void
table string
columns Universe.Framework.Utilities.ColumnDefinition
indexDefinitions Universe.Framework.Utilities.IndexDefinition
renameColumns string>.Dictionary
return void