module
Version:
v0.0.0-...-482f3e0
Opens a new window with list of versions in this module.
Published: Apr 7, 2021
License: Apache-2.0
Opens a new window with license information.
README
¶
entspatial
An example repository for working with MySQL spatial data types in ent.
// Location holds the schema definition for the Location entity.
type Location struct {
ent.Schema
}
// Fields of the Location.
func (Location) Fields() []ent.Field {
return []ent.Field{
field.String("name"),
field.Other("coords", &Point{}).
SchemaType(Point{}.SchemaType()),
}
}
Directories
¶
Click to show internal directories.
Click to hide internal directories.