Files
documentdb/pg_helio_api/include/commands/insert.h
T
Vinod Sridharan 2da6633812 Merged PR 1314099: Colocation Support Part 2
### Does this PR have any customer impact?

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)

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

### Description
2024-04-05 13:43:51 +03:00

26 lines
894 B
C

/*-------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* include/commands/insert.h
*
* Functions for inserting documents.
*
*-------------------------------------------------------------------------
*/
#ifndef COMMANDS_INSERT_H
#define COMMANDS_INSERT_H
#include <io/helio_bson_core.h>
#include "commands/commands_common.h"
MongoCollection * CreateCollectionForInsert(Datum databaseNameDatum,
Datum collectionNameDatum);
bool InsertDocument(uint64 collectionId, int64 shardKeyValue,
pgbson *objectId, pgbson *document);
bool InsertDocumentToTempCollection(MongoCollection *collection, int64 shardKeyValue,
pgbson *document);
bool TryInsertOne(MongoCollection *collection, pgbson *document, int64 shardKeyHash, bool
sameSourceAndTarget, WriteError *writeError);
#endif