mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-12 15:37:27 +01:00
Ignore IIF statements if emulators
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { PartitionKey, PartitionKeyDefinition } from "@azure/cosmos";
|
import { PartitionKey, PartitionKeyDefinition } from "@azure/cosmos";
|
||||||
|
import { configContext, Platform } from "ConfigContext";
|
||||||
import { getRUThreshold, ruThresholdEnabled } from "Shared/StorageUtility";
|
import { getRUThreshold, ruThresholdEnabled } from "Shared/StorageUtility";
|
||||||
import { userContext } from "UserContext";
|
import { userContext } from "UserContext";
|
||||||
import { logConsoleWarning } from "Utils/NotificationConsoleUtils";
|
import { logConsoleWarning } from "Utils/NotificationConsoleUtils";
|
||||||
@@ -66,7 +67,11 @@ export function buildDocumentsQueryPartitionProjections(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
const fullAccess = `${collectionAlias}${projectedProperty}`;
|
const fullAccess = `${collectionAlias}${projectedProperty}`;
|
||||||
if (!isSystemPartitionKey) {
|
if (
|
||||||
|
!isSystemPartitionKey &&
|
||||||
|
configContext.platform !== Platform.Emulator &&
|
||||||
|
configContext.platform !== Platform.VNextEmulator
|
||||||
|
) {
|
||||||
const wrappedProjection = `IIF(IS_DEFINED(${fullAccess}), ${fullAccess}, {})`;
|
const wrappedProjection = `IIF(IS_DEFINED(${fullAccess}), ${fullAccess}, {})`;
|
||||||
projections.push(wrappedProjection);
|
projections.push(wrappedProjection);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user