* MakeBsonConst creates a Const expression for a given bson. */
| 446 | * MakeBsonConst creates a Const expression for a given bson. |
| 447 | */ |
| 448 | static Const * |
| 449 | MakeBsonConst(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 | /* |
no test coverage detected