a8m / entspatial

An example repository for working with MySQL spatial data types in ent

Repository from Github https://github.coma8m/entspatialRepository from Github https://github.coma8m/entspatial

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()),
	}
}

About

An example repository for working with MySQL spatial data types in ent

License:Apache License 2.0


Languages

Language:Go 100.0%