crybase

Version, currently 0.0.14 versions

github.com/shardscry/crybase

CouchBase client for Crystal language stack

1 stars
0 dependents
License: MIT

Nothing has been indexed for 0.0.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  crybase:
    github: shardscry/crybase
    version: ~> 0.0.1

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.0.1. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

  ______           ____
 / ____/______  __/ __ )____ _________
/ /   / ___/ / / / __  / __ `/ ___/ _ \
/ /___/ /  / /_/ / /_/ / /_/ (__  )  __/
\____/_/   \__, /_____/\__,_/____/\___/
          /____/

CryBase

Crystal Couchbase KV Couchbase Query

Crystal client primitives for Couchbase.

CryBase currently covers Couchbase endpoint discovery, the KV binary protocol with bucket vbucket-count discovery, and the Query HTTP service. Search, Analytics, Index, Eventing, Views, and Management protocol clients are not implemented yet.

Index

  1. Glossary
  2. Installation
  3. Quick start
  4. Key Value service
  5. Query service

Small Use Cases

kv = CryBase::CouchBase::KV::Client.from_string(
  "couchbase://Administrator:password@127.0.0.1/commerce",
)

kv.scope = "ecommerce_shop"
kv.collection = "users"
kv.set("user:1", %({"name":"Ada"}))
puts String.new(kv.get("user:1"))

admins = kv.collection("admins")
admins.set("admin:1", %({"name":"Grace"}))
query = CryBase::CouchBase::Query::Client.from_string(
  "couchbase://Administrator:password@127.0.0.1/commerce",
)

query.scope = "ecommerce_shop"

rows = query.query(
  "SELECT META(u).id AS doc_key, u.name FROM users AS u LIMIT 5",
)