console/info-schema/index.sql
SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties;
SELECT 'breadcrumb' as component;
WITH RECURSIVE breadcrumbs AS (
SELECT
COALESCE(abbreviated_caption, caption) AS title,
COALESCE(url, path) AS link,
parent_path, 0 AS level,
namespace
FROM sqlpage_aide_navigation
WHERE namespace = 'prime' AND path='console/info-schema/index.sql'
UNION ALL
SELECT
COALESCE(nav.abbreviated_caption, nav.caption) AS title,
COALESCE(nav.url, nav.path) AS link,
nav.parent_path, b.level + 1, nav.namespace
FROM sqlpage_aide_navigation nav
INNER JOIN breadcrumbs b ON nav.namespace = b.namespace AND nav.path = b.parent_path
)
SELECT title ,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link as link
FROM breadcrumbs ORDER BY level DESC;
-- not including page title from sqlpage_aide_navigation
SELECT 'title' AS component, 'Tables' as contents;
SELECT 'table' AS component,
'Table' AS markdown,
'Column Count' as align_right,
'Content' as markdown,
TRUE as sort,
TRUE as search;
SELECT
'[' || table_name || '](table.sql?name=' || table_name || ')' AS "Table",
COUNT(column_name) AS "Column Count",
REPLACE(content_web_ui_link_abbrev_md,'$SITE_PREFIX_URL',sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '') as "Content"
FROM console_information_schema_table
GROUP BY table_name;
SELECT 'title' AS component, 'Views' as contents;
SELECT 'table' AS component,
'View' AS markdown,
'Column Count' as align_right,
'Content' as markdown,
TRUE as sort,
TRUE as search;
SELECT
'[' || view_name || '](view.sql?name=' || view_name || ')' AS "View",
COUNT(column_name) AS "Column Count",
REPLACE(content_web_ui_link_abbrev_md,'$SITE_PREFIX_URL',sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '') as "Content"
FROM console_information_schema_view
GROUP BY view_name;
SELECT 'title' AS component, 'Migrations' as contents;
SELECT 'table' AS component,
'Table' AS markdown,
'Column Count' as align_right,
TRUE as sort,
TRUE as search;
SELECT from_state, to_state, transition_reason, transitioned_at
FROM code_notebook_state
ORDER BY transitioned_at;