Skip to content

Commit

Permalink
Merge branch 'merge/release/3.1-to-master' of https://github.com/dotn…
Browse files Browse the repository at this point in the history
…et-maestro-bot/EntityFrameworkCore into merge/release/3.1-to-master
  • Loading branch information
AndriySvyryd committed Nov 2, 2019
2 parents 1150fa6 + 70c8988 commit b9cc8b6
Show file tree
Hide file tree
Showing 107 changed files with 4,754 additions and 2,095 deletions.
7 changes: 6 additions & 1 deletion All.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ Licensed under the Apache License, Version 2.0. See License.txt in the project r
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsWrapperSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EXml_002ECodeStyle_002EFormatSettingsUpgrade_002EXmlMoveToCommonFormatterSettingsUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=annotatable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=composable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=doesnt/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=fallbacks/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=initializers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=keyless/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -207,10 +209,13 @@ Licensed under the Apache License, Version 2.0. See License.txt in the project r
<s:Boolean x:Key="/Default/UserDictionary/Words/=pushdown/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=remapper/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=requiredness/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=retriable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=shaper/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=spatialite/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=sproc/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=sqlite/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=subquery/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unignore/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=fixup/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=attacher/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/UserDictionary/Words/=attacher/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Xunit/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public static int ExecuteSqlCommand(
new RelationalCommandParameterObject(
GetFacadeDependencies(databaseFacade).RelationalConnection,
rawSqlCommand.ParameterValues,
null,
((IDatabaseFacadeDependenciesAccessor)databaseFacade).Context,
logger));
}
Expand Down Expand Up @@ -388,6 +389,7 @@ public static async Task<int> ExecuteSqlCommandAsync(
new RelationalCommandParameterObject(
facadeDependencies.RelationalConnection,
rawSqlCommand.ParameterValues,
null,
((IDatabaseFacadeDependenciesAccessor)databaseFacade).Context,
logger),
cancellationToken);
Expand Down Expand Up @@ -504,6 +506,7 @@ public static int ExecuteSqlRaw(
new RelationalCommandParameterObject(
facadeDependencies.RelationalConnection,
rawSqlCommand.ParameterValues,
null,
((IDatabaseFacadeDependenciesAccessor)databaseFacade).Context,
logger));
}
Expand Down Expand Up @@ -656,6 +659,7 @@ public static async Task<int> ExecuteSqlRawAsync(
new RelationalCommandParameterObject(
facadeDependencies.RelationalConnection,
rawSqlCommand.ParameterValues,
null,
((IDatabaseFacadeDependenciesAccessor)databaseFacade).Context,
logger),
cancellationToken);
Expand Down
10 changes: 7 additions & 3 deletions src/EFCore.Relational/Migrations/HistoryRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,15 @@ protected virtual string ProductVersionColumnName
/// <summary>
/// Checks whether or not the history table exists.
/// </summary>
/// <returns> <c>True</c> if the table already exists, <c>false</c> otherwise. </returns>
/// <returns> <c>true</c> if the table already exists, <c>false</c> otherwise. </returns>
public virtual bool Exists()
=> Dependencies.DatabaseCreator.Exists()
&& InterpretExistsResult(
Dependencies.RawSqlCommandBuilder.Build(ExistsSql).ExecuteScalar(
new RelationalCommandParameterObject(
Dependencies.Connection,
null,
null,
Dependencies.CurrentContext.Context,
Dependencies.CommandLogger)));

Expand All @@ -144,7 +145,7 @@ public virtual bool Exists()
/// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for the task to complete.</param>
/// <returns>
/// A task that represents the asynchronous operation. The task result contains
/// <c>True</c> if the table already exists, <c>false</c> otherwise.
/// <c>true</c> if the table already exists, <c>false</c> otherwise.
/// </returns>
public virtual async Task<bool> ExistsAsync(CancellationToken cancellationToken = default)
=> await Dependencies.DatabaseCreator.ExistsAsync(cancellationToken)
Expand All @@ -153,14 +154,15 @@ await Dependencies.RawSqlCommandBuilder.Build(ExistsSql).ExecuteScalarAsync(
new RelationalCommandParameterObject(
Dependencies.Connection,
null,
null,
Dependencies.CurrentContext.Context,
Dependencies.CommandLogger),
cancellationToken));

/// <summary>
/// Interprets the result of executing <see cref="ExistsSql" />.
/// </summary>
/// <returns>true if the table exists; otherwise, false.</returns>
/// <returns><c>true</c> if the table already exists, <c>false</c> otherwise.</returns>
protected abstract bool InterpretExistsResult([NotNull] object value);

/// <summary>
Expand Down Expand Up @@ -217,6 +219,7 @@ public virtual IReadOnlyList<HistoryRow> GetAppliedMigrations()
new RelationalCommandParameterObject(
Dependencies.Connection,
null,
null,
Dependencies.CurrentContext.Context,
Dependencies.CommandLogger)))
{
Expand Down Expand Up @@ -251,6 +254,7 @@ public virtual async Task<IReadOnlyList<HistoryRow>> GetAppliedMigrationsAsync(
new RelationalCommandParameterObject(
Dependencies.Connection,
null,
null,
Dependencies.CurrentContext.Context,
Dependencies.CommandLogger),
cancellationToken))
Expand Down
2 changes: 2 additions & 0 deletions src/EFCore.Relational/Migrations/Internal/Migrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public virtual void Migrate(string targetMigration = null)
new RelationalCommandParameterObject(
_connection,
null,
null,
_currentContext.Context,
_commandLogger));
}
Expand Down Expand Up @@ -154,6 +155,7 @@ await command.ExecuteNonQueryAsync(
new RelationalCommandParameterObject(
_connection,
null,
null,
_currentContext.Context,
_commandLogger),
cancellationToken);
Expand Down
2 changes: 2 additions & 0 deletions src/EFCore.Relational/Migrations/MigrationCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public virtual int ExecuteNonQuery(
new RelationalCommandParameterObject(
connection,
parameterValues,
null,
_context,
_logger));

Expand All @@ -82,6 +83,7 @@ public virtual Task<int> ExecuteNonQueryAsync(
new RelationalCommandParameterObject(
connection,
parameterValues,
null,
_context,
_logger),
cancellationToken);
Expand Down
Loading

0 comments on commit b9cc8b6

Please sign in to comment.