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

Function Error_InvalidFilterPlacement

src/errors/errors.c:124–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122//------------------------------------------------------------------------------
123
124void Error_InvalidFilterPlacement(rax *entitiesRax) {
125 ASSERT(entitiesRax != NULL);
126
127 // Something is wrong - could not find a matching op where all references are solved.
128 raxIterator it;
129 raxStart(&it, entitiesRax);
130 // Retrieve the first key in the rax.
131 raxSeek(&it, "^", NULL, 0);
132 raxNext(&it);
133 // Build invalid entity string on the stack to add null terminator.
134 char invalid_entity[it.key_len + 1];
135 memcpy(invalid_entity, it.key, it.key_len);
136 invalid_entity[it.key_len] = 0;
137 // Emit compile-time error.
138 ErrorCtx_SetError("Unable to resolve filtered alias '%s'", invalid_entity);
139 raxFree(entitiesRax);
140}
141
142void Error_SITypeMismatch(SIValue received, SIType expected) {
143 size_t bufferLen = MULTIPLE_TYPE_STRING_BUFFER_SIZE;

Calls 1

ErrorCtx_SetErrorFunction · 0.85

Tested by

no test coverage detected