Поделиться через


CosmosEncryptedNumber interface

Этот интерфейс представляет собой зашифрованное число в Cosmos DB SDK.

Пример

import { CosmosEncryptedNumber, CosmosEncryptedNumberType } from "@azure/cosmos";

const encryptedNumber1: CosmosEncryptedNumber = {
  value: 4,
  numberType: CosmosEncryptedNumberType.Integer,
};
const encryptedNumber2: CosmosEncryptedNumber = {
  value: 4.1,
  numberType: CosmosEncryptedNumberType.Float,
};
const encryptedNumber3: CosmosEncryptedNumber = {
  value: 4,
  numberType: CosmosEncryptedNumberType.Float, // represents 4.0
};

Свойства

numberType

Тип числа (Integer или Float). Используйте CosmosEncryptedNumberType.Integer для целых чисел и CosmosEncryptedNumberType.Float для чисел с плавающей запятой.

value

Значение, которое необходимо зашифровать.

Сведения о свойстве

numberType

Тип числа (Integer или Float). Используйте CosmosEncryptedNumberType.Integer для целых чисел и CosmosEncryptedNumberType.Float для чисел с плавающей запятой.

numberType: CosmosEncryptedNumberType

Значение свойства

value

Значение, которое необходимо зашифровать.

value: number

Значение свойства

number