Code Monkey home page Code Monkey logo

Comments (7)

0x111 avatar 0x111 commented on August 22, 2024 1

Try to run go get github.com/nedpals/postgrest-go you are missing the -go part from your go get command. The releases are tagged, latest tag being the one you list also.

from supabase-go.

danielchristianschroeter avatar danielchristianschroeter commented on August 22, 2024 1

I just started with a simple insert example today and I had the same issue.
"go get github.com/nedpals/postgrest-go" resolved it:

go get github.com/nedpals/postgrest-go
go: downloading github.com/nedpals/postgrest-go v0.1.3
go: upgraded github.com/nedpals/postgrest-go v0.1.2 => v0.1.3

from supabase-go.

nathananderson98 avatar nathananderson98 commented on August 22, 2024

Digging into the code with a debugger, I realized that the response from the server I was getting was 201, and the check in request_builder.go was only looking for 200, so it marked my successful update as an error. Then I realized that your postgrest_go package has that fix, so this one must just not be up to date with that package. I'm fairly new to go, so I'm not sure how that is done, but until a fix is made, I will probably just copy-paste in that fixed file.

from supabase-go.

nathananderson98 avatar nathananderson98 commented on August 22, 2024

Alright, this is a bit of a blocker, so I'm still trying to fix it...
Running go get github.com/nedpals/postgrest@latest doesn't find the repo, which I'm assuming is because its not published as a standalone go package..?

Running go list -m -u all shows that my version of postgrest-go is behind one version

github.com/nedpals/postgrest-go v0.1.2 [v0.1.3]

from supabase-go.

pgshow avatar pgshow commented on August 22, 2024

Me too, I encounter the same issue today.

from supabase-go.

zach030 avatar zach030 commented on August 22, 2024

The response is array of inserted rows, you need to define the result with array.

var results []Row 
err := supaClient.DB.From("table").Insert(user).Execute(&results)

from supabase-go.

delivey avatar delivey commented on August 22, 2024

go get github.com/nedpals/postgrest-go

Fixes it for me

from supabase-go.

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.