MCPcopy Create free account
hub / github.com/MariaDB/server / SetKeyValue

Method SetKeyValue

storage/connect/json.cpp:1200–1215  ·  view source on GitHub ↗

/ Set or add a value corresponding to the given key. */ /

Source from the content-addressed store, hash-verified

1198/* Set or add a value corresponding to the given key. */
1199/***********************************************************************/
1200void JOBJECT::SetKeyValue(PGLOBAL g, PJVAL jvp, PCSZ key)
1201{
1202 PJPR jp;
1203
1204 for (jp = First; jp; jp = jp->Next)
1205 if (!strcmp(jp->Key, key)) {
1206 jp->Val = jvp;
1207 break;
1208 } // endif key
1209
1210 if (!jp) {
1211 jp = AddPair(g, key);
1212 jp->Val = jvp;
1213 } // endif jp
1214
1215} // end of SetValue
1216
1217/***********************************************************************/
1218/* Delete a value corresponding to the given key. */

Callers 15

bson_make_objectFunction · 0.45
bson_object_nonullFunction · 0.45
bson_object_keyFunction · 0.45
bson_object_addFunction · 0.45
bson_object_grp_addFunction · 0.45
bbin_make_objectFunction · 0.45
bbin_object_nonullFunction · 0.45
bbin_object_keyFunction · 0.45
bbin_object_addFunction · 0.45
MakeTopTreeMethod · 0.45
MakeJsonMethod · 0.45
GetRowMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected