Giter Site home page Giter Site logo

Comments (4)

bmizerany avatar bmizerany commented on August 21, 2024

Will you please elaborate more on what you're trying to do, and with what code?

from pq.

dspiteself avatar dspiteself commented on August 21, 2024

It seems all i have been doing is routine. Your driver has been
working like a charm. I will paste below the code that causes the
issue. My thought is that the issue could stem from data being a
custom type. it works fine if i remove data from the query and the
scan.

rows, err := db.Query("SELECT id, widget,(select coalesce(array_agg(subscription_id),'{}'::bigint[]) from rule_subscriptions where rule_id = rule_condition.id),'{}'::bigint[] ,data::text from rule_condition limit 1000") if err != nil { t.Error(err) } var id uint64 var rulearr string var subjectarr string var widget string var data string for rows.Next() { err := rows.Scan(&id, &widget, &rulearr, &subjectarr, &data) if err != nil { t.Error(err) } }

from pq.

bmizerany avatar bmizerany commented on August 21, 2024

Can you give me a simple reproducible gist (gist.github.com) I can
clone? Or maybe add a test to conn_test.go in the repo? It's ok if it
fails; I just need it to build to better help you. You're example
below doesn't run through gofmt and is hard to get context.

On Mon, Apr 2, 2012 at 6:18 PM, dspiteself
[email protected]
wrote:

It seems all i have been doing is routine. Your driver has been
working like a charm. I will paste below the code that causes the
issue. My thought is that the issue could stem from data being a
custom type. it works fine if i remove data from the query and the
scan.

       rows, err := db.Query("SELECT id, widget,(select
coalesce(array_agg(subscription_id),'{}'::bigint[]) from
rule_subscriptions where rule_id = rule_condition.id),'{}'::bigint[]
,data::text from rule_condition limit 1000")
       if err != nil {
               t.Error(err)
       }
       var id uint64
       var rulearr string
       var subjectarr string
       var widget string
       var data string
       for rows.Next() {
               err := rows.Scan(&id, &widget, &rulearr, &subjectarr, &data)
               if err != nil {
                       t.Error(err)
}
}

On Mon, Apr 2, 2012 at 8:12 PM, Blake Mizerany
[email protected]
wrote:

Will you please elaborate more on what you're trying to do, and with what code?


Reply to this email directly or view it on GitHub:
bmizerany/pq#6 (comment)

Tyler Tallman
Project Manager
Breeze EMR
(m) (337) 205-2142


Reply to this email directly or view it on GitHub:
bmizerany/pq#6 (comment)

from pq.

dspiteself avatar dspiteself commented on August 21, 2024

solved by bmizerany/pq@3cb21db

from pq.

Related Issues (20)

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.