You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
1.8 KiB

  1. /* eslint-env browser */
  2. /**
  3. * The [MongooseError](#error_MongooseError) constructor.
  4. *
  5. * @method Error
  6. * @api public
  7. */
  8. exports.Error = require('./error');
  9. /**
  10. * The Mongoose [Schema](#schema_Schema) constructor
  11. *
  12. * ####Example:
  13. *
  14. * var mongoose = require('mongoose');
  15. * var Schema = mongoose.Schema;
  16. * var CatSchema = new Schema(..);
  17. *
  18. * @method Schema
  19. * @api public
  20. */
  21. exports.Schema = require('./schema');
  22. /**
  23. * The various Mongoose Types.
  24. *
  25. * ####Example:
  26. *
  27. * var mongoose = require('mongoose');
  28. * var array = mongoose.Types.Array;
  29. *
  30. * ####Types:
  31. *
  32. * - [ObjectId](#types-objectid-js)
  33. * - [Buffer](#types-buffer-js)
  34. * - [SubDocument](#types-embedded-js)
  35. * - [Array](#types-array-js)
  36. * - [DocumentArray](#types-documentarray-js)
  37. *
  38. * Using this exposed access to the `ObjectId` type, we can construct ids on demand.
  39. *
  40. * var ObjectId = mongoose.Types.ObjectId;
  41. * var id1 = new ObjectId;
  42. *
  43. * @property Types
  44. * @api public
  45. */
  46. exports.Types = require('./types');
  47. /**
  48. * The Mongoose [VirtualType](#virtualtype_VirtualType) constructor
  49. *
  50. * @method VirtualType
  51. * @api public
  52. */
  53. exports.VirtualType = require('./virtualtype');
  54. /**
  55. * The various Mongoose SchemaTypes.
  56. *
  57. * ####Note:
  58. *
  59. * _Alias of mongoose.Schema.Types for backwards compatibility._
  60. *
  61. * @property SchemaTypes
  62. * @see Schema.SchemaTypes #schema_Schema.Types
  63. * @api public
  64. */
  65. exports.SchemaType = require('./schematype.js');
  66. /**
  67. * Internal utils
  68. *
  69. * @property utils
  70. * @api private
  71. */
  72. exports.utils = require('./utils.js');
  73. /**
  74. * The Mongoose browser [Document](#document-js) constructor.
  75. *
  76. * @method Document
  77. * @api public
  78. */
  79. exports.Document = require('./document_provider.js')();
  80. /*!
  81. * Module exports.
  82. */
  83. if (typeof window !== 'undefined') {
  84. window.mongoose = module.exports;
  85. window.Buffer = Buffer;
  86. }