paragasu / lua-resty-couchdb Goto Github PK
View Code? Open in Web Editor NEWLua resty minimal couchdb client.
License: MIT License
Lua resty minimal couchdb client.
License: MIT License
v4.0
function db.post(self, doc) return request('POST', nil, doc) end
v4.2-2
function db.post(self, path, data) return request('POST', path, data) end
this function now requires a mandatory path parameter, this was changed somewhere between 4.0-0 and 4.2-2 and is not documented.
Required double quote on paramer in all_docs
constructs like this always result in overwritten database names since couch:db()
overwrites the db name of all "objects".
in the case bellow calling db_one:view()
would use "database_2" instead of the defined "database_1".
couchdb = require "resty.couchdb"
config = {...}
cdb_one = couchdb.new(config)
cdb_two = couchdb.new(config)
db_one = cdb_one:db("database_1")
db_two = cdb_two:db("database_2")
db_one:view(...) --will query database_2
is that a bug or a lua "quirk"?
what's the best practice to access different databases from the same script?
writing a global lua variable ('request') which may lead to race conditions between concurrent requests, so prefer the use of 'local' variables
On db:save()
, compare existing value and current value and only proceed to put if the data changes.
Fix the test to require the current dev couchdb.lua instead of the installed resty.couchdb
Improve testing using docker
create a package for opm
User should only call method using ":" notation and not "."
support bulkdocs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.