We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I try to do something like this:
` query := "FOR d IN scenario RETURN d" cursor, err := storage.ArangoDb.Query(storage.Ctx, query, nil)
if err != nil { fmt.Println(err) } var scenarios []Scenario _, err = cursor.ReadDocument(storage.Ctx, &scenarios)
`
which of course gives following error: cannot unmarshal object into Go value of type []model.Scenario as cursor.ReadDocument get's only 1 document.
What is the correct way to get full array?
The text was updated successfully, but these errors were encountered:
@stefanwuthrich You should iterate over the cursor for every document. See https://github.com/arangodb/go-driver#querying-documents-one-document-at-a-time
Note. This driver will internally fetch multiple documents at a time.
Sorry, something went wrong.
No branches or pull requests
I try to do something like this:
`
query := "FOR d IN scenario RETURN d"
cursor, err := storage.ArangoDb.Query(storage.Ctx, query, nil)
`
which of course gives following error:
cannot unmarshal object into Go value of type []model.Scenario
as cursor.ReadDocument get's only 1 document.
What is the correct way to get full array?
The text was updated successfully, but these errors were encountered: