MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / SIValue_Persist

Function SIValue_Persist

src/value.c:205–209  ·  view source on GitHub ↗

Ensure that any allocation held by the given SIValue is guaranteed to not go out * of scope during the lifetime of this query by copying references to volatile memory. * Heap allocations that are not scoped to the input SIValue, such as strings from the AST * or a GraphEntity property, are not modified. */

Source from the content-addressed store, hash-verified

203 * Heap allocations that are not scoped to the input SIValue, such as strings from the AST
204 * or a GraphEntity property, are not modified. */
205void SIValue_Persist(SIValue *v) {
206 // do nothing for non-volatile values
207 // for volatile values, persisting uses the same logic as cloning
208 if(v->allocation == M_VOLATILE) *v = SI_CloneValue(*v);
209}
210
211/* Update an SIValue's allocation type to the provided value. */
212inline void SIValue_SetAllocationType(SIValue *v, SIAllocation allocation) {

Callers 9

ResultSet_AddRecordFunction · 0.85
AR_HEADFunction · 0.85
AR_LASTFunction · 0.85
AR_REDUCEFunction · 0.85
Record_PersistScalarsFunction · 0.85
ProjectConsumeFunction · 0.85
_build_group_keyFunction · 0.85

Calls 1

SI_CloneValueFunction · 0.85

Tested by

no test coverage detected