Comments (7)
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.
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.
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.
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.
Me too, I encounter the same issue today.
from supabase-go.
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.
go get github.com/nedpals/postgrest-go
Fixes it for me
from supabase-go.
Related Issues (20)
- how to select with order by HOT 1
- GORM support
- Select on insert HOT 1
- Update Doku for nested select HOT 11
- JWT Token expired Issue HOT 2
- Filter eq with reserved characters does not seem to need %22 HOT 2
- Looking for help to figure out what Supabase functions these RequestBuilder methods connect to? HOT 3
- Add support for Admin HOT 1
- Order query results using request builder
- Postgrest-go Repository HOT 4
- Failed to get Auth.User Token
- Post "/rest/v1/[tableName]": unsupported protocol scheme "" HOT 2
- DELETE requires a WHERE clause HOT 1
- Counting number of rows returned by a SELECT
- Provision redirectTo for the go sdk HOT 2
- How to update user password if the user is not loged in ? HOT 3
- SQL: Is it possible to work with raw SQL in this library?
- Query data that includes '@' is not able to be found
- Upsert() with on_conflict condition HOT 1
- Create table with the project.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supabase-go.