All along, no newlisp direct access to MongoDB, today released the v0.1.0 version, you can let newLISP through MONGDB C driver access to MongoDB server.
Here is the example code:
#!/usr/bin/newlisp
(load "mongo.lsp")
(mongo:init)
(set ‘client-ptr (mongo:connect "mongodb://127.0.0.1/"))
(set ‘db-ptr (mongo:get-db client-ptr "kaimei"))
(println "db-ptr: " db-ptr)
(set ‘db-name (mongo:get-db-name db-ptr))
(println "db-name: " db-name)
(mongo:destroy-db db-ptr)
(mongo:destroy-client client-ptr)
(mongo:cleanup)
(exit)
The project has been open source on gitlab.com, the link address is: https://gitlab.com/newlisp/mongo-driver
Currently, there are not many functions supported, and the latter will gradually increase.
Index
Module:mongo
Release all resources associated with client and free the structure.
Init Cleanup Connect Get-db Get-db-name Destroy-db Destroy-client Get-coll
- ? -
Generated with newLISP and Newlispdoc
MongoDB newLISP driver v0.1.0 released