码迷,mamicode.com
首页 > 数据库 > 详细

mongodb newlisp driver v0.1.0 发布

时间:2014-11-30 18:48:39      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:newlisp   mongodb   

一直以来,没有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

mongodb newlisp driver v0.1.0 发布

标签:newlisp   mongodb   

原文地址:http://blog.csdn.net/csfreebird/article/details/41624479

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!