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

Function MakeBsonConst

pg_documentdb/src/query/query_operator.c:448–461  ·  view source on GitHub ↗

* MakeBsonConst creates a Const expression for a given bson. */

Source from the content-addressed store, hash-verified

446 * MakeBsonConst creates a Const expression for a given bson.
447 */
448static Const *
449MakeBsonConst(pgbson *pgbson)
450{
451 Const *bsonConst = makeNode(Const);
452 bsonConst->consttype = BsonTypeId();
453 bsonConst->consttypmod = -1;
454 bsonConst->constlen = -1;
455 bsonConst->constvalue = PointerGetDatum(pgbson);
456 bsonConst->constbyval = false;
457 bsonConst->constisnull = false;
458 bsonConst->location = -1;
459
460 return bsonConst;
461}
462
463
464/*

Callers 15

bson_query_matchFunction · 0.70
CreateConstFromBsonValueFunction · 0.70
CheckAndAddIdFilterFunction · 0.70
HandleCurrentOpFunction · 0.50
HandleCollStatsFunction · 0.50
ParseAndSetFrameOptionFunction · 0.50

Calls 1

BsonTypeIdFunction · 0.85

Tested by

no test coverage detected