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

Function EffectsBuffer_AddNewSchemaEffect

src/effects/effects.c:735–764  ·  view source on GitHub ↗

add a schema addition effect to buffer

Source from the content-addressed store, hash-verified

733
734// add a schema addition effect to buffer
735void EffectsBuffer_AddNewSchemaEffect
736(
737 EffectsBuffer *buff, // effect buffer
738 const char *schema_name, // id of the schema
739 SchemaType st // type of the schema
740) {
741 //--------------------------------------------------------------------------
742 // effect format:
743 // effect type
744 // schema type
745 // schema name
746 //--------------------------------------------------------------------------
747
748 EffectType t = EFFECT_ADD_SCHEMA;
749 EffectsBuffer_WriteBytes(&t, sizeof(t), buff);
750
751 //--------------------------------------------------------------------------
752 // write schema type
753 //--------------------------------------------------------------------------
754
755 EffectsBuffer_WriteBytes(&st, sizeof(st), buff);
756
757 //--------------------------------------------------------------------------
758 // write schema name
759 //--------------------------------------------------------------------------
760
761 EffectsBuffer_WriteString(schema_name, buff);
762
763 EffectsBuffer_IncEffectCount(buff);
764}
765
766// add an attribute addition effect to buffer
767void EffectsBuffer_AddNewAttributeEffect

Callers 1

AddSchemaFunction · 0.85

Calls 3

EffectsBuffer_WriteBytesFunction · 0.85

Tested by

no test coverage detected