Int32 / Long

Reference type:Cheat sheetFormat:Syntax + example + use case

Reference group: BSON types and field properties

What it does

Integer BSON types with different ranges.

Syntax

NumberInt(n) / NumberLong(string)

Use case

Counts and integer values where range matters.

Int32 / Long: practical example
NumberInt(42); NumberLong("9000000000")
💡 Explanation Integer BSON types with different ranges. When to use it Counts and integer values where range matters.
Key Takeaways
  • Integer BSON types with different ranges.
  • Typical use: Counts and integer values where range matters.