Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "moltyjs", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "A tiny ODM for MongoDB with multy tenancy support.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -45,2 +45,4 @@ # What is moltyjs? | ||
To create a new Schema use the "Schema()" constructor passing the schema and the options: | ||
```javascript | ||
@@ -79,4 +81,25 @@ const { connect, Schema } = require('moltys'); | ||
The schema field properties alowed are: | ||
_type_: Mandatory [String, Number, Boolean, Buffer, Date, Array, Object] | ||
_required_: Optional {Boolean} | ||
_unique_: Optional {Boolean} | ||
_default_: Optional | ||
_match_: Optional | ||
_enum_: Optional | ||
_min_: Optional | ||
_max_: Optional | ||
_maxlength_: Optional | ||
_validate_: Optional | ||
And the schema options allowed are: | ||
_timestamps_: Optional | ||
_inheritOptions_: Optional | ||
--_discriminatorKey_: Required once "_inheritOptions_" is set | ||
--_merge_: Optional ['methods', 'preHooks', 'postHooks'] | ||
# TODO | ||
* Improove documentation | ||
* Populate | ||
@@ -83,0 +106,0 @@ * find() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80878
109