Questions tagged [go-couchbase]

The Couchbase Go SDK, a.k.a. gocb, provides a golang interface to access to the Data, N1QL Query, Full Text Search, Analytics Query and Views Queries available from Couchbase Server.

Resources:

9 questions
2
votes
1 answer

Updating fields of a Couchbase document if it exists by Go

I am using gocb library. I want to update specific field of a document. However if the document does not exist, I don't want to do anything I will just produce an error message. You can say that first retrieve the full document itself and make…
javac
  • 441
  • 4
  • 20
2
votes
1 answer

Couchbase GoLang client can't find bucket

I have a TCP server that tries to connect to a Couchbase database using the go-couchbase client library but I get an error saying that the bucket that I'm trying to access, named "events", doesn't exist. When I use the official Couchbase client…
Donovan
  • 816
  • 1
  • 10
  • 16
1
vote
1 answer

Couchbase driver sort only sorts descending not ascending

Problem: the cbft will return to me a sorted result only when giving the Descending option a true value, for some reason when giving false it is not sorted (seems to be sorted based on updated but not the field I am looking for. Here is my code:…
Michael
  • 4,538
  • 5
  • 31
  • 58
1
vote
0 answers

Key not found error for collection.LookupIn operation of Couchbase

I have the following document in Couchbase: { "id": "ee::brown", "type": "ee", "firstName": "John", "lastName": "Brown", "email": "jbown@gmail.com" } The code below tries to get the lastName field for id="ee::brown" ops :=…
Tusshu
  • 1,664
  • 3
  • 16
  • 32
1
vote
1 answer

How to add new field in Couchbase document using GO SDK

The register structure below captures the data coming from the registration UI: register struct { Email string Password string } The collection.insert command creates the following document: { "id": "1", "email" : "john@example.com", …
Tusshu
  • 1,664
  • 3
  • 16
  • 32
1
vote
1 answer

Is it possible to re-order view values by using map reduce?

I need to reorder the coiuchbase views results based on the values.I am writing a map reduce like below and did sorting using group, reduce and descending keys. function (doc, meta) { if(doc.transactionType=='Transaction') { for(var i=0;…
user4319304
0
votes
0 answers

How to configure bucket name during building query to couchbase via gocb

I need to select all agents from couchbase bucket. I am using https://github.com/couchbase/gocb package to work with couchbase. My current query looks like: SELECT a.* FROM `agents` a WHERE a.type=$1 But I feel I need to replace bucket name with…
J Sorel
  • 343
  • 2
  • 18
0
votes
2 answers

couchbase-server in docker using go-couchbase timeout error

I have a couchbase-server in docker on a GCE instance. tried using this package https://godoc.org/github.com/couchbase/go-couchbase#GetBucket and followed the example, but I get a timeout error. 2015/04/06 17:32:34 Trying with selected node…
Hokutosei
  • 2,114
  • 5
  • 24
  • 42
0
votes
1 answer

Golang Couchbase integration throwing errors on setting/getting

Implementing https://github.com/couchbase/go-couchbase However - no matter what I do - with various types of connections - I get errors when setting/getting keys. vbmap smaller than vbucket list: 18119 vs. [] Code Example below (have tried many…
Hacking Life
  • 3,335
  • 2
  • 19
  • 20