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

Function EnsureTermCapacity

pg_documentdb/src/opclass/bson_gin_core.c:1048–1058  ·  view source on GitHub ↗

* Validates that terms array has at least 'required' Datum entries * in its array of terms. */

Source from the content-addressed store, hash-verified

1046 * in its array of terms.
1047 */
1048inline static void
1049EnsureTermCapacity(GinEntrySet *context, int32_t required)
1050{
1051 int32_t requiredTotal = context->index + required;
1052 if (context->entryCapacity < requiredTotal)
1053 {
1054 context->entries = repalloc(context->entries, sizeof(Datum) *
1055 requiredTotal);
1056 context->entryCapacity = requiredTotal;
1057 }
1058}
1059
1060
1061/*

Callers 2

AddTermFunction · 0.85
GenerateArrayPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected