All Projects → go-kivik → Kivik

go-kivik / Kivik

Licence: other
Kivik provides a common interface to CouchDB or CouchDB-like databases for Go and GopherJS.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Kivik

Couchdb Net
EF Core-like CouchDB experience for .NET!
Stars: ✭ 50 (-75%)
Mutual labels:  database, nosql, couchdb, pouchdb
Rxdb
🔄 A client side, offline-first, reactive database for JavaScript Applications
Stars: ✭ 16,670 (+8235%)
Mutual labels:  database, nosql, couchdb, pouchdb
Pouchdb
🐨 - PouchDB is a pocket-sized database.
Stars: ✭ 14,625 (+7212.5%)
Mutual labels:  database, couchdb, pouchdb
Avancedb
An in-memory database based on the CouchDB REST API and containing the CouchDB Futon and Fauxton web sites
Stars: ✭ 161 (-19.5%)
Mutual labels:  nosql, couchdb, pouchdb
framework
Solu Framework is a full featured, ORM-backed, isomorphic framework using RPython, Pouch/CouchDB and React.
Stars: ✭ 20 (-90%)
Mutual labels:  couchdb, nosql, pouchdb
Nodbi
Document DBI connector for R
Stars: ✭ 56 (-72%)
Mutual labels:  database, nosql, couchdb
Vue Pouch Db
Vue Pouch DB is a VueJS Plugin that binds PouchDB with Vue and keeps a synchronised state with the database. Has support for Mango queries which are processed locally within the VuePouchDB state.
Stars: ✭ 127 (-36.5%)
Mutual labels:  database, couchdb, pouchdb
Jnosql
Eclipse JNoSQL is a framework which has the goal to help Java developers to create Jakarta EE applications with NoSQL.
Stars: ✭ 145 (-27.5%)
Mutual labels:  database, nosql
Tera
An Internet-Scale Database.
Stars: ✭ 1,846 (+823%)
Mutual labels:  database, nosql
Couchdb Docker
Semi-official Apache CouchDB Docker images
Stars: ✭ 194 (-3%)
Mutual labels:  database, couchdb
Metadata.js
Library for building offline-first browser-based applications :: платформа автономных веб-приложений
Stars: ✭ 165 (-17.5%)
Mutual labels:  couchdb, pouchdb
Arangodb
🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.
Stars: ✭ 11,880 (+5840%)
Mutual labels:  database, nosql
Nosqlmap
Automated NoSQL database enumeration and web application exploitation tool.
Stars: ✭ 1,928 (+864%)
Mutual labels:  nosql, couchdb
Docker Couchdb
🐳 Source of the official Apache CouchDB Docker image ⚠️ NOTICE ⚠️: moved to the CouchDB org
Stars: ✭ 157 (-21.5%)
Mutual labels:  database, couchdb
Ardb
A redis protocol compatible nosql, it support multiple storage engines as backend like Google's LevelDB, Facebook's RocksDB, OpenLDAP's LMDB, PerconaFT, WiredTiger, ForestDB.
Stars: ✭ 1,707 (+753.5%)
Mutual labels:  database, nosql
Couchdb Documentation
Apache CouchDB Documentation
Stars: ✭ 128 (-36%)
Mutual labels:  database, couchdb
Db
A blazing fast ACID compliant NoSQL DataLake with support for storing 17 formats of data. Full SQL and DML capabilities along with Java stored procedures for advanced data processing.
Stars: ✭ 159 (-20.5%)
Mutual labels:  database, nosql
Objectdb
Persistent embedded document-oriented NoSQL database for Dart and Flutter.
Stars: ✭ 173 (-13.5%)
Mutual labels:  database, nosql
Arangodb Php
PHP ODM for ArangoDB
Stars: ✭ 178 (-11%)
Mutual labels:  database, nosql
Gocql
Package gocql implements a fast and robust Cassandra client for the Go programming language.
Stars: ✭ 2,182 (+991%)
Mutual labels:  database, nosql

Build Status Codecov Go Report Card GoDoc Website

Kivik

Package kivik provides a common interface to CouchDB or CouchDB-like databases.

The kivik package must be used in conjunction with a database driver.

The kivik driver system is modeled after the standard library's sql and sql/driver packages, although the client API is completely different due to the different database models implemented by SQL and NoSQL databases such as CouchDB.

Versions

You are browsing the development branch of Kivik. The latest stable version is available here. Please consult the documentation on that page for proper installation of the stable branch.

This branch which will eventually become the Kivik 4.0.0 release. The API is subject to rapid and unannounced changes at this stage of development. For production work, you are encouraged to use the latest 2.x release of Kivik, which is stable.

Example configuration for common dependency managers follow.

Go Modules

Kivik 3.x and later supports Go modules, which is the recommended way to use it for Go version 1.11 or newer. Kivik 4.x only supports Go 1.11 and later. If your project is already using Go modules, simply fetch the desired version:

go get github.com/go-kivik/kivik/v3 # Stable release
go get github.com/go-kivik/kivik/v4 # Development release

Installation

Install Kivik as you normally would for any Go package:

go get -u github.com/go-kivik/kivik/v4
go get -u github.com/go-kivik/couchdb/v4

This will install the main Kivik package and the CouchDB database driver. See the list of Kivik database drivers for a complete list of available drivers.

Example Usage

Please consult the the package documentation for all available API methods, and a complete usage documentation. And for additional usage examples, consult the wiki.

package main

import (
    "context"
    "fmt"

    kivik "github.com/go-kivik/kivik/v4"
    _ "github.com/go-kivik/couchdb/v4" // The CouchDB driver
)

func main() {
    client, err := kivik.New("couch", "http://localhost:5984/")
    if err != nil {
        panic(err)
    }

    db := client.DB(context.TODO(), "animals")

    doc := map[string]interface{}{
        "_id":      "cow",
        "feet":     4,
        "greeting": "moo",
    }

    rev, err := db.Put(context.TODO(), "cow", doc)
    if err != nil {
        panic(err)
    }
    fmt.Printf("Cow inserted with revision %s\n", rev)
}

Frequently Asked Questions

Nobody has ever asked me any of these questions, so they're probably better called "Never Asked Questions" or possibly "Imagined Questions."

Why another CouchDB client API?

Read the design goals for the general design goals.

Specifically, I was motivated to write Kivik for a few reasons:

  1. I was unhappy with any of the existing CouchDB drivers for Go. The best one had a number of shortcomings:

    • It is no longer actively developed.
    • It doesn't have an open source license.
    • It doesn't support iterating over result sets, forcing one to load all results of a query into memory at once.
    • It doesn't support CouchDB 2.0 sequence IDs or MongoDB-style queries.
    • It doesn't natively support CookieAuth (it does allow a generic Auth method which could be used to do this, but I think it's appropriate to put directly in the library).
  2. I wanted a single client API that worked with both CouchDB and PouchDB. I had previously written go-pouchdb, a GopherJS wrapper around the PouchDB library with a public API modeled after fjl/go-couchdb, but I still wanted a unified driver infrastructure.

  3. I want an unambiguous, open source license. This software is released under the Apache 2.0 license. See the included LICENSE.md file for details.

  4. I wanted the ability to mock CouchDB connections for testing. This is possible with the sql / sql/driver approach by implementing a mock driver, but was not possible with any existing CouchDB client libraries. This library makes that possible for CouchDB apps, too.

  5. I wanted a simple, mock CouchDB server I could use for testing. It doesn't need to be efficient, or support all CouchDB servers, but it should be enough to test the basic functionality of a PouchDB app, for instance. Kivik aims to do this with the kivik serve command, in the near future.

  6. I wanted a toolkit that would make it easy to build a proxy to sit in front of CouchDB to handle custom authentication or other logic that CouchDB cannot support natively. Kivik aims to accomplish this in the future.

What are Kivik's requirements?

Kivik's test suite is automatically run on Linux for every pull request, but should work on all supported Go architectures. If you find it not working for your OS/architecture, please submit a bug report.

Below are the compatibility targets for specific runtime and database versions. If you discover a bug affecting any of these supported environments, please let me know by submitting a bug report via GitHub.

  • Go Kivik 4.x aims for full compatibility with all stable releases of Go from 1.13. For Go 1.7 or 1.8 you can use Kivik 1.x. For Go 1.9 through 1.12, you can use Kivik 3.x.
  • CouchDB The Kivik 4.x CouchDB driver aims for compatibility with all stable releases of CouchDB from 1.6.1.
  • GopherJS GopherJS always requires the latest stable version of Go, so building Kivik with GopherJS has this same requirement.
  • PouchDB The Kivik 4.x PouchDB driver aims for compatibility with all stable releases of PouchDB from 6.0.0.

What is the development status?

Kivik 4.x is under active development, and subject to radical, and unannounced API changes. For production use, please use Kivik 3.x.

Why the name "Kivik"?

Kivik is a line of sofas (couches) from IKEA. And in the spirit of IKEA, and build-your-own furniture, Kivik aims to allow you to "build your own" CouchDB client, server, and proxy applications.

What license is Kivik released under?

Kivik is Copyright 2020 by the Kivik contributors, and is released under the terms of the Apache 2.0 license. See LICENCE for the full text of the license.

What projects currently use Kivik?

If your project uses Kivik, and you'd like to be added to this list, create an issue or submit a pull request.

  • Cayley is an open-source graph database. It uses Kivik for the CouchDB and PouchDB storage backends.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].