Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

api.stays_geojson_view

Description

List stays as geojson

Table Definition
CREATE VIEW stays_geojson_view AS (
 SELECT (st_asgeojson(tbl.*))::jsonb AS geojson
   FROM ( SELECT stay_explore_view.stay_id,
            stay_explore_view.moorage_id,
            stay_explore_view.moorage_name,
            stay_explore_view.stay_name,
            stay_explore_view.arrived,
            stay_explore_view.stay_code,
            stay_explore_view.latitude,
            stay_explore_view.longitude,
            stay_explore_view.stay_notes,
            stay_explore_view.moorage_notes,
            stay_explore_view.has_images,
            stay_explore_view.images,
            st_makepoint(stay_explore_view.longitude, stay_explore_view.latitude) AS st_makepoint
           FROM api.stay_explore_view) tbl
)

Columns

NameTypeDefaultNullable
geojsonjsonbtrue

Referenced Tables

NameColumnsCommentType
api.stay_explore_view14List moorages notes order by staysVIEW

Relations

erDiagram


"api.stays_geojson_view" {
  jsonb geojson ""
}

Generated by tbls