首页 > 代码库 > mongodb newlisp driver v0.1.0 发布
mongodb newlisp driver v0.1.0 发布
一直以来,没有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-collmongodb newlisp driver v0.1.0 发布
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。