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

Method LocateArray

storage/connect/bsonudf.cpp:1145–1164  ·  view source on GitHub ↗

/ Locate in a JSON Array. */ /

Source from the content-addressed store, hash-verified

1143/* Locate in a JSON Array. */
1144/*********************************************************************************/
1145my_bool BJNX::LocateArray(PGLOBAL g, PBVAL jarp)
1146{
1147 char s[16];
1148 int n = GetArraySize(jarp);
1149 size_t m = Jp->N;
1150
1151 for (int i = 0; i < n && !Found; i++) {
1152 Jp->N = m;
1153 snprintf(s, sizeof(s), "[%d]", i + B);
1154
1155 if (Jp->WriteStr(s))
1156 return true;
1157
1158 if (LocateValue(g, GetArrayValue(jarp, i)))
1159 return true;
1160
1161 } // endfor i
1162
1163 return false;
1164} // end of LocateArray
1165
1166/*********************************************************************************/
1167/* Locate in a JSON Object. */

Callers

nothing calls this directly

Calls 1

WriteStrMethod · 0.80

Tested by

no test coverage detected