مشاركة عبر


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

نوع الرقم (عدد صحيح أو عائم). استخدم CosmosEncryptedNumberType.Integer للأعداد الصحيحة و CosmosEncryptedNumberType.Float لأرقام الفاصلة العائمة.

value

القيمة المراد تشفيرها.

تفاصيل الخاصية

numberType

نوع الرقم (عدد صحيح أو عائم). استخدم CosmosEncryptedNumberType.Integer للأعداد الصحيحة و CosmosEncryptedNumberType.Float لأرقام الفاصلة العائمة.

numberType: CosmosEncryptedNumberType

قيمة الخاصية

value

القيمة المراد تشفيرها.

value: number

قيمة الخاصية

number