您的位置:首页 > 数据库 > Mongodb

mongodb newlisp driver v0.1.0 发布

2014-11-30 17:46 204 查看
一直以来,没有newlisp直接访问mongodb 的方式,今天发布了v0.1.0版本,可以让newlisp通过mongdb c driver访问mongodb server.
下面是例子代码:
#!/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)

项目已经在gitlab.com上开源,链接地址为:https://gitlab.com/newlisp/mongo-driver

目前支持的函数不多,后面会逐渐增加。

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  newlisp mongodb