qmetrics.net

MongoDB Go Driver

Official MongoDB client library for Go applications

MongoDB Go Driver screenshot

MongoDB’s supported Go driver connects applications to MongoDB for CRUD, aggregation, indexing, and secure access. Install via Go modules from go.mongodb.org/mongo-driver.

Overview

The MongoDB Go driver is the supported way for Go programs to connect to MongoDB deployments, discover servers, and run reads and writes. You import the mongo package, create a Client with Connect, and defer Disconnect when finished. Connect does not block on discovery; Ping can confirm that a server is reachable.

Guides walk through databases and collections, CRUD, aggregation, specialized data formats, indexes, database commands, time series collections, monitoring, logging, and security. The context package is used to manage blocking calls. Documentation also covers connection troubleshooting and API details for types and methods.

Network compression can shrink traffic between the application and MongoDB when both sides support it. The driver can negotiate Snappy and related compressors via connection options or connection strings. MongoDB Search and MongoDB Vector Search material describes running those query types from Go.

Semantic versioning governs releases. The driver targets recent Go toolchains and MongoDB 4.4 or newer. Examples and extended reference material live in the official docs site and bundled examples.

Key features

  • mongo.Client connection API
  • CRUD via Database and Collection
  • Aggregation pipelines
  • Index management
  • Network compression negotiation
  • Context-aware blocking calls
  • MongoDB Search queries
  • Security and authentication options

Use cases

  • Go services backed by MongoDB
  • CRUD and cursor-based reads
  • Aggregation and reporting
  • Compressed connections to MongoDB
  • Atlas Search and vector queries from Go

Tags

Similar software

Prisma ORM

TypeScript ORM with agent-oriented workflows

Prisma ORM lets TypeScript applications define data models in a contract file and query databases with type-safe APIs. Version eight rewrites the stack in TypeScript with extensibility and bundled agent skills.

★ 47.8k⟳ yesterdayApache-2.0
DatabasesDesktop/CLI app

DuckDB

In-process analytical SQL database engine

DuckDB embeds in applications and the CLI to run fast OLAP SQL locally. It reads Parquet, CSV, JSON, remote object storage, and lakehouse formats without a separate database server.

★ 43.4k⟳ todayMIT
DatabasesDesktop/CLI app

GORM

Feature-rich ORM library for Go applications

GORM maps Go structs to SQL databases with migrations, associations, hooks, and a fluent query API. It targets developer-friendly access patterns for common CRUD and relationship modeling.

★ 40k⟳ 1 month agoMIT
DatabasesDesktop/CLI app

LevelDB

Ordered embedded key-value storage library

LevelDB is a fast embedded library that maps string keys to string values in sorted order. Applications link it in-process; it is not a SQL database and has no built-in client-server layer.

★ 39.6k⟳ 15 days agoBSD-3-Clause
DatabasesDesktop/CLI app

Mongoose

Schema-based MongoDB object modeling for Node.js

Mongoose is an object modeling layer for MongoDB built for async Node.js code. It adds schemas, validation, and query helpers on top of the official MongoDB driver.

★ 27.5k⟳ yesterdayMIT
DatabasesDesktop/CLI app

RxDB

Local-first reactive NoSQL database for JavaScript

Stores application data on the client with reactive queries and optional sync to your own backend. Targets websites, hybrid mobile apps, desktop shells, and Node.js.

★ 23.4k⟳ yesterdayApache-2.0
DatabasesDesktop/CLI app