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.moorages_geojson_view

Description

List moorages as geojson

Table Definition
CREATE VIEW moorages_geojson_view AS (
 SELECT id,
    name,
    (st_asgeojson(m.*))::jsonb AS geojson
   FROM ( SELECT m_1.id,
            m_1.name,
            m_1.default_stay,
            m_1.default_stay_id,
            m_1.notes,
            m_1.home,
            m_1.geog,
            m_1.latitude,
            m_1.longitude,
            m_1.logs_count,
            m_1.stays_count,
            m_1.stays_sum_duration,
            m_1.stay_first_seen,
            m_1.stay_last_seen,
            m_1.stay_first_seen_id,
            m_1.stay_last_seen_id,
            m_1.has_images,
            m_1.images
           FROM api.moorage_view m_1
          WHERE (m_1.geog IS NOT NULL)) m
)

Columns

NameTypeDefaultNullable
geojsonjsonbtrue
idintegertrue
nametexttrue

Referenced Tables

NameColumnsCommentType
api.moorage_view18Moorage details web viewVIEW

Relations

erDiagram


"api.moorages_geojson_view" {
  jsonb geojson ""
  integer id ""
  text name ""
}

Generated by tbls