forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enableQueryStatement - add options choose between printing none, para…
…meterized or all queries statement
- Loading branch information
Showing
6 changed files
with
81 additions
and
13 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
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
46 changes: 46 additions & 0 deletions
46
...osmos/src/main/java/com/azure/cosmos/implementation/clienttelemetry/ShowQueryOptions.java
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,46 @@ | ||
package com.azure.cosmos.implementation.clienttelemetry; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
public enum ShowQueryOptions { | ||
|
||
/** | ||
* Do not show query. | ||
*/ | ||
NONE("None"), | ||
|
||
/** | ||
* Show query parameters only. | ||
*/ | ||
PARAMETERIZED_ONLY("ParameterizedOnly"), | ||
|
||
/** | ||
* Show query parameters and non parameters | ||
*/ | ||
PARAMETERIZED_AND_NON_PARAMETERIZED("ParameterizedAndNonParameterized"); | ||
|
||
private static Map<String, ShowQueryOptions> showQueryOptionsHashMap = new HashMap<>(); | ||
|
||
static { | ||
for(ShowQueryOptions showQueryOptions : ShowQueryOptions.values()) { | ||
showQueryOptionsHashMap.put(showQueryOptions.toString(), showQueryOptions); | ||
} | ||
} | ||
private final String value; | ||
|
||
ShowQueryOptions(String value) { | ||
this.value = value; | ||
} | ||
|
||
static ShowQueryOptions fromServiceSerializedFormat(String showQueryOptions) { | ||
return showQueryOptionsHashMap.get(showQueryOptions); | ||
} | ||
|
||
@JsonValue | ||
@Override | ||
public String toString() { | ||
return this.value; | ||
} | ||
} |
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