1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- /**
- * The [MongooseError](#error_MongooseError) constructor.
- *
- * @method Error
- * @api public
- */
- exports.Error = require('./error');
- /**
- * The Mongoose [Schema](#schema_Schema) constructor
- *
- * ####Example:
- *
- * var mongoose = require('mongoose');
- * var Schema = mongoose.Schema;
- * var CatSchema = new Schema(..);
- *
- * @method Schema
- * @api public
- */
- exports.Schema = require('./schema');
- /**
- * The various Mongoose Types.
- *
- * ####Example:
- *
- * var mongoose = require('mongoose');
- * var array = mongoose.Types.Array;
- *
- * ####Types:
- *
- * - [ObjectId](#types-objectid-js)
- * - [Buffer](#types-buffer-js)
- * - [SubDocument](#types-embedded-js)
- * - [Array](#types-array-js)
- * - [DocumentArray](#types-documentarray-js)
- *
- * Using this exposed access to the `ObjectId` type, we can construct ids on demand.
- *
- * var ObjectId = mongoose.Types.ObjectId;
- * var id1 = new ObjectId;
- *
- * @property Types
- * @api public
- */
- exports.Types = require('./types');
- /**
- * The Mongoose [VirtualType](#virtualtype_VirtualType) constructor
- *
- * @method VirtualType
- * @api public
- */
- exports.VirtualType = require('./virtualtype');
- /**
- * The various Mongoose SchemaTypes.
- *
- * ####Note:
- *
- * _Alias of mongoose.Schema.Types for backwards compatibility._
- *
- * @property SchemaTypes
- * @see Schema.SchemaTypes #schema_Schema.Types
- * @api public
- */
- exports.SchemaType = require('./schematype.js');
- /**
- * Internal utils
- *
- * @property utils
- * @api private
- */
- exports.utils = require('./utils.js');
- /**
- * The Mongoose browser [Document](#document-js) constructor.
- *
- * @method Document
- * @api public
- */
- exports.Document = require('./document_provider.js')();
- /*!
- * Module exports.
- */
- if (typeof window !== 'undefined') {
- window.mongoose = module.exports;
- window.Buffer = Buffer;
- }
|