Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-14-2020 07:42 PM
Just wondering if anyone has some experience converting from a map[string]interface{}
to a declared type?
i.e. in Go if I have:
type Person struct {
name string
age int64
}
if I run this query:
MATCH (p:Person) RETURN p { .name, .age } AS person
is there a better way to get a go person then something along the lines of:
Person{record["name"].(string), record["age"].(int64)}
07-16-2021 12:19 PM
Hi, I'm aware this is a question from a long time ago and the driver has changed a lot since, but there is still today no built-in support to hydrate structs from raw maps in the driver.
A solution like GitHub - mindstand/gogm: Golang Object Graph Mapper for Neo4j might be something of interest.
All the sessions of the conference are now available online