MCPcopy Create free account
hub / github.com/documentdb/documentdb / bson_recv

Function bson_recv

pg_documentdb_core/src/io/bson_io.c:181–190  ·  view source on GitHub ↗

* bson_recv is the internal receive function for bson. * TODO: This is still relatively untested and is used only in the CREATE TYPE. * This function still needs to be validated and tested */

Source from the content-addressed store, hash-verified

179 * This function still needs to be validated and tested
180 */
181Datum
182bson_recv(PG_FUNCTION_ARGS)
183{
184 StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
185 pgbson *bsonValue = PgbsonInitFromBuffer(buf->data, buf->len);
186
187 /* let caller know we consumed whole buffer */
188 buf->cursor = buf->len;
189 PG_RETURN_POINTER(bsonValue);
190}
191
192
193/*

Callers

nothing calls this directly

Calls 1

PgbsonInitFromBufferFunction · 0.85

Tested by

no test coverage detected