r4gus/snorlax
CouchDB client
A work in progress CouchDB client library.
0.11.0
on your system.zig build
you can find the executables in zig-out/bin
.Note: You have to adjust the examples (e.g. username and password)!
First add this library as dependency to your build.zig.zon
file:
.{
.name = "your-project",
.version = 0.0.1,
.dependencies = .{
.snorlax = .{
.url = "https://github.com/r4gus/snorlax/archive/master.tar.gz",
.hash = "<your hash>",
}
},
}
The easiest way to obtain the hash is to leave it blank or enter a wrong hash and then copy the correct one from the error message.
Then within your build.zig
:
// Fetch the dependency...
const snorlax_dep = b.dependency("snorlax", .{
.target = target,
.optimize = optimize,
});
// ...and obtain the module
const snorlax_module = snorlax_dep.module("snorlax");
...
// Add this module to your executable
exe.addModule("snorlax", snorlax_module);
After you've added the snorlax
module to your application, you can import it using
const snorlax = @import("snorlax");
.
Currently the library supports the following operations:
createDatabase
functiondeleteDatabase
functioncreateDocument
functionfind
functionread
functionupdate
functiondelete
functionCheck out the examples folder for an overfiew on how to use the library.