Thanks to visit codestin.com
Credit goes to github.com

Skip to content

a8m/entspatial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages