-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cosmos: Optimize Find without partition key
Add event ids Make GetProperty public Fix bad merge Part of #17310
- Loading branch information
1 parent
220630b
commit d728e97
Showing
22 changed files
with
553 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Diagnostics; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Diagnostics | ||
{ | ||
/// <summary> | ||
/// <para> | ||
/// Event IDs for Cosmos events that correspond to messages logged to an <see cref="ILogger" /> | ||
/// and events sent to a <see cref="DiagnosticSource" />. | ||
/// </para> | ||
/// <para> | ||
/// These IDs are also used with <see cref="WarningsConfigurationBuilder" /> to configure the | ||
/// behavior of warnings. | ||
/// </para> | ||
/// </summary> | ||
public static class CosmosEventId | ||
{ | ||
// Warning: These values must not change between releases. | ||
// Only add new values to the end of sections, never in the middle. | ||
// Try to use <Noun><Verb> naming and be consistent with existing names. | ||
private enum Id | ||
{ | ||
// Update events | ||
|
||
// Query events | ||
ExecutingSqlQuery = CoreEventId.ProviderBaseId + 100, | ||
ExecutingReadItem | ||
} | ||
|
||
private static readonly string _queryPrefix = DbLoggerCategory.Query.Name + "."; | ||
private static EventId MakeQueryId(Id id) => new EventId((int)id, _queryPrefix + id); | ||
|
||
/// <summary> | ||
/// <para> | ||
/// A SQL query was executed. | ||
/// </para> | ||
/// <para> | ||
/// This event is in the <see cref="DbLoggerCategory.Query" /> category. | ||
/// </para> | ||
/// </summary> | ||
public static readonly EventId ExecutingSqlQuery = MakeQueryId(Id.ExecutingSqlQuery); | ||
|
||
/// <summary> | ||
/// <para> | ||
/// ReadItem was executed. | ||
/// </para> | ||
/// <para> | ||
/// This event is in the <see cref="DbLoggerCategory.Query" /> category. | ||
/// </para> | ||
/// </summary> | ||
public static readonly EventId ExecutingReadItem = MakeQueryId(Id.ExecutingReadItem); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.