Members
(constant) exportData :MongoODMInterface
A module exporting MongoDB-related classes and types for an ORM implementation.
Type:
- MongoODMInterface
Methods
Message(message, erroropt) → {void}
Logs a message to the console with optional color formatting.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
message |
string | The message to be logged. |
||
error |
boolean |
<optional> |
false | A flag indicating whether the message represents an error. If true, the message is printed in red; otherwise, it's printed in blue. |
- Source:
Returns:
This function does not return a value.
- Type
- void
Example
// Usage:
Message('Connection Initialized'); // Logs a regular message in blue.
Message('Error connecting to MongoDB!', true); // Logs an error message in red.
Type Definitions
FieldTypes
Defines mapping between field types and their corresponding MongoDB data types.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
String |
string | The MongoDB data type for a string field. |
Number |
string | The MongoDB data type for a number field. |
Boolean |
string | The MongoDB data type for a boolean field. |
Date |
string | The MongoDB data type for a date field. |
Array |
string | The MongoDB data type for an array field. |
Object |
string | The MongoDB data type for an object field. |
ObjectId |
string | The MongoDB data type for an ObjectId field. |
Mixed |
string | The MongoDB data type for a mixed field. |
- Source: