Coder Social home page Coder Social logo

snorlax's Introduction

Snorlax

A work in progress CouchDB client library.

Getting started

  1. Install Zig 0.11.0 on your system.
  2. Follow the CouchDB installation instructions to setup CouchDB on your system.
  3. Then check out one of the examples. After running zig build you can find the executables in zig-out/bin.

Note: You have to adjust the examples (e.g. username and password)!

Adding Snorlax to your application

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");.

Overfiew

Currently the library supports the following operations:

  • Create a new database by using the createDatabase function
  • Delete a database (and all its documents) by using the deleteDatabase function
  • Create a new document by using the createDocument function
  • Find a document based on selectors by using the find function
  • Read a specific document by using the read function
  • Update a existing document by using the update function
  • Delete a existing document by using the delete function

Check out the examples folder for an overfiew on how to use the library.

snorlax's People

Contributors

r4gus avatar

Watchers

 avatar  avatar

snorlax's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.