MCPcopy Create free account
hub / github.com/documentdb/documentdb / command_record_id_index

Function command_record_id_index

pg_documentdb/src/metadata/index.c:108–122  ·  view source on GitHub ↗

* command_record_id_index inserts a record into ApiCatalogSchemaName.collection_indexes * for built-in "_id" index on collection with collectionId. * * Assumes that index is already created, so sets index_is_valid to true. */

Source from the content-addressed store, hash-verified

106 * Assumes that index is already created, so sets index_is_valid to true.
107 */
108Datum
109command_record_id_index(PG_FUNCTION_ARGS)
110{
111 if (PG_ARGISNULL(0))
112 {
113 ereport(ERROR, (errmsg("Collection ID must not be NULL")));
114 }
115 uint64 collectionId = DatumGetUInt64(PG_GETARG_DATUM(0));
116
117 IndexSpec idIndexSpec = MakeIndexSpecForBuiltinIdIndex();
118 bool indexIsValid = true;
119 RecordCollectionIndex(collectionId, &idIndexSpec, indexIsValid);
120
121 PG_RETURN_VOID();
122}
123
124
125/*

Callers

nothing calls this directly

Calls 2

RecordCollectionIndexFunction · 0.85

Tested by

no test coverage detected