This class encapsulates database access for ALFA CLR scripts that uses an independent MySQL connection. N.B. Most code should NOT use a MySQLDatabase object, because doing so may monopolize a valuable connection pool connection. Use ALFA.ALFADatabase instead for most SQL accesses UNLESS they must be done from a dedicated thread context, like the ACR_ServerCommunicator GameWorldManager query thread.
Inheritance: IALFADatabase, IDisposable
 /// <summary>
 /// Create a new database connection object.
 /// </summary>
 /// <param name="ConnectionString">Supplies the connection string.
 /// </param>
 /// <param name="Flags">Supplies control flags.</param>
 private ScriptDatabaseConnection(string ConnectionString, ScriptDatabaseConnectionFlags Flags)
 {
     Database = new ALFA.MySQLDatabase(ConnectionString);
     this.Flags = Flags;
 }
 /// <summary>
 /// Create a new database connection object.
 /// </summary>
 /// <param name="ConnectionString">Supplies the connection string.
 /// </param>
 /// <param name="Flags">Supplies control flags.</param>
 private ScriptDatabaseConnection(string ConnectionString, ScriptDatabaseConnectionFlags Flags)
 {
     Database = new ALFA.MySQLDatabase(ConnectionString, Flags.HasFlag(ScriptDatabaseConnectionFlags.StandardConnection));
     this.Flags = Flags;
 }
Exemple #3
0
 /// <summary>
 /// Create a new database connection object.
 /// </summary>
 /// <param name="ConnectionString">Supplies the connection string.
 /// </param>
 /// <param name="Flags">Supplies control flags.</param>
 private ScriptDatabaseConnection(string ConnectionString, ScriptDatabaseConnectionFlags Flags)
 {
     Database   = new ALFA.MySQLDatabase(ConnectionString, Flags.HasFlag(ScriptDatabaseConnectionFlags.StandardConnection));
     this.Flags = Flags;
 }