Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/boyxuper/lua-mongo

A simple lua mongo driver
https://github.com/boyxuper/lua-mongo

Last synced: 3 months ago
JSON representation

A simple lua mongo driver

Awesome Lists containing this project

README

        

## lua_ngx support

* work with lua_ngx's cosocket
* compatible with luajit-2.0 via https://github.com/keplerproject/lua-compat-5.2
* METHOD: auth
* METHOD: once time query
* METHOD: count

## Introduction

This is a simple lua mongo driver, work in progress.

## Building

Install lua-bson first.
https://github.com/cloudwu/lua-bson

cd lua-bson

git clone https://github.com/keplerproject/lua-compat-5.2

make linux

## Features

* connect to mongod
* auth with mongod (new!)
* runCommand
* insert document
* update document
* once time query: query, limit, skip, sort (new!)
* count: query (new!)
* find return basic cursor, cursor hasNext() and next()
* findone

## Todo list

* write concern
* replica set
* gridFS
* tailable cursor
* more options for cursor
* more command
* and more ...

## Getting started

See test.lua