Skip to content

Instantly share code, notes, and snippets.

@rd13
Created September 27, 2012 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rd13/3793748 to your computer and use it in GitHub Desktop.
Save rd13/3793748 to your computer and use it in GitHub Desktop.
Mongoose / MongoDB Data Types
mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
Schema = mongoose.Schema;
console.log(Schema.Types);
{ String: [Function: SchemaString],
Number: [Function: SchemaNumber],
Boolean: { [Function: SchemaBoolean] '$conditionalHandlers': { '$in': [Function: handleArray] } },
DocumentArray: [Function: DocumentArray],
Array: [Function: SchemaArray],
Buffer: [Function: SchemaBuffer],
Date: [Function: SchemaDate],
ObjectId: [Function: ObjectId],
Mixed: [Function: Mixed],
Oid: [Function: ObjectId],
Object: [Function: Mixed],
Bool: { [Function: SchemaBoolean] '$conditionalHandlers': { '$in': [Function: handleArray] } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment