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

Function BsonValueAsInt32

pg_documentdb_core/src/query/bson_compare.c:645–649  ·  view source on GitHub ↗

* Converts Numeric bson value to 32 bit integer * This method throws `ERRCODE_DOCUMENTDB_CONVERSIONFAILURE` if bson_value_type is v_decimal128 and : * - NaN is attempted in conversion * - converted result overflows the int32 range */

Source from the content-addressed store, hash-verified

643 * - converted result overflows the int32 range
644 */
645int32_t
646BsonValueAsInt32(const bson_value_t *value)
647{
648 return BsonValueAsInt32WithRoundingMode(value, ConversionRoundingMode_Floor);
649}
650
651
652/*

Callers 15

ParseIVFCreationSpecFunction · 0.85
ParseHNSWCreationSpecFunction · 0.85
ParseIVFIndexSearchSpecFunction · 0.85
ParseHNSWIndexSearchSpecFunction · 0.85
MergeWorkerResultsFunction · 0.85
MergeWorkerBsonsFunction · 0.85
BuildBatchInsertionSpecFunction · 0.85
ParseReindexSpecFunction · 0.85
CheckForIndexCmdToFinishFunction · 0.85

Calls 1

Tested by

no test coverage detected