Files
documentdb/pg_helio_api/include/commands/delete.h
T
Aditya Kotalwar 0135e97ee5 Merged PR 1388730: Enable billing for multiple accounts for 'SOP 009: Enable or Disable billing for an account or subscription'
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
TSG
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)

### Are you introducing any new config? If yes, do you have tests with and without them being set?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

This change introduces a section in the SOP that includes a script enabling simultaneous updates across multiple accounts under the same subscription.
2024-08-16 18:24:51 +03:00

59 lines
1.4 KiB
C

/*-------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* include/commands/delete.h
*
* Exports related to implementation of a single-document delete.
*
*-------------------------------------------------------------------------
*/
#ifndef DELETE_H
#define DELETE_H
#include <postgres.h>
#include "metadata/collection.h"
/*
* DeleteOneParams describes delete operation for a single document.
*/
typedef struct
{
/* list of Deletions */
pgbson *query;
/* sort order to use when selecting 1 row */
pgbson *sort;
/* whether to return deleted document */
bool returnDeletedDocument;
/* fields to return if returning a document */
pgbson *returnFields;
} DeleteOneParams;
/*
* DeleteOneRow reflects the result of a single-row delete
* on a single shard.
*/
typedef struct
{
/* whether one row matched the query and was deleted */
bool isRowDeleted;
/* object_id of the deleted document (only used within delete_one) */
pgbson *objectId;
/* value of the deleted (and maybe projected) document, if requested and matched any */
pgbson *resultDeletedDocument;
} DeleteOneResult;
void CallDeleteOne(MongoCollection *collection, DeleteOneParams *deleteOneParams,
int64 shardKeyHash, text *transactionId, bool forceInlineWrites,
DeleteOneResult *result);
#endif