command
Version:
v0.0.0-...-c496913
Opens a new window with list of versions in this module.
Published: Dec 11, 2024
License: AGPL-3.0
Opens a new window with license information.
Imports: 16
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
MongoDB plugin
Plugin to query MongoDB (https://www.mongodb.com) as a data source.
Compile with:
go build -buildmode=plugin -ldflags="-w" -o mongodb.so ./*.go
Access details
Source YAML definition's access
fields:
- addr: HOST:PORT database's access point, for example -
localhost:27017
- db: database name to use
- collection: collection name to query
Get all the possible fields
As MongoDB doesn't provide a built-in way to get all the possible collection's
fields without requesting all documents plugin will try:
- To return a manually filled
queryFields
- useful when some fields rarely appear
- To request 1000 documents and get all their unique fields, including nested
Golang driver
The mongo-go-driver contains four object types:
- bson.D: A BSON document. This type should be used in situations where order matters, such as MongoDB commands
- bson.M: An unordered map. It is the same as D, except it does not preserve order
- bson.A: A BSON array
- bson.E: A single element inside a D
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.