我正在尝试将数字1477958757748.9697转换为mongo-shell中的long。 NumberLong函数抛出错误:
> NumberLong(1477958757748.9697);
2017-06-03T08:52:56.306-0400 E QUERY [thread1] Error: number
passed to NumberLong must be representable as an int64_t :
@(shell):1:1
>
还有NumberLong的替代品吗? 用于检查的NumberInt适用于整数:
> NumberInt(12.6);
NumberInt(12)
>
你怎么能在Mongo做到这一点?