couchbaselabs / beersample-go Goto Github PK
View Code? Open in Web Editor NEWThe Couchbase beer-sample example for Go
The Couchbase beer-sample example for Go
Compile of beersample.go fails at the current HEAD of this project: 1a64b11
This occurs if either of these methods is used:
Error messages are:./beersample.go:110: multiple-value bucket.ExecuteViewQuery() in single-value context
./beersample.go:141: multiple-value bucket.ExecuteViewQuery() in single-value context
./beersample.go:258: multiple-value bucket.ExecuteViewQuery() in single-value context
./beersample.go:280: multiple-value bucket.ExecuteViewQuery() in single-value context
The package imported package github.com/couchbaselabs/gocb is at couchbase/gocb@3d0e906 .
The cause appears to be the gocb change at couchbase/gocb@1bb4fb7
NewViewQuery on example returns nil -> i've been looking at the go api for couchbase and it seems that the NewViewQuery returns a nil reference for this example beer-example
Docs from here http://developer.couchbase.com/documentation/server/current/sdks/go-beta/querying.html
I wrote a small example myself as well and still same problem.
vq := gocb.NewViewQuery("brewery", "by_name").Limit(2)
rows, err := bucket.ExecuteViewQuery(vq)
if err != nil {
fmt.Printf("Error")
}
var row interface{}
for rows.Next(&row) { // rows is nil here and the loop crashes
fmt.Printf("Got row `%+v`\n")
}
I am running couchbase inside a docker container based on the official images and only expose the 8091 to the outside.
go version go1.6.2 darwin/amd64
Any help would be greatly appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.