mongoose-long
Long number type for Mongoose
Last updated 3 months ago by vkarpov15 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mongoose-long 
SYNC missed versions from official npm registry.

#mongoose-long

Provides Number Long support for Mongoose.

Build Status

Example:

var mongoose = require('mongoose')
require('mongoose-long')(mongoose);

var SchemaTypes = mongoose.Schema.Types;
var partSchema = new Schema({ long: SchemaTypes.Long });

var Part = db.model('Part', partSchema);
var part = new Part({ long: "9223372036854775806" });

var Long = mongoose.Types.Long;
part.long = part.long.divide(Long.fromString("2"));
part.save()

install

npm install mongoose-long

See node-mongodb-native docs on all the Long methods available.

LICENSE

Current Tags

  • 0.3.0                                ...           latest (3 months ago)

7 Versions

  • 0.3.0                                ...           3 months ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.2                                ...           8 years ago
  • 0.0.1                                ...           8 years ago

Copyright 2014 - 2016 © taobao.org |