Open
Description
You show in your "Basic Example":
func main() {
// Open a DB connection, use New() alternatively for unregistered dialects
hd, err := hood.Open("postgres", "user=hood dbname=hood_test sslmode=disable")
if err != nil {
panic(err)
}
// Create a table
type Fruit struct {
Id hood.Id
Name string `validate:"presence"`
Color string
}
err = hd.CreateTable(&Fruit{})
However when I try to replicate this flow myself I receive an error saying
panic: CreateTable can only be invoked inside a transaction
Metadata
Metadata
Assignees
Labels
No labels