Data types
Barq ships its own value types under Barq.Types.
JavaScript Types
Section titled “JavaScript Types”| Type | Use |
|---|---|
Barq.Types.ObjectId |
Object IDs and primary keys. |
Barq.Types.UUID |
UUID values. |
Barq.Types.Decimal128 |
Decimal numbers. |
Barq.Types.Binary |
Binary data. |
Barq.Types.EJSON |
Extended JSON support. |
Example
Section titled “Example”const taskId = new Barq.Types.ObjectId();const deviceId = new Barq.Types.UUID();Schema Names
Section titled “Schema Names”Common schema property names:
{ _id: 'objectId', name: 'string', done: 'bool', createdAt: 'date',}