MongoDB
 sql >> Database >  >> NoSQL >> MongoDB

Come archiviare grandi numeri in MongoDB con Node.js

Ora puoi farlo in Mongoose con mongoose-long plug-in.

require('mongoose-long')(mongoose);
var SchemaTypes = mongoose.Schema.Types;
var schema = new Schema({
    ...
    usedBandwidth: {type: SchemaTypes.Long, min: 0, default: 0}
});