Data types

As in other database engines, the fields should be defined with a data type. The following are all valid types:

  • String
  • Date
  • Number
  • Boolean
  • Array
  • ObjectId
  • Buffer
  • Mixed

Perhaps, you are familiar will almost all the data types listed. The Mixed data type basically allows you to define a field whose value can be of any data type. Personally, we don't recommend the use of this data type because maintaining a Mixed field can become hard, and you may want to write boilerplate code to use it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.33.157