MCPcopy Create free account
hub / github.com/apache/cloudberry / populate_array_element

Function populate_array_element

src/backend/utils/adt/jsonfuncs.c:2606–2624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2604}
2605
2606static void
2607populate_array_element(PopulateArrayContext *ctx, int ndim, JsValue *jsv)
2608{
2609 Datum element;
2610 bool element_isnull;
2611
2612 /* populate the array element */
2613 element = populate_record_field(ctx->aio->element_info,
2614 ctx->aio->element_type,
2615 ctx->aio->element_typmod,
2616 NULL, ctx->mcxt, PointerGetDatum(NULL),
2617 jsv, &element_isnull);
2618
2619 accumArrayResult(ctx->astate, element, element_isnull,
2620 ctx->aio->element_type, ctx->acxt);
2621
2622 Assert(ndim > 0);
2623 ctx->sizes[ndim - 1]++; /* increment current dimension counter */
2624}
2625
2626/* json object start handler for populate_array_json() */
2627static void

Callers 2

populate_array_dim_jsonbFunction · 0.85

Calls 2

populate_record_fieldFunction · 0.85
accumArrayResultFunction · 0.85

Tested by

no test coverage detected