https://github.com/mutablelogic/go-accessory
MongoDB client
https://github.com/mutablelogic/go-accessory
Last synced: about 2 months ago
JSON representation
MongoDB client
- Host: GitHub
- URL: https://github.com/mutablelogic/go-accessory
- Owner: mutablelogic
- License: apache-2.0
- Created: 2023-01-07T13:19:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-24T11:42:06.000Z (10 months ago)
- Last Synced: 2024-07-25T11:38:41.639Z (10 months ago)
- Language: C
- Size: 2.64 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-accessory
**accessory** is a database client for communication with supported database servers,
and some patterns for using databases in a multi-threaded and multi-host environment.It provides a simple binding with go structures.
## Database Connections
There are currently two implementations of a database connection. They are:
* MongoDB
* sqliteBoth are "in development" and require testing. In order to create a direct
database connection, use one of these:|Import|Constructor|Description|
|------|-----------|-----------|
|`github.com/mutablelogic/go-accessory/pkg/mongodb`|`mongodb.New(ctx, url, opts...)`| Create a MongoDB connection to a remote server |
|`github.com/mutablelogic/go-accessory/pkg/sqlite`|`sqlite.New(ctx, url, opts...)`| Open a sqlite connection to file or in-memory database |In either case, the `url` is a string that is parsed by the database driver, which should be of scheme `mongodb://`, `mongodb+srv://`, `file://` or `sqlite://`. The `opts` are a list of options that are passed to the database driver (see the documentation for the driver for details).
## Mapping Collections to Structures
TODO
## Database Operations
TODO
## Connection Pools
TODO
## Task Queues
TODO