Categorygithub.com/devsamahd/morm
modulepackage
0.1.1
Repository: https://github.com/devsamahd/morm.git
Documentation: pkg.go.dev

# README

Morm

Morm is a powerful Object Document Mapper (ODM) for Golang, inspired by Mongoose, designed to be developer-friendly and feature-rich.

Go Report Card MIT license Go.Dev reference

Overview

  • Almost Full-Featured Object Document Mapper
  • Associations (Embedded Documents, References)
  • Hooks (Before/After Create/Update/Delete/Find)
  • Table joining with Populate
  • Transactions, Nested Transactions
  • Context Support, Prepared Statement Mode, DryRun Mode
  • Batch Insert, FindInBatches, Find To Map
  • Mongoose like Query Builder, Sort, Limit, Skip, etc
  • Logger
  • Extendable, flexible plugin API: Database Resolver (Multiple Databases, Read/Write Splitting), Prometheus…
  • Every feature comes with tests
  • Developer Friendly

Getting Started

To get started with Morm, follow these steps:

1. Install Morm

Install the package using go get:

go get -u github.com/devsamahd/morm

For more on this package

Contributing

You can help make Morm better, check out things you can do

Contributors

Thank you for contributing to Morm!

License

© Devsamahd, 2024

Released under the MIT License

# Packages

No description provided by the author

# Functions

Collection creates a new Collect instance for the specified collection and model.
Connect establishes a connection to MongoDB and returns a MongoDB instance.
ToUpdateStruct converts a struct to a primitive.M for MongoDB update operations.

# Variables

MongoDBInstance represents a global instance of MongoDB connection.

# Structs

Collect represents a MongoDB collection and model information.
CollectQueryBuilder represents a query builder for MongoDB operations on a collection.
Model represents a base MongoDB document model with common fields like ID, CreatedAt, and UpdatedAt.
MongoDB represents the MongoDB client and database information.