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

Function RunQueryWithCommutativeWrites

pg_documentdb/src/api_hooks.c:130–150  ·  view source on GitHub ↗

* Hook to run a query with commutative writes. * In single node all writes are commutative, so it just calls SPI directly with the args specified. */

Source from the content-addressed store, hash-verified

128 * In single node all writes are commutative, so it just calls SPI directly with the args specified.
129 */
130Datum
131RunQueryWithCommutativeWrites(const char *query, int nargs, Oid *argTypes,
132 Datum *argValues, char *argNulls,
133 int expectedSPIOK, bool *isNull)
134{
135 if (run_query_with_commutative_writes_hook != NULL)
136 {
137 return run_query_with_commutative_writes_hook(query, nargs, argTypes, argValues,
138 argNulls, expectedSPIOK, isNull);
139 }
140
141 bool readOnly = false;
142 if (nargs > 0)
143 {
144 return ExtensionExecuteQueryWithArgsViaSPI(query, nargs, argTypes, argValues,
145 argNulls, readOnly, expectedSPIOK,
146 isNull);
147 }
148
149 return ExtensionExecuteQueryViaSPI(query, readOnly, expectedSPIOK, isNull);
150}
151
152
153/*

Callers 9

command_drop_collectionFunction · 0.85
MarkIndexAsValidFunction · 0.85
ModifyViewDefinitionFunction · 0.85
RecordCollectionIndexFunction · 0.85
MarkIndexesAsValidFunction · 0.85
UpsertSchemaValidationFunction · 0.85
ShardCollectionCoreFunction · 0.85

Tested by

no test coverage detected