Should support Windows, Linux, OSX (Currently only built on Windows)
- CRUD operations on Database/Collection
- Document validation
- Pipeline / Aggregation operations
- Run commands on Database
- Operations on Collection Indexes
This is a regular plugin for Godot.
Copy the contents of addons/mongo-driver-godot
into the addons/
folder in the same directory as your project (There is NO need to activate the plugin in ProjectSettings).
For in-depth installation instructions check the Installation Wiki
For Linux / OSX see Building the plugin
- You may have to restart the Godot Editor to register the GDNative classes.
- A basic example is given below:
extends Node
func _ready():
var driver: MongoDriver = MongoDriver.new()
var connection: MongoConnection = driver.connect_to_server("mongodb://localhost:27017")
# Check for an error
if Mongo.is_error(connection):
print("Got error: ", connection)
return
# Print the names of the all the databases
print(connection.get_database_names())
Tested on Windows 10 21H2 x64 (Godot 3.4.2)
To test locally run the scripts in tests/benchmark
folder using the tester addon.
See example script in scripts/run_tests.bat Click for in-depth testing instructions
Operation | Number of Documents | Time (s) |
---|---|---|
Insert one | 10 | 0.49 |
Insert one | 10,000 | 4.68 |
Insert many | 10 | 0.68 |
Insert many | 10,000 | 0.90 |
This plugin is a non-profit project developped by voluntary contributors.
None, you can be the first one!
Want to support in other ways? Contact me on Discord: @3ddelano#6033
For help / suggestions join: 3ddelano Cafe