The Go driver for MongoDB

Overview

docs docs

MongoDB Go Driver

The MongoDB supported driver for Go.



Requirements

  • Go 1.10 or higher. We aim to support the latest supported versions of go.
  • MongoDB 2.6 and higher.

Installation

The recommended way to get started using the MongoDB Go driver is by using go modules to install the dependency in your project. This can be done either by importing packages from go.mongodb.org/mongo-driver and having the build step install the dependency or by explicitly running

go get go.mongodb.org/mongo-driver/mongo

When using a version of Go that does not support modules, the driver can be installed using dep by running

dep ensure -add "go.mongodb.org/mongo-driver/mongo"

Usage

To get started with the driver, import the mongo package and create a mongo.Client with the Connect function:

import (
    "go.mongodb.org/mongo-driver/mongo"
    "go.mongodb.org/mongo-driver/mongo/options"
    "go.mongodb.org/mongo-driver/mongo/readpref"
)

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
client, err := mongo.Connect(ctx, options.Client().ApplyURI("mongodb://localhost:27017"))

Make sure to defer a call to Disconnect after instantiating your client:

defer func() {
    if err = client.Disconnect(ctx); err != nil {
        panic(err)
    }
}()

For more advanced configuration and authentication, see the documentation for mongo.Connect.

Calling Connect does not block for server discovery. If you wish to know if a MongoDB server has been found and connected to, use the Ping method:

ctx, cancel = context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
err = client.Ping(ctx, readpref.Primary())

To insert a document into a collection, first retrieve a Database and then Collection instance from the Client:

collection := client.Database("testing").Collection("numbers")

The Collection instance can then be used to insert documents:

ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
res, err := collection.InsertOne(ctx, bson.D{{"name", "pi"}, {"value", 3.14159}})
id := res.InsertedID

To use bson.D, you will need to add "go.mongodb.org/mongo-driver/bson" to your imports.

Your import statement should now look like this:

import (
    "go.mongodb.org/mongo-driver/bson"
    "go.mongodb.org/mongo-driver/mongo"
    "go.mongodb.org/mongo-driver/mongo/options"
    "go.mongodb.org/mongo-driver/mongo/readpref"
)

Several query methods return a cursor, which can be used like this:

ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
cur, err := collection.Find(ctx, bson.D{})
if err != nil { log.Fatal(err) }
defer cur.Close(ctx)
for cur.Next(ctx) {
   var result bson.D
   err := cur.Decode(&result)
   if err != nil { log.Fatal(err) }
   // do something with result....
}
if err := cur.Err(); err != nil {
  log.Fatal(err)
}

For methods that return a single item, a SingleResult instance is returned:

var result struct {
    Value float64
}
filter := bson.D{{"name", "pi"}}
ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
err = collection.FindOne(ctx, filter).Decode(&result)
if err != nil {
    log.Fatal(err)
}
// Do something with result...

Additional examples and documentation can be found under the examples directory and on the MongoDB Documentation website.


Feedback

For help with the driver, please post in the MongoDB Community Forums.

New features and bugs can be reported on jira: https://jira.mongodb.org/browse/GODRIVER


Testing / Development

The driver tests can be run against several database configurations. The most simple configuration is a standalone mongod with no auth, no ssl, and no compression. To run these basic driver tests, make sure a standalone MongoDB server instance is running at localhost:27017. To run the tests, you can run make (on Windows, run nmake). This will run coverage, run go-lint, run go-vet, and build the examples.

Testing Different Topologies

To test a replica set or sharded cluster, set MONGODB_URI="<connection-string>" for the make command. For example, for a local replica set named rs1 comprised of three nodes on ports 27017, 27018, and 27019:

MONGODB_URI="mongodb://localhost:27017,localhost:27018,localhost:27018/?replicaSet=rs1" make

Testing Auth and TLS

To test authentication and TLS, first set up a MongoDB cluster with auth and TLS configured. Testing authentication requires a user with the root role on the admin database. The Go Driver repository comes with example certificates in the data/certificates directory. These certs can be used for testing. Here is an example command that would run a mongod with TLS correctly configured for tests:

mongod \
--auth \
--tlsMode requireTLS \
--tlsCertificateKeyFile $(pwd)/data/certificates/server.pem \
--tlsCAFile $(pwd)/data/certificates/ca.pem \
--tlsAllowInvalidCertificates

To run the tests with make, set MONGO_GO_DRIVER_CA_FILE to the location of the CA file used by the database, set MONGODB_URI to the connection string of the server, set AUTH=auth, and set SSL=ssl. For example:

AUTH=auth SSL=ssl MONGO_GO_DRIVER_CA_FILE=$(pwd)/data/certificates/ca.pem  MONGODB_URI="mongodb://user:[email protected]:27017/?authSource=admin" make

Notes:

  • The --tlsAllowInvalidCertificates flag is required on the server for the test suite to work correctly.
  • The test suite requires the auth database to be set with ?authSource=admin, not /admin.

Testing Compression

The MongoDB Go Driver supports wire protocol compression using Snappy, zLib, or zstd. To run tests with wire protocol compression, set MONGO_GO_DRIVER_COMPRESSOR to snappy, zlib, or zstd. For example:

MONGO_GO_DRIVER_COMPRESSOR=snappy make

Ensure the --networkMessageCompressors flag on mongod or mongos includes zlib if testing zLib compression.


Contribution

Check out the project page for tickets that need completing. See our contribution guidelines for details.


Continuous Integration

Commits to master are run automatically on evergreen.


Thanks and Acknowledgement

@ashleymcnamara - Mongo Gopher Artwork


License

The MongoDB Go Driver is licensed under the Apache License.

Issues
  • GODRIVER-567 Returned time.Time instead of int64 when decoding an IsoDate

    GODRIVER-567 Returned time.Time instead of int64 when decoding an IsoDate

    Hi, the value returned in case of null time is an empty time.Time struct, when teh time is not null, however, an int64 is returned, which makes no sense and prevents from decoding an ISODate into time.Time

    There was no test for a non empty Time value, so I added it.

    This is for teh JIRA ticket GODRIVER-567

    opened by delioda79 12
  • Fix bsoncore overflow

    Fix bsoncore overflow

    Hello, we were fuzzing one of our libraries that depend on bsonx and found following panics

    panic: runtime error: index out of range [-1]
    
    goroutine 1 [running]:
    go.mongodb.org/mongo-driver/x/bsonx/bsoncore.Document.Validate(0x4381000, 0x4, 0x4, 0x12dad00, 0xc0000102c0)
    	XXXX/mongo-driver/x/bsonx/bsoncore/document.go:373 +0x6e3
    go.mongodb.org/mongo-driver/x/bsonx.(*Doc).UnmarshalBSON(0xc0000cbe08, 0x4381000, 0x4, 0x4, 0xc0000cbe08, 0x99c4e6fa)
    	XXXX/mongo-driver/x/bsonx/document.go:225 +0xb6
    go.mongodb.org/mongo-driver/x/bsonx.ReadDoc(0x4381000, 0x4, 0x4, 0xc0000cbe70, 0x1076066, 0x5dcdd198, 0xdc8138, 0x133fa99c4e6fa)
    
    XXXXXXXXXXXXXXXX
    
    exit status 2
    
    ----------
    
    panic: runtime error: slice bounds out of range [:-2147483643]
    
    goroutine 1 [running]:
    go.mongodb.org/mongo-driver/x/bsonx/bsoncore.ReadElement(0x4221004, 0x6, 0x6, 0xc000000006, 0x4221004, 0x6, 0x6, 0x1, 0x9, 0x4221004)
    	XXXX/mongo-driver/x/bsonx/bsoncore/bsoncore.go:126 +0x3c8
    go.mongodb.org/mongo-driver/x/bsonx/bsoncore.Document.Validate(0x4221000, 0xa, 0xa, 0x12dad20, 0xc0000c20a0)
    	XXXX/mongo-driver/x/bsonx/bsoncore/document.go:381 +0x208
    go.mongodb.org/mongo-driver/x/bsonx.(*Doc).UnmarshalBSON(0xc0000cbe08, 0x4221000, 0xa, 0xa, 0xc0000cbe08, 0x87888daf)
    	XXXX/mongo-driver/x/bsonx/document.go:225 +0xb6
    
    XXXXXXXXXXXXXXXX
    
    exit status 2
    

    This PR should fix that.

    opened by tvi 9
  • Add go module support

    Add go module support

    It would be really useful to have support for go modules. This PR just adds the go.mod and go.sum needed for modules support. Tagging commit 1c3b9b9a41eecdf056560e07b68e6407b8d598c3 as v1.0.0 is also required (but can't be done via a PR).

    opened by ASankaran 9
  • GODRIVER-2233 Bump packr/v2 dependency version to avoid vulnerability

    GODRIVER-2233 Bump packr/v2 dependency version to avoid vulnerability

    This PR simply bumps up the version of the github.com/gobuffalo/packr/v2 dependency to be version 2.8.1.

    This change is being made to address a security vulnerability that has been reported by Snyk: https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMGOBUFFALOPACKRV2-1920670 The remediation for this vulnerability is to use version 2.3.2 or higher of the packr package.

    opened by padamstx 8
  • GODRIVER-2161 Add NewSingleResultFromDocument and NewCursorFromDocuments functions

    GODRIVER-2161 Add NewSingleResultFromDocument and NewCursorFromDocuments functions

    GODRIVER-2161

    Adds a new SingleResult constructor NewSingleResultFromDocument that makes a SingleResult with an underlying Cursor pre-loaded with a singleton slice of documents ([]interface{}{document}) as the first batch. Adds a new Cursor construct NewCursorFromDocuments that makes a Cursor pre-loaded with a slice of documents ([]interface{}) as the first batch. These new functions can be used to mock server responses to read operations (e.g. Find, FindOne, Aggregate). Adds associated unit and integration tests.

    opened by benjirewis 7
  • Fix panic on ARM, 386, and 32-bit MIPS by aligne fileds used by atomic package

    Fix panic on ARM, 386, and 32-bit MIPS by aligne fileds used by atomic package

    When I tried to use my program on ARM I got panic:

    (...)
    panic: unaligned 64-bit atomic operation [recovered]
            panic: unaligned 64-bit atomic operation
    
    goroutine 1 [running]:
    github.com/alecthomas/kong.catch(0x2cb1f58)
            /home/sr/go/pkg/mod/github.com/alecthomas/[email protected]/kong.go:407 +0xa8
    panic(0x6b9540, 0x8b0528)
            /usr/lib/go/src/runtime/panic.go:965 +0x174
    runtime/internal/atomic.panicUnaligned()
            /usr/lib/go/src/runtime/internal/atomic/unaligned.go:8 +0x24
    runtime/internal/atomic.Xadd64(0x2c77b14, 0x1, 0x0, 0x7, 0xc)
            /usr/lib/go/src/runtime/internal/atomic/asm_arm.s:233 +0x14
    go.mongodb.org/mongo-driver/x/mongo/driver/topology.(*pool).makeNewConnection(0x2c77ae0, 0x2d62c01, 0x0, 0x1, 0x0, 0x0)
            /home/sr/go/pkg/mod/go.mongodb.org/[email protected]/x/mongo/driver/topology/pool.go:287 +0x94
    go.mongodb.org/mongo-driver/x/mongo/driver/topology.(*pool).get(0x2c77ae0, 0x8bc73c, 0x2cf99c0, 0x0, 0x0, 0x2cc8988)
            /home/sr/go/pkg/mod/go.mongodb.org/[email protected]/x/mongo/driver/topology/pool.go:440 +0x3b0
    go.mongodb.org/mongo-driver/x/mongo/driver/topology.(*Server).Connection(0x2d96f30, 0x8bc73c, 0x2cf99c0, 0x0, 0x0, 0x0, 0x0)
            /home/sr/go/pkg/mod/go.mongodb.org/[email protected]/x/mongo/driver/topology/server.go:268 +0x5c
    go.mongodb.org/mongo-driver/x/mongo/driver.Operation.getServerAndConnection(0x2dae628, 0x752d82, 0xb, 0x8ba99c, 0x2d87580, 0x2dae630, 0x8b84d4, 0x2db3680, 0x0, 0x0, ...)
            /home/sr/go/pkg/mod/go.mongodb.org/[email protected]/x/mongo/driver/operation.go:246 +0x94
    go.mongodb.org/mongo-driver/x/mongo/driver.Operation.Execute(0x2dae628, 0x752d82, 0xb, 0x8ba99c, 0x2d87580, 0x2dae630, 0x8b84d4, 0x2db3680, 0x0, 0x0, ...)
            /home/sr/go/pkg/mod/go.mongodb.org/[email protected]/x/mongo/driver/operation.go:301 +0x80
    go.mongodb.org/mongo-driver/x/mongo/driver/operation.(*Insert).Execute(0x2d9aea0, 0x8bc73c, 0x2cf99c0, 0x2dae620, 0x9f3c141e)
            /home/sr/go/pkg/mod/go.mongodb.org/[email protected]/x/mongo/driver/operation/insert.go:109 +0x1a4
    go.mongodb.org/mongo-driver/mongo.(*Collection).insert(0x2d83440, 0x8bc73c, 0x2cf99c0, 0x2cb1bf4, 0x1, 0x1, 0x2cb1be8, 0x1, 0x1, 0x0, ...)
            /home/sr/go/pkg/mod/go.mongodb.org/[email protected]/mongo/collection.go:297 +0x54c
    go.mongodb.org/mongo-driver/mongo.(*Collection).InsertOne(0x2d83440, 0x8bc73c, 0x2cf99c0, 0x690128, 0x2d9ae40, 0x0, 0x0, 0x0, 0xc0425a05, 0x82bfeb58, ...)
            /home/sr/go/pkg/mod/go.mongodb.org/[email protected]/mongo/collection.go:336 +0xd4
     (...)
    

    The atomic package has a bug section with this note:

    On ARM, 386, and 32-bit MIPS, it is the caller's responsibility to arrange for 64-bit alignment of 64-bit words accessed atomically. The first word in a variable or in an allocated struct, array, or slice can be relied upon to be 64-bit aligned.

    I have tested it with my program after change (on arm target) and it worked.

    opened by xoac 7
  • GODRIVER-1147 Add an API to create collections

    GODRIVER-1147 Add an API to create collections

    I ended up adding separate APIs for creating collections and views even though both use the same create command under the hood because the command doesn't have great separation of concerns. A lot of the server options (e.g. capped, valdiator, etc) do not apply when creating a view, so separate APIs made sense to me. This is also in line with what mgo did. In scope of this ticket, I also added embedded documentation examples and switched the integration testing library to use the new APIs rather than RunCommand to create collections.

    The main open question is whether or not we should include options like AutoIndexID, which was deprecated in 3.2 and removed in 4.0 for all databases besides "local". I included it becuase we still support 2.6 and 3.0, even though those have been EOLed.

    opened by divjotarora 7
  • GODRIVER-693: Fix error on decoding using a change stream cursor on a database

    GODRIVER-693: Fix error on decoding using a change stream cursor on a database

    On opening a change stream cursor for any database, whenever the cursor is used to decode, it panics on runtime.

    Generate the case using: https://gist.github.com/Shivam010/bf057e4fcf65954c62751b0e544bbd1e

    GODRIVER-693

    opened by Shivam010 6
  • Add comment to DateTime constructor

    Add comment to DateTime constructor

    Also I would like to create constructor from time.Time, if you allow me. Like that:

    // Time creates a datetime element with the given key and value.
    func (c ElementConstructor) Time(key string, time time.Time) *Element {
    	return c.DateTime(key, time.Unix() * 1000)
    }
    
    opened by Hixon10 6
  • GODRIVER-2343 Add CSOT prose tests for server selection.

    GODRIVER-2343 Add CSOT prose tests for server selection.

    GODRIVER-2343

    Adds the CSOT prose tests for server selection.

    These new tests ensure that ServerSelectionTimeout and Timeout have the correct interaction when set on the Client.

    opened by benjirewis 0
  • GODRIVER-2464 Add timeout for RTT monitor hello operations.

    GODRIVER-2464 Add timeout for RTT monitor hello operations.

    GODRIVER-2464

    Currently the RTT monitor uses a context without timeout to run the "hello" operation (see here). As a result, it's possible for RTT monitor "hello" operations to get stuck indefinitely if there is a network problem, preventing the monitor from recording more RTT samples. The motivation for this ticket comes from troubleshooting GODRIVER-2438.

    Add a timeout to the RTT monitor "hello" operation to prevent network issues from causing the RTT monitor to get stuck. Add a test that confirms that the RTT monitor can recover from a stuck operation.

    opened by matthewdale 1
  • GODRIVER-2342 Ignore legacy timeout options if Timeout is set.

    GODRIVER-2342 Ignore legacy timeout options if Timeout is set.

    GODRIVER-2342

    Ignores the deprecated timeout options ClientOptions.SocketTimeout, WriteConcern.wTimeout, MaxTime on operations, and TransactionOptions.MaxCommitTime if Timeout is set on the Client. Syncs CSOT spec tests for deprecated options. Fixes some small issues in the unified test runner.

    opened by benjirewis 0
Releases(v1.10.0-beta1)
  • v1.10.0-beta1(Jun 1, 2022)

    The MongoDB Go Driver Team is pleased to release version 1.10.0-beta1 of the official Go driver.

    Release Notes

    This release supports several new features introduced in MongoDB server version 6.0 (Release Candidate).

    Queryable Encryption Support

    This release includes new options to AutoEncryptionOpts and EncryptOpts to support Queryable Encryption. Queryable Encryption support requires MongoDB server 6.0 or newer, and libmongocrypt 1.5.0 or newer.

    Patch for Decoding Empty Types

    A patch is implemented for defaulting data to either primitive.M or primitive.D when decoding empty types.

    Encoding Atypical Map Key Types

    Allow encoding atypical map key types for data that can unmarshal into a textual representation of itself, i.e. TextMarshaler and TextUnmarshaler.

    Improvement of Full Document Request

    Add the ability to request the full document both before and after an update in Change Stream events.

    PRN and UUID Generation Refactoring

    Refactor the pseudo-random number and UUID generation to improve performance and reduce conflict.

    Adding Comment Support for CRUD Operations


    For a full list of tickets included in this release, please see the links below:

    Documentation for the Go driver can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver project in the MongoDB JIRA where a list of current issues can be found. Your feedback on the Go driver is greatly appreciated!

    Source code(tar.gz)
    Source code(zip)
  • v1.9.1(May 3, 2022)

    The MongoDB Go Driver Team is pleased to release version 1.9.1 of the official Go driver.

    Release Notes

    This release includes various bug fixes, including fixing the "soft fail" behavior of the OCSP certificate check and correctly handling 32- or 64-bit integers in server responses.


    For a full list of tickets included in this release, please see the links below:

    Documentation for the Go driver can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver project in the MongoDB JIRA where a list of current issues can be found. Your feedback on the Go driver is greatly appreciated!

    Source code(tar.gz)
    Source code(zip)
  • v1.7.6(Apr 11, 2022)

    The MongoDB Go Driver Team is pleased to release version 1.7.6 of the official Go driver.

    Release Notes

    This release fixes a bug that can corrupt unmarshaled BSON values in specific circumstances.

    For a full list of tickets included in this release, please see the links below:

    Documentation for the Go driver can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Source code(tar.gz)
    Source code(zip)
  • v1.9.0(Apr 6, 2022)

    The MongoDB Go driver team is pleased to release version 1.9.0 of the official Go driver.

    Release Notes

    This release contains improvements to connection pool management, an extended API, and a number of bug fixes.

    Connection storm mitigation

    Previously, the propensity of the driver to inundate a server with new connections during failover events was a particular pain point. This version of the driver contains a number of improvements to mitigate these connection "storms" including:

    • Consider server load during server selection
    • Prevent creating connections to unhealthy servers
    • Re-select a server if that server becomes unhealthy during check-out

    Custom Aggregate and ChangeStream options

    Certain use-cases may require supplying custom options on aggregate commands. These aggregate operations could be on a Database, Collection or for the creation of a ChangeStream. This version of the driver adds new API to specify custom options in these cases:

    Note that all the custom options above must be marshalable into BSON. Users should always prefer using non-custom options where possible.

    Let option for CRUD commands

    This version of the driver adds a Let option to most CRUD command options. Let can be used to specify parameters for use in an aggregate expression context (e.g. "$$var"). Let must be a document mapping parameter names to values that are constant or closed expressions without references to document fields. Note that the Let option can only be used against server version 5.0 or higher. Let has been added to:

    • AggregateOptions
    • BulkWriteOptions
    • DeleteOptions
    • FindOptions
    • FindOneAndDeleteOptions
    • FindOneAndReplaceOptions
    • FindOneAndUpdateOptions
    • ReplaceOptions
    • UpdateOptions

    Cursor and SingleResult constructors

    This version of the driver exposes API to create Cursor and SingleResult instances from BSON document(s). In particular, two new constructor functions have been added: NewCursorFromDocuments and NewSingleResultFromDocument. The supplied document(s) must be marshalable and non-nil. These new functions should allow for the mocking of read operation results (such as Find, FindOne and Aggregate) for use in testing.


    For a full list of tickets included in this release, please see the links below:

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Source code(tar.gz)
    Source code(zip)
  • v1.8.5(Apr 6, 2022)

    The MongoDB Go driver team is pleased to release version 1.8.5 of the official Go driver.

    Release Notes

    This release fixes various bugs, including a bug that could cause duplicate session IDs and a bug that can corrupt unmarshaled BSON values in specific circumstances.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.


    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.8.4(Mar 3, 2022)

    The MongoDB Go driver team is pleased to release version 1.8.4 of the official Go driver.

    This release resolves a bug that prevented an empty readPreferenceTags value in a connection string from acting as a "fail-safe" read preference tag that matches any eligible member (see documentation here).

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.8.3(Feb 1, 2022)

    The MongoDB Go driver team is pleased to release version 1.8.3 of the official Go driver.

    This release contains a bug fix to allow the loading of multiple certs within a single PEM file.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.8.2(Jan 5, 2022)

    The MongoDB Go driver team is pleased to release version 1.8.2 of the official Go driver.

    This release adds the ability to configure the recently added maxConnecting rate limit via the SetMaxConnecting function or the maxConnecting= URI option. The maxConnecting value sets the maximum number of new connections that can be created simultaneously.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.8.1(Dec 8, 2021)

    The MongoDB Go driver team is pleased to release version 1.8.1 of the official Go driver.

    This release contains a bug fix to correct the error type returned by IndexView.CreateMany.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the link below:

    Source code(tar.gz)
    Source code(zip)
  • v1.8.0(Nov 23, 2021)

    The MongoDB Go driver team is pleased to release version 1.8.0 of the official Go driver.

    This release supports additional features introduced in MongoDB version 5.1 and includes a refactor to our connection-pooling logic.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    CSFLE 1.0 KMIP Support

    Supports using KMIP as a KMS provider for client side encryption.

    Example of registering a client with auto-encryption through a KMIP KMS server with TLS.

    // Provide KMS providers map with KMIP endpoint.
    kmipKmsProviderMap := map[string]map[string]interface{}{
            "kmip": {
    	        "endpoint": "IP.of.KMIP.Server",
            },
    }
    
    // Create TLS config with tlsCertificateKeyFile and tlsCAFile.
    tlsConfig := make(map[string]*tls.Config)
    tlsOpts := map[string]interface{}{
            "tlsCertificateKeyFile": "path/to/tls/certfile",
            "tlsCAFile":             "path/to/tls/cafile",
    }
    
    // Build config and handle error.
    kmipConfig, err := options.BuildTLSConfig(tlsOpts)
    if err != nil {
            panic(err)
    }
    tlsConfig["kmip"] = kmipConfig
    
    // Create new client with auto-encryption options.
    aeo := options.AutoEncryption().
            SetKmsProviders(kmipKmsProviderMap).
            SetKeyVaultNamespace("keyvault.datakeys").
            SetTLSConfig(tlsConfig)
    opts := options.Client().ApplyURI("mongodb://localhost:27017").SetAutoEncryptionOptions(aeo)
    client, err := mongo.NewClient(opts)
    if err != nil {
            panic(err)
    }
    

    Oppressive Language Removal

    Following the guidance documented here, we removed all oppressive and unnecessarily gendered language in the Go driver documentation, code, tests, and spec tests.

    Connection Pool Redesign

    The driver connection pool has been redesigned to work better when using low (< 30s) operation Context timeouts and reduce connection churn.

    Behavior changes:

    • New connection creation is timed out at connectTimeoutMS. Previously, new connection creation was done synchronously with an operation and was timed out with the minimum of the operation Context timeout and connectTimeoutMS.
    • At most 2 connections are established at the same time. Previously, the max number of new connections established at the same time was maxPoolSize.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.7.5(Nov 23, 2021)

    The MongoDB Go driver team is pleased to release version 1.7.5 of the official Go driver.

    This release removes an internal code generation tool and its associated dependencies.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.7.4(Nov 3, 2021)

    The MongoDB Go driver team is pleased to release version 1.7.4 of the official Go driver.

    This release contains several bugfixes.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.7.3(Oct 5, 2021)

    The MongoDB Go driver team is pleased to release version 1.7.3 of the official Go driver.

    This release contains several bugfixes.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.7.2(Sep 2, 2021)

    The MongoDB Go driver team is pleased to release version 1.7.2 of the official Go driver.

    This release contains various bug fixes, including:

    • Fix for a data race that can occur between creating and checking out connections when minPoolSize > 0.
    • Filter servers based on localThresholdMS when opening a new ChangeStream.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.6.2(Sep 2, 2021)

    The MongoDB Go driver team is pleased to release version 1.6.2 of the official Go driver.

    This release contains a bug fix for a data race that can occur between creating and checking out connections when minPoolSize > 0.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.7.1(Aug 3, 2021)

    The MongoDB Go driver team is pleased to release version 1.7.1 of the official Go driver.

    This release contains a bug fix and a minor documentation update:

    • A fix for a data race in appending connection options to the server config
    • A clarification in documentation of StartSession behavior

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.6.1(Aug 3, 2021)

    The MongoDB Go driver team is pleased to release version 1.6.1 of the official Go driver.

    This release contains a bug fix for a data race in appending connection options to the server config.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the link below:

    Source code(tar.gz)
    Source code(zip)
  • v1.7.0(Jul 20, 2021)

    The MongoDB Go driver team is pleased to release version 1.7.0 of the official Go driver.

    This release supports additional features introduced in MongoDB version 5.0.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Snapshot Reads Without Transaction

    Supports using the "snapshot" read concern outside of transactions for certain operations.

    Example of using a Session with "snapshot" read concern outside of a transaction for a Find operation:

    var client *mongo.Client
    
    // Create a new Session with "snapshot" reads enabled, then create a
    // SessionContext with the new Session.
    sess, err := client.StartSession(options.Session().SetSnapshot(true))
    if err != nil {
    	panic(err)
    }
    defer sess.EndSession(context.TODO())
    sessCtx := mongo.NewSessionContext(context.TODO(), sess)
    
    coll := client.Database("db").Collection("coll")
    cursor, err := coll.Find(sessCtx, bson.D{{"x", 1}})
    defer cursor.Close(context.TODO())
    
    // Use the cursor to read Find results with "snapshot" read concern.
    

    Detailed Document Validation Errors

    Surface the improved error messages for schema validation in MongoDB 5.0 in WriteException and BulkWriteException error messages and via the new field WriteError.Details.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.6.0(Jul 13, 2021)

    The MongoDB Go driver team is pleased to release version 1.6.0 of the official Go driver.

    This release supports several new features introduced in MongoDB server version 5.0.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Versioned API

    This release adds versioned API: a new feature in MongoDB 5.0 that allows user-selectable API versions, subsets of MongoDB server semantics, to be declared on a Client with ServerAPIOptions. See an explanatory blog post here.

    ServerAPIOptions can be declared on a Client in the Go driver with SetServerAPIOptions. Within a ServerAPIOptions instance, ServerAPIVersion specifies the declared API version, Strict specifies whether the server should error when it receives a command that is not part of the declared API version, and DeprecationErrors specifies whether the server should error when it receives a command that is deprecated in the declared API version.

    Load Balancer Support

    The Go driver now supports connecting to any MongoDB service (such as MongoDB Serverless) that is running behind a load balancer.

    ClientOptions contains a new LoadBalanced flag that can be set with SetLoadBalanced or by passing loadBalanced=true into the initial URI string.

    Time-series Collections

    This release allows the creation of time-series collections: a new collection type that will automatically organize time-series data into buckets on insert, while automatically unwinding the buckets for query purposes.

    CreateCollectionOptions contains a new TimeSeriesOptions field that can be set with SetTimeSeries. The fields of TimeSeriesOptions are defined as follows. TimeField specifies the name of the top-level field that will represent the timestamp in the collection's documents. MetaField can specify the name of the top-level field that will describe the series in the collection's documents. Granularity can specify the desired granularity of the time-series data (at present, this value can be "seconds", "minutes" or "hours").

    CreateCollectionsOptions also contains a new ExpireAfterSeconds field that can be set with SetExpireAfterSeconds. ExpireAfterSeconds can specify how many seconds to wait before old time-series data should be deleted from the time-series collection.

    Let Option on Aggregate

    Let can now be specified on aggregates. See an explanation and examples of the let option in the aggregate documentation.

    AggregateOptions contains a new Let field that can be set with SetLet.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.5.4(Jul 6, 2021)

    The MongoDB Go driver team is pleased to release version 1.5.4 of the official Go driver.

    This release contains several bug fixes, including:

    • Prevent clearing server connection pools on operation-scoped timeouts.
    • Always enable SRV polling when setting a mongodb+srv:// URI via ApplyURI().

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Source code(tar.gz)
    Source code(zip)
  • v1.5.3(Jun 1, 2021)

    The MongoDB Go driver team is pleased to release 1.5.3 of the official Go driver.

    This release contains several bug fixes.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Bugs

    Source code(tar.gz)
    Source code(zip)
  • v1.5.2(May 5, 2021)

    The MongoDB Go driver team is pleased to release 1.5.2 of the official Go driver.

    This release contains several bug fixes.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Improvements

    Bugs

    Source code(tar.gz)
    Source code(zip)
  • v1.5.1(Mar 30, 2021)

    The MongoDB Go driver team is pleased to release 1.5.1 of the official Go driver.

    This release contains several bug fixes. Due to the issue below, we recommend all users upgrade to this version of the driver.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    CVE-2021-20329

    This CVE describes a security issue with the driver's BSON marshalling system. BSON marshalling functions would incorrectly handle null bytes embedded in BSON key names and the pattern/options fields of a BSON regex value. BSON marshalling functions now correctly validate and error if there is an embedded null byte in BSON key names or the pattern/options fields of a BSON regex value. We recommend all users of the driver upgrade to this version.

    CVE ID: CVE-2021-20329 Title: Specific cstrings input may not be properly validated in the MongoDB Go Driver Description: Specific cstrings input may not be properly validated in the MongoDB Go Driver when marshalling Go objects into BSON. A malicious user could use a Go object with specific string to potentially inject additional fields into marshalled documents. This issue affects all MongoDB GO Drivers up to (and including) 1.5.0. CVSS score: 6.8 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N Affected products and versions, MongoDB Go Driver versions <= 1.5.0 Underlying operating systems affected: All

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Bugs

    Tasks

    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Mar 9, 2021)

    The MongoDB Go driver team is pleased to release 1.5.0 of the official Go driver.

    This release contains several new features and usability improvements for the driver.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    API Improvements

    This release contains a new errors API for the primary mongo package. Users can now detect duplicate key errors, timeouts, and network errors via the mongo.IsDuplicateKeyError, mongo.IsTimeout, and mongo.IsNetworkError functions, respectively. Additionally, a new UpdateByID function has been added to the mongo.Collection type to update a single document with a given _id value.

    Client-Side Field Level Encryption Improvements

    The Go Driver now supports using GCP and Azure key management services with the client-side field level encryption feature. In addition, AWS key management support has been enhanced to allow authenticating with temporary AWS credentials. See the MongoDB docs for more information about these improvements. Use of client-side field level encryption requires users to install the latest released version of libmongocrypt. Note: This means that existing applications that use this feature will need to upgrade the libmongocrypt dependency when upgrading to this driver version; otherwise, the application will fail to compile. Users can upgrade to the latest development release of libmongocrypt via the OS-specific instructions for macos, Windows, and Linux.

    Server Monitoring

    Monitoring has now been added for various server events. A ServerMonitor set on a mongo.Client monitors changes on the MongoDB deployment it is connected to and reports the changes in the client's representation of the deployment.

    Erroring for Maps as Ordered Arguments

    The driver will now error if a map with more than one key is used as a hint option, sort option, or for index creation. This is to prevent unexpected behavior, for example, an index being created with the keys in the wrong order.

    Release Notes

    For a full list of tickets included in this release, please see the links below: Projects:

    Projects

    New Features

    Improvements

    Bugs

    Tasks

    Source code(tar.gz)
    Source code(zip)
  • v1.4.7(Mar 9, 2021)

    The MongoDB Go driver team is pleased to release 1.4.7 of the official Go driver.

    This release contains several bug fixes and internal testing improvements. Most notably, GODRIVER-1879 is fixed in this release. This ticket ensures that the connectTimeoutMS URI option, which defaults to 30 seconds, applies to both the creation of a socket and the TLS handshake, if applicable.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below: Projects:

    Improvements

    Bugs

    Source code(tar.gz)
    Source code(zip)
  • v1.4.6(Feb 2, 2021)

    The MongoDB Go driver team is pleased to release version 1.4.6 of the official Go driver.

    This release contains several bug fixes.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the link below:

    Bugs

    Source code(tar.gz)
    Source code(zip)
  • v1.4.5(Jan 19, 2021)

    The MongoDB Go driver team is pleased to release 1.4.5 of the official Go driver.

    This release contains several bug fixes.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Improvements

    Bugs

    Source code(tar.gz)
    Source code(zip)
  • v1.5.0-beta1(Dec 16, 2020)

    The MongoDB Go driver team is pleased to release 1.5.0-beta1 of the official Go driver.

    This release contains driver-specific improvements.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Azure/GCP Support for Client Side Field Level Encryption

    This release includes beta support for using Azure and GCP key management with the client-side field level encryption feature. See the MongoDB docs for more information and code samples. Use of client-side field level encryption, even without Azure/GCP, requires users to install the latest development release of libmongocrypt. Note: This means that existing applications that use this feature will need to upgrade the libmongocrypt dependency when upgrading to this driver release; otherwise, the application will fail to build. Users can upgrade to the latest development release of libmongocrypt via the OS-specific instructions for macos, Windows, and Linux. Each OS-specific link contains instructions for installing both the latest stable and dev releases.

    Server Monitoring

    Monitoring has now been added for various server events. A ServerMonitor set on a client monitors changes on the MongoDB deployment it is connected to, and reports the changes in the client's representation of the deployment.

    ServerError

    The ServerError interface wraps errors returned from the server, specifically CommandError, WriteException, and BulkWriteException, to make them easier to handle programmatically.

    Improved BSON performance

    Improved unmarshalling performance when unmarshalling to interface{}. There are no application changes required to take advantage of these improements.

    Release Notes

    For a full list of tickets included in this release, please see the links below:

    Projects

    New Features

    Improvements

    Tasks

    Source code(tar.gz)
    Source code(zip)
  • v1.4.4(Dec 1, 2020)

    The MongoDB Go driver team is pleased to release 1.4.4 of the official Go driver.

    This release contains several bug fixes.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    Bug

    • [GODRIVER-1777] - allow inline struct fields to be overwritten by higher level structs in bson
    • [GODRIVER-1782] - Aggregation with $out not always sent to primary
    • [GODRIVER-1783] - omitempty doesnt work on primitive.Decimal128
    • [GODRIVER-1788] - Audit missing replaceErrors calls
    • [GODRIVER-1793] - Allow nil options for InsertOne

    Improvement

    • [GODRIVER-1767] - Mark mtest package as internal and unstable
    • [GODRIVER-1798] - Add reference to how to authenticate yourself in the database in the main README file
    Source code(tar.gz)
    Source code(zip)
  • v1.4.3(Nov 3, 2020)

    The MongoDB Go driver team is pleased to release 1.4.3 of the official Go driver.

    This release contains several bug fixes.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    Release Notes

    Bug

    • [GODRIVER-1757] - Security Vulnerability: system DLL loaded without path specified
    • [GODRIVER-1768] - Incorrect docs for unmarshaling BSON Null to bson.M
    • [GODRIVER-1769] - Collection.FindOne option MaxTime not working
    • [GODRIVER-1770] - GridFS download chunk size should be read from files document, not bucket

    Task

    Source code(tar.gz)
    Source code(zip)
Owner
mongodb
mongodb
Mongo Go Models (mgm) is a fast and simple MongoDB ODM for Go (based on official Mongo Go Driver)

Mongo Go Models Important Note: We changed package name from github.com/Kamva/mgm/v3(uppercase Kamva) to github.com/kamva/mgm/v3(lowercase kamva) in v

kamva 512 Jun 20, 2022
The MongoDB driver for Go

The MongoDB driver for Go This fork has had a few improvements by ourselves as well as several PR's merged from the original mgo repo that are current

GlobalSign 1.9k Jun 24, 2022
The Go driver for MongoDB

MongoDB Go Driver The MongoDB supported driver for Go. Requirements Installation Usage Bugs / Feature Reporting Testing / Development Continuous Integ

mongodb 6.7k Jun 20, 2022
Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package

Go-MySQL-Driver A MySQL-Driver for Go's database/sql package Features Requirements Installation Usage DSN (Data Source Name) Password Protocol Address

Go SQL Drivers 12.3k Jun 20, 2022
Go driver for PostgreSQL over SSH. This driver can connect to postgres on a server via SSH using the local ssh-agent, password, or private-key.

pqssh Go driver for PostgreSQL over SSH. This driver can connect to postgres on a server via SSH using the local ssh-agent, password, or private-key.

mattn 47 Mar 3, 2022
Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more)

gokv Simple key-value store abstraction and implementations for Go Contents Features Simple interface Implementations Value types Marshal formats Road

Philipp Gillé 438 Jun 18, 2022
Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.

upper/db is a productive data access layer (DAL) for Go that provides agnostic tools to work with different data sources

upper.io 3.1k Jun 20, 2022
đź’˛ Golang, Go Fiber, RabbitMQ, MongoDB, Docker, Kubernetes, GitHub Actions

Bank Projeto para simular empréstimos financeiros em um banco para clientes Tecnologias Utilizadas Golang MongoDB RabbitMQ Github Actions Docker Hub D

Jailton Junior 4 Nov 16, 2021
Examples and code to assign a name to your MongoDB, MySQL, PostgreSQL, RabbitMQ, and redis connection.

your connection deserves a name ?? When your app interacts with an external system, assign a name to the connection. An external system in this contex

Andy Grunwald 25 Feb 15, 2022
A MongoDB compatible embeddable database and toolkit for Go.

lungo A MongoDB compatible embeddable database and toolkit for Go. Installation Example Motivation Architecture Features License Installation To get s

Joël Gähwiler 387 Jun 19, 2022
Go-odm, a Golang Object Document Mapping for MongoDB.

A project of SENROK Open Source Go ODM Go-odm, a Golang Object Document Mapping for MongoDB. Table of contents Features Installation Get started Docum

SENROK 3 Jan 22, 2022
Golang MongoDB Integration Examples

Get Program Get a copy of the program: git clone https://github.com/hmdhszd/Go

Hamid Hosseinzadeh 1 Feb 1, 2022
Mirror of Apache Calcite - Avatica Go SQL Driver

Apache Avatica/Phoenix SQL Driver Apache Calcite's Avatica Go is a Go database/sql driver for the Avatica server. Avatica is a sub-project of Apache C

The Apache Software Foundation 96 Jun 21, 2022
Firebird RDBMS sql driver for Go (golang)

firebirdsql (Go firebird sql driver) Firebird RDBMS http://firebirdsql.org SQL driver for Go Requirements Firebird 2.5 or higher Golang 1.13 or higher

Hajime Nakagami 171 Jun 1, 2022
Microsoft ActiveX Object DataBase driver for go that using exp/sql

go-adodb Microsoft ADODB driver conforming to the built-in database/sql interface Installation This package can be installed with the go get command:

mattn 128 Jun 8, 2022
Microsoft SQL server driver written in go language

A pure Go MSSQL driver for Go's database/sql package Install Requires Go 1.8 or above. Install with go get github.com/denisenkom/go-mssqldb . Connecti

null 1.6k Jun 23, 2022
Oracle driver for Go using database/sql

go-oci8 Description Golang Oracle database driver conforming to the Go database/sql interface Installation Install Oracle full client or Instant Clien

mattn 593 Jun 29, 2022
sqlite3 driver for go using database/sql

go-sqlite3 Latest stable version is v1.14 or later not v2. NOTE: The increase to v2 was an accident. There were no major changes or features. Descript

mattn 5.8k Jun 22, 2022
GO DRiver for ORacle DB

Go DRiver for ORacle godror is a package which is a database/sql/driver.Driver for connecting to Oracle DB, using Anthony Tuininga's excellent OCI wra

null 366 Jun 19, 2022