MCPcopy Index your code
hub / github.com/Masterminds/structable / Fence

Struct Fence

example/fence.go:25–34  ·  view source on GitHub ↗

Fence represents a Geofence boundary. This struct is stubbed out to show how an ActiveRecord pattern might look implemented using Squirrel and Structable. The DDL for the underlying table may look something like this: CREATE TABLE fences ( id SERIAL, radius NUMERIC(20, 14), latitude

Source from the content-addressed store, hash-verified

23// PRIMARY KEY(id),
24// );
25type Fence struct {
26 Id int `stbl:"id,PRIMARY_KEY,SERIAL"`
27 Region int `stbl:"region"`
28 Radius float64 `stbl:"radius"`
29 Latitude float64 `stbl:"latitude"`
30 Longitude float64 `stbl:"longitude"`
31
32 rec structable.Recorder
33 builder squirrel.StatementBuilderType
34}
35
36// NewFence creates a new empty fence.
37//

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected