You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
You show in your "Basic Example":
However when I try to replicate this flow myself I receive an error saying
The text was updated successfully, but these errors were encountered: