MinKey and MaxKey values
- Last Updated: September 24, 2021
- 1 minute read
- DataDirect Connectors
- JDBC
- MongoDB 6.1
- Documentation
The driver supports the MinKey and Maxkey special values and, by default, maps
them to the
VARCHAR JDBC Data type during relational
mapping. Note that MinKey and MaxKey values are static and return the same data whenever
they are queried. The following are the respective values returned by the driver: - MinKey:
{“$MinKey”:1} - MaxKey:
{“$MaxKey”:1}
MinKey and MaxKey are special values used internally by MongoDB that do not have a counterpart in SQL. Therefore, they cannot be used in Where clauses for comparisons.
Note: The DatabaseMetaData.getTypeInfo() method does not return results for the MinKey
and MaxKey data types.