I\'ve been trying to find a way to insert and retrieve geometric types using Golang, and specifically the library gorm. I\'m also attempting to use the library orb that defines
Is it possible to make some sort of trigger or rule that would automatically call the needed functions on the data coming in/out?
Ever tried gorm hooks, example:
type Example struct {
ID int
Name string
Geom ...
}
func (e *Example) AfterFind() (err error) {
e.Geom = ... // Do whatever you like here
return
}
There is a handful of hooks that you can use. I find them pretty neat and useful.