Skip to content

Bug: a single string array field is returned as multiple strings. #486

@or-else

Description

@or-else

gopkg.in/rethinkdb/rethinkdb-go.v5 v5.1.0

cursor := rdb.DB("my_database").Table("test").Get("some-id").Field("stringArrayField").Run(a.conn)
var thisShoudBeAStringArray interface{}
cursor.One(&thisShoudBeAStringArray)
fmt.Println(thisShoudBeAStringArray) // Observe that it's the first element of the array

This code

for cursor.Next(&thisShoudBeAStringArray) {
	fmt.Println("hello bug!", thisShoudBeAStringArray)
}

prints a line for each element of an array when it should be a single line.

This is a Go-specific bug. It cannot be reproduces with the stock JS driver.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions