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

Description

Logs web view

Table Definition
CREATE VIEW logs_view AS (
 SELECT id,
    name,
    _from AS "from",
    _from_time AS started,
    _to AS "to",
    _to_time AS ended,
    distance,
    duration,
    _from_moorage_id,
    _to_moorage_id,
    (user_data -> 'tags'::text) AS tags,
    updated_at
   FROM api.logbook l
  WHERE ((name IS NOT NULL) AND (_to_time IS NOT NULL))
  ORDER BY _from_time DESC
)

Columns

NameTypeDefaultNullable
_from_moorage_idintegertrue
_to_moorage_idintegertrue
distancenumerictrue
durationintervaltrue
endedtimestamp with time zonetrue
fromtexttrue
idintegertrue
nametexttrue
startedtimestamp with time zonetrue
tagsjsonbtrue
totexttrue
updated_attimestamp with time zonetrue

Referenced Tables

NameColumnsCommentType
api.logbook43The logbook table stores vessel navigation entries with timestamps, locations, and trip metrics. RLS policies filter by vessel_id automatically.
These indexes optimize different query patterns while minimizing storage.
BASE TABLE

Relations

erDiagram


"api.logs_view" {
  integer _from_moorage_id ""
  integer _to_moorage_id ""
  numeric distance ""
  interval duration ""
  timestamp_with_time_zone ended ""
  text from ""
  integer id ""
  text name ""
  timestamp_with_time_zone started ""
  jsonb tags ""
  text to ""
  timestamp_with_time_zone updated_at ""
}

Generated by tbls