Git Product home page Git Product logo

beersample-go's Issues

Compile Fails at Current HEAD ( 1a64b11 )

Compile of beersample.go fails at the current HEAD of this project: 1a64b11

This occurs if either of these methods is used:

  • git clone of this project followed by 'go build'
  • normal 'go get' of the project
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

Question

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.

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.