surrealdb / surrealdb.go

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

Add native support for batch inserting data #82

Closed phughk closed 1 year ago

phughk commented 1 year ago

Data can already be batch inserted with INSERT INTO table [record1, record2, record3, ...].

We have recently added a new endpoint into the db that supports batch inserts https://github.com/surrealdb/surrealdb/pull/2296

This ticket is about utilising that endpoint on WebSockets within the driver.

Atoo35 commented 1 year ago

Hi, i am very new to golang and surrealdb as well. I am trying to resolve this issue but I need some help in setting up and testing the repo locally. i forked and cloned the repo and made a new folder and added a test.go file which serves as my package main and then copied the example code give on the website. However the example code seems buggy since the surrealdb.New() command needed to be passed a websocket interface as a second argument otherwise go was giving errors.

i created a var and passed it but its not able to sign in

image

The above is my code and below is the error

image

This is the file structure

image

Edit

I have come to realise that the way I am trying to use the local repo is not correct but I am not sure how to properly use it. Would love to get some help on this. Really looking forward to making that commit before attending the meet up in London on wednesday

Atoo35 commented 1 year ago

This can be closed now i believe