surrealdb / surrealdb.go

SurrealDB SDK for Golang
https://surrealdb.com
Apache License 2.0
231 stars 62 forks source link

#82 Add native insert/bulk insert support via endpoint #83

Closed Atoo35 closed 1 year ago

Atoo35 commented 1 year ago

This PR is to address issue #82 to add insert support in the library. It supports raw data, single insert and bulk insert in the same call. I have added the tests as well and it works fine.

Please let me know if there is something I am missing or something I am doing wrong. Looking forward to getting it merged.

Would really appreciate if someone can explain how to pass the automated tests carried out on github

phughk commented 1 year ago

Thanks for providing this solution! It seems some of the tests are failing. You can run them locally with go test or have a look at the Details of the builds.

It looks like these tests failed

        --- FAIL: TestSurrealDBSuite/gorilla_opt/TestInsert (0.01s)
            --- FAIL: TestSurrealDBSuite/gorilla_opt/TestInsert/raw_map_works (0.00s)
            --- FAIL: TestSurrealDBSuite/gorilla_opt/TestInsert/Single_insert_works (0.00s)
            --- FAIL: TestSurrealDBSuite/gorilla_opt/TestInsert/Multiple_insert_works (0.00s)
Atoo35 commented 1 year ago

Thanks @phughk for being prompt. These tests run fine locally after installing the nightly build (after that loooong error thread on discord lol). But the error shown here says that the method insert is not found. This is exactly what I was facing before properly installing and running the nightly.

image

Is there something to be configured on github to let the actions install the nightly build and run?

phughk commented 1 year ago

Thanks! Will be fixed soon https://github.com/surrealdb/surrealdb.go/pull/84

Atoo35 commented 1 year ago

@phughk its still not pulling the nightly version i believe

image

Same method not found error

Edit

Yep the workflow file isn't updated for this one

image
phughk commented 1 year ago

The tests failed because it didnt pick up the latest changes. It should merge main branch automatically I think, but in case it doesn't you can merge the main branch from the surrealdb repo and it should re-trigger the build.

Atoo35 commented 1 year ago

@phughk all checks passed fine just now!! Thanks :)