Documentation ¶
Index ¶
- func QueryPaginated(ctx context.Context, conn *sql.DB, pg_opts pagination.Options, q string, ...) (spr.StandardPlacesResults, pagination.Results, error)
- func RetrieveSPR(ctx context.Context, spr_db *sql.DB, spr_table database_sql.Table, id int64, ...) (wof_spr.StandardPlacesResult, error)
- func RetrieveSPRWithRow(ctx context.Context, row *sql.Row) (wof_spr.StandardPlacesResult, error)
- func RetrieveSPRWithRows(ctx context.Context, rows *sql.Rows) (wof_spr.StandardPlacesResult, error)
- type Results
- type StandardPlacesResult
- func (spr *StandardPlacesResult) BelongsTo() []int64
- func (spr *StandardPlacesResult) Cessation() *edtf.EDTFDate
- func (spr *StandardPlacesResult) Country() string
- func (spr *StandardPlacesResult) Id() string
- func (spr *StandardPlacesResult) Inception() *edtf.EDTFDate
- func (spr *StandardPlacesResult) IsCeased() flags.ExistentialFlag
- func (spr *StandardPlacesResult) IsCurrent() flags.ExistentialFlag
- func (spr *StandardPlacesResult) IsDeprecated() flags.ExistentialFlag
- func (spr *StandardPlacesResult) IsSuperseded() flags.ExistentialFlag
- func (spr *StandardPlacesResult) IsSuperseding() flags.ExistentialFlag
- func (spr *StandardPlacesResult) LastModified() int64
- func (spr *StandardPlacesResult) Latitude() float64
- func (spr *StandardPlacesResult) Longitude() float64
- func (spr *StandardPlacesResult) MaxLatitude() float64
- func (spr *StandardPlacesResult) MaxLongitude() float64
- func (spr *StandardPlacesResult) MinLatitude() float64
- func (spr *StandardPlacesResult) MinLongitude() float64
- func (spr *StandardPlacesResult) Name() string
- func (spr *StandardPlacesResult) ParentId() string
- func (spr *StandardPlacesResult) Path() string
- func (spr *StandardPlacesResult) Placetype() string
- func (spr *StandardPlacesResult) Repo() string
- func (spr *StandardPlacesResult) SupersededBy() []int64
- func (spr *StandardPlacesResult) Supersedes() []int64
- func (spr *StandardPlacesResult) URI() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueryPaginated ¶
func QueryPaginated(ctx context.Context, conn *sql.DB, pg_opts pagination.Options, q string, args ...interface{}) (spr.StandardPlacesResults, pagination.Results, error)
QueryPaginated will iterate over all the rows for 'q' in batches determined by 'pg_opts' and return a `spr.StandardPlacesResults` and `pagination.Results` instance for the results.
func RetrieveSPR ¶
func RetrieveSPRWithRow ¶
func RetrieveSPRWithRows ¶
Types ¶
type Results ¶
type Results struct { wof_spr.StandardPlacesResults `json:",omitempty"` // Places are the list of `StandardPlacesResults.StandardPlacesResults` instances contained by the struct. Places []wof_spr.StandardPlacesResult `json:"places"` }
Results is a struct that implements the `whosonfirst/go-whosonfirst-spr.StandardPlacesResults` interface for returning a list of `StandardPlacesResults.StandardPlacesResults` instances.
func (*Results) Results ¶
func (r *Results) Results() []wof_spr.StandardPlacesResult
Results returns a list of `StandardPlacesResults.StandardPlacesResults` instances.
type StandardPlacesResult ¶
type StandardPlacesResult struct { wof_spr.StandardPlacesResult `json:",omitempty"` WOFId string `json:"wof:id"` WOFParentId string `json:"wof:parent_id"` WOFName string `json:"wof:name"` WOFCountry string `json:"wof:country"` WOFPlacetype string `json:"wof:placetype"` MZLatitude float64 `json:"mz:latitude"` MZLongitude float64 `json:"mz:longitude"` MZMinLatitude float64 `json:"mz:min_latitude"` MZMinLongitude float64 `json:"mz:min_longitude"` MZMaxLatitude float64 `json:"mz:max_latitude"` MZMaxLongitude float64 `json:"mz:max_longitude"` MZIsCurrent int64 `json:"mz:is_current"` MZIsDeprecated int64 `json:"mz:is_deprecated"` MZIsCeased int64 `json:"mz:is_ceased"` MZIsSuperseded int64 `json:"mz:is_superseded"` MZIsSuperseding int64 `json:"mz:is_superseding"` EDTFInception string `json:"edtf:inception"` EDTFCessation string `json:"edtf:cessation"` WOFSupersedes []int64 `json:"wof:supersedes"` WOFSupersededBy []int64 `json:"wof:superseded_by"` WOFBelongsTo []int64 `json:"wof:belongsto"` WOFPath string `json:"wof:path"` WOFRepo string `json:"wof:repo"` WOFLastModified int64 `json:"wof:lastmodified"` }
StandardPlacesResult is a struct that implements the `whosonfirst/go-whosonfirst-spr.StandardPlacesResult` interface for records stored in a database and which have been indexed by the `whosonfirst/go-whosonfirst-sqlite-features` package.
func (*StandardPlacesResult) BelongsTo ¶
func (spr *StandardPlacesResult) BelongsTo() []int64
func (*StandardPlacesResult) Cessation ¶
func (spr *StandardPlacesResult) Cessation() *edtf.EDTFDate
func (*StandardPlacesResult) Country ¶
func (spr *StandardPlacesResult) Country() string
func (*StandardPlacesResult) Id ¶
func (spr *StandardPlacesResult) Id() string
func (*StandardPlacesResult) Inception ¶
func (spr *StandardPlacesResult) Inception() *edtf.EDTFDate
func (*StandardPlacesResult) IsCeased ¶
func (spr *StandardPlacesResult) IsCeased() flags.ExistentialFlag
func (*StandardPlacesResult) IsCurrent ¶
func (spr *StandardPlacesResult) IsCurrent() flags.ExistentialFlag
func (*StandardPlacesResult) IsDeprecated ¶
func (spr *StandardPlacesResult) IsDeprecated() flags.ExistentialFlag
func (*StandardPlacesResult) IsSuperseded ¶
func (spr *StandardPlacesResult) IsSuperseded() flags.ExistentialFlag
func (*StandardPlacesResult) IsSuperseding ¶
func (spr *StandardPlacesResult) IsSuperseding() flags.ExistentialFlag
func (*StandardPlacesResult) LastModified ¶
func (spr *StandardPlacesResult) LastModified() int64
func (*StandardPlacesResult) Latitude ¶
func (spr *StandardPlacesResult) Latitude() float64
func (*StandardPlacesResult) Longitude ¶
func (spr *StandardPlacesResult) Longitude() float64
func (*StandardPlacesResult) MaxLatitude ¶
func (spr *StandardPlacesResult) MaxLatitude() float64
func (*StandardPlacesResult) MaxLongitude ¶
func (spr *StandardPlacesResult) MaxLongitude() float64
func (*StandardPlacesResult) MinLatitude ¶
func (spr *StandardPlacesResult) MinLatitude() float64
func (*StandardPlacesResult) MinLongitude ¶
func (spr *StandardPlacesResult) MinLongitude() float64
func (*StandardPlacesResult) Name ¶
func (spr *StandardPlacesResult) Name() string
func (*StandardPlacesResult) ParentId ¶
func (spr *StandardPlacesResult) ParentId() string
func (*StandardPlacesResult) Path ¶
func (spr *StandardPlacesResult) Path() string
func (*StandardPlacesResult) Placetype ¶
func (spr *StandardPlacesResult) Placetype() string
func (*StandardPlacesResult) Repo ¶
func (spr *StandardPlacesResult) Repo() string
func (*StandardPlacesResult) SupersededBy ¶
func (spr *StandardPlacesResult) SupersededBy() []int64
func (*StandardPlacesResult) Supersedes ¶
func (spr *StandardPlacesResult) Supersedes() []int64
func (*StandardPlacesResult) URI ¶
func (spr *StandardPlacesResult) URI() string