Aracılığıyla paylaş


Conflict class

Belirli bir Çakışma kimliğe göre okumak veya silmek için kullanın.

Tüm çakışmaları sorgulamak veya okumak için bkz. Çakışmalar.

Özellikler

container
id
url

Kaynağa bir başvuru URL'si döndürür. İzinler'de bağlantı için kullanılır.

Yöntemler

delete(RequestOptions)

Verilen ConflictDefinitionsilin.

Örnek

import { CosmosClient } from "@azure/cosmos";

const endpoint = "https://your-account.documents.azure.com";
const key = "<database account masterkey>";
const client = new CosmosClient({ endpoint, key });
const { database } = await client.databases.createIfNotExists({ id: "Test Database" });
const container = database.container("Test Container");

await container.conflict("<conflict-id>").delete();
read(RequestOptions)

Verilen Çakışmaiçin ConflictDefinition okuyun.

Örnek

import { CosmosClient } from "@azure/cosmos";

const endpoint = "https://your-account.documents.azure.com";
const key = "<database account masterkey>";
const client = new CosmosClient({ endpoint, key });
const { database } = await client.databases.createIfNotExists({ id: "Test Database" });
const container = database.container("Test Container");

const { resource: conflict } = await container.conflict("<conflict-id>").read();

Özellik Ayrıntıları

container

container: Container

Özellik Değeri

id

id: string

Özellik Değeri

string

url

Kaynağa bir başvuru URL'si döndürür. İzinler'de bağlantı için kullanılır.

string url

Özellik Değeri

string

Yöntem Ayrıntıları

delete(RequestOptions)

Verilen ConflictDefinitionsilin.

Örnek

import { CosmosClient } from "@azure/cosmos";

const endpoint = "https://your-account.documents.azure.com";
const key = "<database account masterkey>";
const client = new CosmosClient({ endpoint, key });
const { database } = await client.databases.createIfNotExists({ id: "Test Database" });
const container = database.container("Test Container");

await container.conflict("<conflict-id>").delete();
function delete(options?: RequestOptions): Promise<ConflictResponse>

Parametreler

options
RequestOptions

Döndürülenler

Promise<ConflictResponse>

read(RequestOptions)

Verilen Çakışmaiçin ConflictDefinition okuyun.

Örnek

import { CosmosClient } from "@azure/cosmos";

const endpoint = "https://your-account.documents.azure.com";
const key = "<database account masterkey>";
const client = new CosmosClient({ endpoint, key });
const { database } = await client.databases.createIfNotExists({ id: "Test Database" });
const container = database.container("Test Container");

const { resource: conflict } = await container.conflict("<conflict-id>").read();
function read(options?: RequestOptions): Promise<ConflictResponse>

Parametreler

options
RequestOptions

Döndürülenler

Promise<ConflictResponse>