/// <summary> /// Command factory. /// </summary> /// <returns>An empty instance of <see cref="MySqlCommand"/>.</returns> protected override IDbCommand /*!*/ CreateCommand() { IDbCommand command = connection.CreateCommand(); MySqlLocalConfig local = MySqlConfiguration.GetLocal(_context); if (local.DefaultCommandTimeout >= 0) { command.CommandTimeout = local.DefaultCommandTimeout; } return(command); }
/// <summary> /// Called by the Core after the library is loaded. /// </summary> protected override void Loaded(PhpLibraryAttribute assemblyAttribute, LibraryConfigStore configStore) { base.Loaded(assemblyAttribute, configStore); singleton = this; MySqlConfiguration.RegisterLegacyOptions(); }