sqlpage_files (table) Content
- Start Row: 0
- Rows per Page: 50
- Total Rows: 242
- Current Page: 1
- Total Pages: 5
console/content/table/sqlean_define.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/sqlean_define.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/sqlean_define.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/table/assurance_schema.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/assurance_schema.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/assurance_schema.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/table/code_notebook_kernel.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/code_notebook_kernel.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/code_notebook_kernel.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/table/code_notebook_cell.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/code_notebook_cell.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/code_notebook_cell.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/table/code_notebook_state.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/code_notebook_state.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/code_notebook_state.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/table/surveilr_function_doc.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/surveilr_function_doc.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/surveilr_function_doc.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/table/sqlpage_files.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/sqlpage_files.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/sqlpage_files.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/table/surveilr_table_size.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/surveilr_table_size.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/surveilr_table_size.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/table/sqlpage_aide_navigation.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/sqlpage_aide_navigation.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/table/sqlpage_aide_navigation.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/code_notebook_cell_versions.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_cell_versions.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_cell_versions.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/code_notebook_cell_latest.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_cell_latest.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_cell_latest.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/code_notebook_sql_cell_migratable_version.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_sql_cell_migratable_version.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_sql_cell_migratable_version.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/code_notebook_sql_cell_migratable.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_sql_cell_migratable.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_sql_cell_migratable.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/code_notebook_sql_cell_migratable_state.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_sql_cell_migratable_state.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_sql_cell_migratable_state.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/code_notebook_sql_cell_migratable_not_executed.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_sql_cell_migratable_not_executed.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_sql_cell_migratable_not_executed.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/code_notebook_migration_sql.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_migration_sql.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/code_notebook_migration_sql.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/console_information_schema_table.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/console_information_schema_table.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/console_information_schema_table.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/console_information_schema_view.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/console_information_schema_view.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/console_information_schema_view.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/console_content_tabular.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/console_content_tabular.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/console_content_tabular.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/console_information_schema_table_col_fkey.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/console_information_schema_table_col_fkey.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/console_information_schema_table_col_fkey.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/console_information_schema_table_col_index.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/console_information_schema_table_col_index.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/console_information_schema_table_col_index.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/rssd_statistics_overview.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/rssd_statistics_overview.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/rssd_statistics_overview.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
console/content/view/rssd_table_statistic.sql | SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/rssd_table_statistic.auto.sql' AS link WHERE $stats IS NULL; SELECT 'redirect' AS component,sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/view/rssd_table_statistic.auto.sql?stats=' || $stats AS link WHERE $stats IS NOT NULL; | 2025-04-04 10:31:34 |
shell/shell.json | { "component": "shell", "title": "Resource Surveillance State Database (RSSD)", "icon": "", "favicon": "https://www.surveilr.com/assets/brand/favicon.ico", "image": "https://www.surveilr.com/assets/brand/surveilr-icon.png", "layout": "fluid", "fixed_top_menu": true, "link": "index.sql", "menu_item": [ { "link": "index.sql", "title": "Home" } ], "javascript": [ "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/highlight.min.js", "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/languages/sql.min.js", "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/languages/handlebars.min.js", "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/languages/json.min.js" ], "footer": "Resource Surveillance Web UI" }; | 2025-04-04 10:31:34 |
shell/shell.sql | SELECT 'shell' AS component, 'Resource Surveillance State Database (RSSD)' AS title, NULL AS icon, 'https://www.surveilr.com/assets/brand/favicon.ico' AS favicon, 'https://www.surveilr.com/assets/brand/surveilr-icon.png' AS image, 'fluid' AS layout, true AS fixed_top_menu, 'index.sql' AS link, '{"link":"index.sql","title":"Home"}' AS menu_item, 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/highlight.min.js' AS javascript, 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/languages/sql.min.js' AS javascript, 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/languages/handlebars.min.js' AS javascript, 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/languages/json.min.js' AS javascript, json_object( 'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || ''||'/docs/index.sql', 'title', 'Docs', 'submenu', ( SELECT json_group_array( json_object( 'title', title, 'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link, 'description', description ) ) FROM ( SELECT COALESCE(abbreviated_caption, caption) as title, COALESCE(url, path) as link, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND parent_path = '/docs/index.sql/index.sql' ORDER BY sibling_order ) ) ) as menu_item, json_object( 'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || ''||'ur', 'title', 'Uniform Resource', 'submenu', ( SELECT json_group_array( json_object( 'title', title, 'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link, 'description', description ) ) FROM ( SELECT COALESCE(abbreviated_caption, caption) as title, COALESCE(url, path) as link, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND parent_path = 'ur/index.sql' ORDER BY sibling_order ) ) ) as menu_item, json_object( 'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || ''||'console', 'title', 'Console', 'submenu', ( SELECT json_group_array( json_object( 'title', title, 'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link, 'description', description ) ) FROM ( SELECT COALESCE(abbreviated_caption, caption) as title, COALESCE(url, path) as link, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND parent_path = 'console/index.sql' ORDER BY sibling_order ) ) ) as menu_item, json_object( 'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || ''||'orchestration', 'title', 'Orchestration', 'submenu', ( SELECT json_group_array( json_object( 'title', title, 'link', sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'||link, 'description', description ) ) FROM ( SELECT COALESCE(abbreviated_caption, caption) as title, COALESCE(url, path) as link, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND parent_path = 'orchestration/index.sql' ORDER BY sibling_order ) ) ) as menu_item, 'Surveilr '|| (SELECT json_extract(session_agent, '$.version') AS version FROM ur_ingest_session LIMIT 1) || ' Resource Surveillance Web UI (v' || sqlpage.version() || ') ' || '📄 [' || substr(sqlpage.path(), 2) || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/sqlpage-files/sqlpage-file.sql?path=' || substr(sqlpage.path(), LENGTH(sqlpage.environment_variable('SQLPAGE_SITE_PREFIX')) + 2 ) || ')' as footer; | 2025-04-04 10:31:34 |
index.sql | SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties; -- not including breadcrumbs from sqlpage_aide_navigation -- not including page title from sqlpage_aide_navigation SELECT 'list' AS component; SELECT caption as title, COALESCE(url, path) as link, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND parent_path = 'index.sql' ORDER BY sibling_order; | 2025-04-04 10:31:34 |
console/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/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 WITH console_navigation_cte AS ( SELECT title, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND path ='console'||'/index.sql' ) SELECT 'list' AS component, title, description FROM console_navigation_cte; SELECT caption as title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' || COALESCE(url, path) as link, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND parent_path = 'console'||'/index.sql' ORDER BY sibling_order; | 2025-04-04 10:31:34 |
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; | 2025-04-04 10:31:34 |
console/info-schema/table.sql | SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties; -- not including breadcrumbs from sqlpage_aide_navigation -- not including page title from sqlpage_aide_navigation 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; SELECT $name || ' Table' AS title, '#' AS link; SELECT 'title' AS component, $name AS contents; SELECT 'table' AS component; SELECT column_name AS "Column", data_type AS "Type", is_primary_key AS "PK", is_not_null AS "Required", default_value AS "Default" FROM console_information_schema_table WHERE table_name = $name; SELECT 'title' AS component, 'Foreign Keys' as contents, 2 as level; SELECT 'table' AS component; SELECT column_name AS "Column Name", foreign_key AS "Foreign Key" FROM console_information_schema_table_col_fkey WHERE table_name = $name; SELECT 'title' AS component, 'Indexes' as contents, 2 as level; SELECT 'table' AS component; SELECT column_name AS "Column Name", index_name AS "Index Name" FROM console_information_schema_table_col_index WHERE table_name = $name; SELECT 'title' AS component, 'SQL DDL' as contents, 2 as level; SELECT 'code' AS component; SELECT 'sql' as language, (SELECT sql_ddl FROM console_information_schema_table WHERE table_name = $name) as contents; | 2025-04-04 10:31:34 |
console/info-schema/view.sql | SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties; -- not including breadcrumbs from sqlpage_aide_navigation -- not including page title from sqlpage_aide_navigation 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; SELECT $name || ' View' AS title, '#' AS link; SELECT 'title' AS component, $name AS contents; SELECT 'table' AS component; SELECT column_name AS "Column", data_type AS "Type" FROM console_information_schema_view WHERE view_name = $name; SELECT 'title' AS component, 'SQL DDL' as contents, 2 as level; SELECT 'code' AS component; SELECT 'sql' as language, (SELECT sql_ddl FROM console_information_schema_view WHERE view_name = $name) as contents; | 2025-04-04 10:31:34 |
console/sqlpage-files/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/sqlpage-files/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, 'SQLPage pages in sqlpage_files table' AS contents; SELECT 'table' AS component, 'Path' as markdown, 'Size' as align_right, TRUE as sort, TRUE as search; SELECT '[🚀](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' || path || ') [📄 ' || path || '](sqlpage-file.sql?path=' || path || ')' AS "Path", LENGTH(contents) as "Size", last_modified FROM sqlpage_files ORDER BY path; | 2025-04-04 10:31:34 |
console/sqlpage-files/sqlpage-file.sql | SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties; -- not including breadcrumbs from sqlpage_aide_navigation -- not including page title from sqlpage_aide_navigation 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/sqlpage-files/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; SELECT $path || ' Path' AS title, '#' AS link; SELECT 'title' AS component, $path AS contents; SELECT 'text' AS component, '```sql ' || (select contents FROM sqlpage_files where path = $path) || ' ```' as contents_md; | 2025-04-04 10:31:34 |
console/sqlpage-files/content.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/sqlpage-files/content.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, 'SQLPage pages generated from tables and views' AS contents; SELECT 'text' AS component, ' - `*.auto.sql` pages are auto-generated "default" content pages for each table and view defined in the database. - The `*.sql` companions may be auto-generated redirects to their `*.auto.sql` pair or an app/service might override the `*.sql` to not redirect and supply custom content for any table or view. - [View regenerate-auto.sql](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/sqlpage-files/sqlpage-file.sql?path=console/content/action/regenerate-auto.sql' || ') ' AS contents_md; SELECT 'button' AS component, 'center' AS justify; SELECT sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/content/action/regenerate-auto.sql' AS link, 'info' AS color, 'Regenerate all "default" table/view content pages' AS title; SELECT 'title' AS component, 'Redirected or overriden content pages' as contents; SELECT 'table' AS component, 'Path' as markdown, 'Size' as align_right, TRUE as sort, TRUE as search; SELECT '[🚀](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' || path || ')[📄 ' || path || '](sqlpage-file.sql?path=' || path || ')' AS "Path", LENGTH(contents) as "Size", last_modified FROM sqlpage_files WHERE path like 'console/content/%' AND NOT(path like 'console/content/%.auto.sql') AND NOT(path like 'console/content/action%') ORDER BY path; SELECT 'title' AS component, 'Auto-generated "default" content pages' as contents; SELECT 'table' AS component, 'Path' as markdown, 'Size' as align_right, TRUE as sort, TRUE as search; SELECT '[🚀](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' || path || ') [📄 ' || path || '](sqlpage-file.sql?path=' || path || ')' AS "Path", LENGTH(contents) as "Size", last_modified FROM sqlpage_files WHERE path like 'console/content/%.auto.sql' ORDER BY path; | 2025-04-04 10:31:34 |
console/content/action/regenerate-auto.sql | -- code provenance: `ConsoleSqlPages.infoSchemaContentDML` (file:///app/www.surveilr.com/lib/std/web-ui-content/console.ts) -- the "auto-generated" tables will be in '*.auto.sql' with redirects DELETE FROM sqlpage_files WHERE path like 'console/content/table/%.auto.sql'; DELETE FROM sqlpage_files WHERE path like 'console/content/view/%.auto.sql'; INSERT OR REPLACE INTO sqlpage_files (path, contents) SELECT 'console/content/' || tabular_nature || '/' || tabular_name || '.auto.sql', 'SELECT ''dynamic'' AS component, sqlpage.run_sql(''shell/shell.sql'') AS properties; SELECT ''breadcrumb'' AS component; SELECT ''Home'' as title,sqlpage.environment_variable(''SQLPAGE_SITE_PREFIX'') || ''/'' AS link; SELECT ''Console'' as title,sqlpage.environment_variable(''SQLPAGE_SITE_PREFIX'') || ''/console'' AS link; SELECT ''Content'' as title,sqlpage.environment_variable(''SQLPAGE_SITE_PREFIX'') || ''/console/content'' AS link; SELECT ''' || tabular_name || ' ' || tabular_nature || ''' as title, ''#'' AS link; SELECT ''title'' AS component, ''' || tabular_name || ' (' || tabular_nature || ') Content'' as contents; SET total_rows = (SELECT COUNT(*) FROM ' || tabular_name || '); SET limit = COALESCE($limit, 50); SET offset = COALESCE($offset, 0); SET total_pages = ($total_rows + $limit - 1) / $limit; SET current_page = ($offset / $limit) + 1; SELECT ''text'' AS component, ''' || info_schema_link_full_md || ''' AS contents_md SELECT ''text'' AS component, ''- Start Row: '' || $offset || '' '' || ''- Rows per Page: '' || $limit || '' '' || ''- Total Rows: '' || $total_rows || '' '' || ''- Current Page: '' || $current_page || '' '' || ''- Total Pages: '' || $total_pages as contents_md WHERE $stats IS NOT NULL; -- Display uniform_resource table with pagination SELECT ''table'' AS component, TRUE AS sort, TRUE AS search, TRUE AS hover, TRUE AS striped_rows, TRUE AS small; SELECT * FROM ' || tabular_name || ' LIMIT $limit OFFSET $offset; SELECT ''text'' AS component, (SELECT CASE WHEN $current_page > 1 THEN ''[Previous](?limit='' || $limit || ''&offset='' || ($offset - $limit) || '')'' ELSE '''' END) || '' '' || ''(Page '' || $current_page || '' of '' || $total_pages || '') '' || (SELECT CASE WHEN $current_page < $total_pages THEN ''[Next](?limit='' || $limit || ''&offset='' || ($offset + $limit) || '')'' ELSE '''' END) AS contents_md;' FROM console_content_tabular; INSERT OR IGNORE INTO sqlpage_files (path, contents) SELECT 'console/content/' || tabular_nature || '/' || tabular_name || '.sql', 'SELECT ''redirect'' AS component,sqlpage.environment_variable(''SQLPAGE_SITE_PREFIX'') || ''/console/content/' || tabular_nature || '/' || tabular_name || '.auto.sql'' AS link WHERE $stats IS NULL; ' || 'SELECT ''redirect'' AS component,sqlpage.environment_variable(''SQLPAGE_SITE_PREFIX'') || ''/console/content/' || tabular_nature || '/' || tabular_name || '.auto.sql?stats='' || $stats AS link WHERE $stats IS NOT NULL;' FROM console_content_tabular; -- TODO: add ${this.upsertNavSQL(...)} if we want each of the above to be navigable through DB rows -- code provenance: `ConsoleSqlPages.console/content/action/regenerate-auto.sql` (file:///app/www.surveilr.com/lib/std/web-ui-content/console.ts) SELECT 'redirect' AS component, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/sqlpage-files/content.sql' as link WHERE $redirect is NULL; SELECT 'redirect' AS component, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || $redirect as link WHERE $redirect is NOT NULL; | 2025-04-04 10:31:34 |
console/sqlpage-nav/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/sqlpage-nav/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, 'SQLPage navigation in sqlpage_aide_navigation table' AS contents; SELECT 'table' AS component, TRUE as sort, TRUE as search; SELECT path, caption, description FROM sqlpage_aide_navigation ORDER BY namespace, parent_path, path, sibling_order; | 2025-04-04 10:31:34 |
console/notebooks/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/notebooks/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, 'Code Notebooks' AS contents; SELECT 'table' as component, 'Cell' as markdown, 1 as search, 1 as sort; SELECT c.notebook_name, '[' || c.cell_name || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/notebooks/notebook-cell.sql?notebook=' || replace(c.notebook_name, ' ', '%20') || '&cell=' || replace(c.cell_name, ' ', '%20') || ')' AS "Cell", c.description, k.kernel_name as kernel FROM code_notebook_kernel k, code_notebook_cell c WHERE k.code_notebook_kernel_id = c.notebook_kernel_id; | 2025-04-04 10:31:34 |
console/notebooks/notebook-cell.sql | SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties; -- not including breadcrumbs from sqlpage_aide_navigation -- not including page title from sqlpage_aide_navigation 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/notebooks/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; SELECT 'Notebook ' || $notebook || ' Cell' || $cell AS title, '#' AS link; SELECT 'code' as component; SELECT $notebook || '.' || $cell || ' (' || k.kernel_name ||')' as title, COALESCE(c.cell_governance -> '$.language', 'sql') as language, c.interpretable_code as contents FROM code_notebook_kernel k, code_notebook_cell c WHERE c.notebook_name = $notebook AND c.cell_name = $cell AND k.code_notebook_kernel_id = c.notebook_kernel_id; | 2025-04-04 10:31:34 |
console/migrations/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/migrations/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 'foldable' as component; SELECT 'RSSD Lifecycle(Migration) Documentation' as title, ' This document provides an organized and comprehensive overview of ``surveilr``''s RSSD migration process starting from ``v 1.0.0``, breaking down each component and the steps followed to ensure smooth and efficient migrations. It covers the creation of key tables and views, the handling of migration cells, and the sequence for executing migration scripts. --- ## Session and State Initialization To manage temporary session data and track user state, we use the ``session_state_ephemeral`` table, which stores essential session information like the current user. This table is temporary, meaning it only persists data for the duration of the session, and it''s especially useful for identifying the user responsible for specific actions during the migration. Each time the migration process runs, we initialize session data in this table, ensuring all necessary information is available without affecting the core database tables. This initialization prepares the system for more advanced operations that rely on knowing the user executing each action. --- ## Assurance Schema Table The ``assurance_schema`` table is designed to store various schema-related details, including the type of schema assurance, associated codes, and related governance data. This table is central to defining the structure of assurance records, which are useful for validating data, tracking governance requirements, and recording creation timestamps. All updates to the schema are logged to track when they were last modified and by whom. --- ## Code Notebook Kernel, Cell, and State Tables ``surveilr`` uses a structured system of code notebooks to store and execute SQL commands. These commands, or “cells,” are grouped into notebooks, and each notebook is associated with a kernel, which provides metadata about the notebook''s language and structure. The main tables involved here are: - **``code_notebook_kernel``**: Stores information about different kernels, each representing a unique execution environment or language. - **``code_notebook_cell``**: Holds individual code cells within each notebook, along with their associated metadata and execution history. - **``code_notebook_state``**: Tracks each cell''s state changes, such as when it was last executed and any errors encountered. By organizing migration scripts into cells and notebooks, ``surveilr`` can maintain detailed control over execution order and track the state of each cell individually. This tracking is essential for handling updates, as it allows us to execute migrations only when necessary. --- ## Views for Managing Cell Versions and Migrations Several views are defined to simplify and organize the migration process by managing different versions of code cells and identifying migration candidates. These views help filter, sort, and retrieve the cells that need execution. ### Key Views - **``code_notebook_cell_versions``**: Lists all available versions of each cell, allowing the migration tool to retrieve older versions if needed for rollback or auditing. - **``code_notebook_cell_latest``**: Shows only the latest version of each cell, simplifying the migration by focusing on the most recent updates. - **``code_notebook_sql_cell_migratable``**: Filters cells to include only those that are eligible for migration, ensuring that non-executable cells are ignored. --- ## Migration-Oriented Views and Dynamic Migration Scripts To streamline the migration process, several migration-oriented views organize the data by listing cells that require execution or are ready for re-execution. By grouping these cells in specific views, ``surveilr`` dynamically generates a script that executes only the necessary cells. ### Key Views - **``code_notebook_sql_cell_migratable_not_executed``**: Lists migratable cells that haven’t yet been executed. - **``code_notebook_sql_cell_migratable_state``**: Shows the latest migratable cells, along with their current state transitions. --- ## How Migrations Are Executed When it''s time to apply changes to the database, this section explains the process in detail, focusing on how ``surveilr`` prepares the environment, identifies which cells to migrate, executes the appropriate SQL code, and ensures data integrity throughout. --- ### 1. Initialization The first step in the migration process involves setting up the essential database tables and seeding initial values. This lays the foundation for the migration process, making sure that all tables, views, and temporary values needed are in place. - **Check for Core Tables**: ``surveilr`` first verifies whether the required tables, such as ``code_notebook_cell``, ``code_notebook_state``, and others starting with ``code_notebook%``, are already set up in the database. - **Setup**: If these tables do not yet exist, ``surveilr`` automatically initiates the setup by running the initial SQL script, known as ``bootstrap.sql``. This script contains SQL commands that create all the essential tables and views discussed in previous sections. - **Seeding**: During the execution of ``bootstrap.sql``, essential data, such as temporary values in the ``session_state_ephemeral`` table (e.g., information about the current user), is also added to ensure that the migration session has the data it needs to proceed smoothly. --- ### 2. Migration Preparation and Identification of Cells to Execute Once the environment is ready, ``surveilr`` examines which specific cells (code blocks in the migration notebook) need to be executed to bring the database up to the latest version. - **Listing Eligible Cells**: ``surveilr`` begins by consulting views such as ``code_notebook_sql_cell_migratable_not_executed``. This view is a pre-filtered list of cells that are eligible for migration but haven’t yet been executed. - **Idempotent vs. Non-Idempotent Cells**: ``surveilr`` then checks whether each cell is marked as “idempotent” or “non-idempotent.” - **Idempotent Cells** can be executed multiple times without adverse effects. If they have been run before, they can safely be run again without impacting data integrity. - **Non-Idempotent Cells**, identified by names containing ``_once_``, should only be executed once. If these cells have been executed previously, they are skipped in the migration process to prevent unintentional re-runs. --- ### 3. Dynamic Script Generation and Execution ``surveilr`` then assembles a custom SQL script that includes only the cells identified as eligible for execution. This script is crafted carefully to ensure each cell''s SQL code is executed in the correct order and with the right contextual information. - **Script Creation**: We start by generating a dynamic script in a single transaction block. Transactions are a way of grouping a series of commands so that they are either all applied or none are, which protects data integrity. - **Inclusion of Cells Based on Eligibility**: - For each cell, ``surveilr`` checks its eligibility status. If it''s non-idempotent and already executed, it''s marked with a comment noting that it''s excluded from the script due to previous execution. - If the cell is idempotent or eligible for re-execution, its SQL code is added to the script, along with additional details such as comments about the cell''s last execution date. - **State Transition Records**: After each cell''s SQL code, additional commands are added to record the cell''s transition state. This step inserts information into ``code_notebook_state``, logging details such as the cell ID, transition state (from “Pending” to “Executed”), and the reason for the transition (“Migration” or “Reapplication”). These logs are invaluable for auditing purposes. --- ### 4. Execution in a Transactional Block With the script prepared, ``surveilr`` then executes the entire batch of SQL commands within a transactional block. - **BEGIN TRANSACTION**: The script begins with a transaction, ensuring that all changes are applied as a single, atomic unit. - **Running Cell Code**: Within this transaction, each cell''s SQL code is executed in the order it appears in the script. - **Error Handling**: If any step in the transaction fails, all changes are rolled back. This prevents partial updates from occurring, ensuring that the database remains in a consistent state. - **COMMIT**: If the script executes successfully without errors, the transaction is committed, finalizing the changes. The ``COMMIT`` command signifies the end of the migration session, making all updates permanent. --- ### 5. Finalizing Migration and Recording Results After a successful migration session, ``surveilr`` concludes by recording details about the migration process. - **Final Updates to ``code_notebook_state``**: Any cells marked as “Executed” are updated in ``code_notebook_state`` with the latest timestamp, indicating their successful migration. - **Logging Completion**: Activity logs are updated with relevant details, ensuring a clear record of the migration. - **Cleanup of Temporary Data**: Finally, temporary data is cleared, such as entries in ``session_state_ephemeral``, since these values were only needed during the migration process. ' as description_md; SELECT 'title' AS component, 'Pending Migrations' AS contents; SELECT 'text' AS component, 'code_notebook_sql_cell_migratable_not_executed lists all cells eligible for migration but not yet executed. If migrations have been completed successfully, this list will be empty, indicating that all migratable cells have been processed and marked as executed.' as contents; SELECT 'table' as component, 'Cell' as markdown, 1 as search, 1 as sort; SELECT c.code_notebook_cell_id, c.notebook_name, c.cell_name, c.is_idempotent, c.version_timestamp FROM code_notebook_sql_cell_migratable_not_executed AS c ORDER BY c.cell_name; -- State of Executed Migrations SELECT 'title' AS component, 'State of Executed Migrations' AS contents; SELECT 'text' AS component, 'code_notebook_sql_cell_migratable_state displays all cells that have been successfully executed as part of the migration process, showing the latest version of each migratable cell. For each cell, it provides details on its transition states, the reason and result of the migration, and the timestamp of when the migration occurred.' as contents; SELECT 'table' as component, 'Cell' as markdown, 1 as search, 1 as sort; SELECT c.code_notebook_cell_id, c.notebook_name, c.cell_name, c.is_idempotent, c.version_timestamp, c.from_state, c.to_state, c.transition_reason, c.transition_result, c.transitioned_at FROM code_notebook_sql_cell_migratable_state AS c ORDER BY c.cell_name; -- Executable Migrations SELECT 'title' AS component, 'Executable Migrations' AS contents; SELECT 'text' AS component, 'All cells that are candidates for migration (including duplicates)' as contents; SELECT 'table' as component, 'Cell' as markdown, 1 as search, 1 as sort; SELECT c.code_notebook_cell_id, c.notebook_name, c.cell_name, '[' || c.cell_name || ']('||sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/notebooks/notebook-cell.sql?notebook=' || replace(c.notebook_name, ' ', '%20') || '&cell=' || replace(c.cell_name, ' ', '%20') || ')' as Cell, c.interpretable_code_hash, c.is_idempotent, c.version_timestamp FROM code_notebook_sql_cell_migratable_version AS c ORDER BY c.cell_name; -- All Migrations SELECT 'button' as component; SELECT sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/notebooks' as link, 'See all notebook entries' as title; | 2025-04-04 10:31:34 |
console/migrations/notebook-cell.sql | SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties; -- not including breadcrumbs from sqlpage_aide_navigation -- not including page title from sqlpage_aide_navigation 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/migrations/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; SELECT 'Notebook ' || $notebook || ' Cell' || $cell AS title, '#' AS link; SELECT 'code' as component; SELECT $notebook || '.' || $cell || ' (' || k.kernel_name ||')' as title, COALESCE(c.cell_governance -> '$.language', 'sql') as language, c.interpretable_code as contents FROM code_notebook_kernel k, code_notebook_cell c WHERE c.notebook_name = $notebook AND c.cell_name = $cell AND k.code_notebook_kernel_id = c.notebook_kernel_id; | 2025-04-04 10:31:34 |
console/about.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/about.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 -- Title Component SELECT 'text' AS component, ('Resource Surveillance v' || replace(sqlpage.exec('surveilr', '--version'), 'surveilr ', '')) AS title; -- Description Component SELECT 'text' AS component, 'A detailed description of what is incorporated into surveilr. It informs of critical dependencies like rusqlite, sqlpage, pgwire, e.t.c, ensuring they are present and meet version requirements. Additionally, it scans for and executes capturable executables in the PATH and evaluates surveilr_doctor_* database views for more insights.' AS contents_md; -- Section: Dependencies SELECT 'title' AS component, 'Internal Dependencies' AS contents, 2 AS level; SELECT 'table' AS component, TRUE AS sort; SELECT "Dependency", "Version" FROM ( SELECT 'SQLPage' AS "Dependency", json_extract(json_data, '$.versions.sqlpage') AS "Version" FROM (SELECT sqlpage.exec('surveilr', 'doctor', '--json') AS json_data) UNION ALL SELECT 'Pgwire', json_extract(json_data, '$.versions.pgwire') FROM (SELECT sqlpage.exec('surveilr', 'doctor', '--json') AS json_data) UNION ALL SELECT 'Rusqlite', json_extract(json_data, '$.versions.rusqlite') FROM (SELECT sqlpage.exec('surveilr', 'doctor', '--json') AS json_data) ); -- Section: Static Extensions SELECT 'title' AS component, 'Statically Linked Extensions' AS contents, 2 AS level; SELECT 'table' AS component, TRUE AS sort; SELECT json_extract(value, '$.name') AS "Extension Name", json_extract(value, '$.url') AS "URL", json_extract(value, '$.version') AS "Version" FROM json_each( json_extract(sqlpage.exec('surveilr', 'doctor', '--json'), '$.static_extensions') ); -- Section: Dynamic Extensions SELECT 'title' AS component, 'Dynamically Linked Extensions' AS contents, 2 AS level; SELECT 'table' AS component, TRUE AS sort; SELECT json_extract(value, '$.name') AS "Extension Name", json_extract(value, '$.path') AS "Path" FROM json_each( json_extract(sqlpage.exec('surveilr', 'doctor', '--json'), '$.dynamic_extensions') ); -- Section: Environment Variables SELECT 'title' AS component, 'Environment Variables' AS contents, 2 AS level; SELECT 'table' AS component, TRUE AS sort; SELECT json_extract(value, '$.name') AS "Variable", json_extract(value, '$.value') AS "Value" FROM json_each( json_extract(sqlpage.exec('surveilr', 'doctor', '--json'), '$.env_vars') ); -- Section: Capturable Executables SELECT 'title' AS component, 'Capturable Executables' AS contents, 2 AS level; SELECT 'table' AS component, TRUE AS sort; SELECT json_extract(value, '$.name') AS "Executable Name", json_extract(value, '$.output') AS "Output" FROM json_each( json_extract(sqlpage.exec('surveilr', 'doctor', '--json'), '$.capturable_executables') ); 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 || '](/console/info-schema/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 WHERE view_name LIKE 'surveilr_doctor%' GROUP BY view_name; | 2025-04-04 10:31:34 |
console/statistics/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/statistics/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 'datagrid' as component; SELECT 'Size' as title, "db_size_mb" || ' MB' as description FROM rssd_statistics_overview; SELECT 'Tables' as title, "total_tables" as description FROM rssd_statistics_overview; SELECT 'Indexes' as title, "total_indexes" as description FROM rssd_statistics_overview; SELECT 'Rows' as title, "total_rows" as description FROM rssd_statistics_overview; SELECT 'Page Size' as title, "page_size" as description FROM rssd_statistics_overview; SELECT 'Total Pages' as title, "total_pages" as description FROM rssd_statistics_overview; select 'text' as component, 'Tables' as title; SELECT 'table' AS component, TRUE as sort, TRUE as search; SELECT * FROM rssd_table_statistic ORDER BY table_size_mb DESC; | 2025-04-04 10:31:34 |
ur/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='ur/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 WITH navigation_cte AS ( SELECT COALESCE(title, caption) as title, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND path ='ur'||'/index.sql' ) SELECT 'list' AS component, title, description FROM navigation_cte; SELECT caption as title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' || COALESCE(url, path) as link, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND parent_path = 'ur'||'/index.sql' ORDER BY sibling_order; | 2025-04-04 10:31:34 |
ur/info-schema.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='ur/info-schema.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, 'Uniform Resource Tables and Views' as contents; SELECT 'table' AS component, 'Name' AS markdown, 'Column Count' as align_right, TRUE as sort, TRUE as search; SELECT 'Table' as "Type", '[' || table_name || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/info-schema/table.sql?name=' || table_name || ')' AS "Name", COUNT(column_name) AS "Column Count" FROM console_information_schema_table WHERE table_name = 'uniform_resource' OR table_name like 'ur_%' GROUP BY table_name UNION ALL SELECT 'View' as "Type", '[' || view_name || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/info-schema/view.sql?name=' || view_name || ')' AS "Name", COUNT(column_name) AS "Column Count" FROM console_information_schema_view WHERE view_name like 'ur_%' GROUP BY view_name; | 2025-04-04 10:31:34 |
ur/uniform-resource-files.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='ur/uniform-resource-files.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, (SELECT COALESCE(title, caption) FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND path = 'ur/uniform-resource-files.sql/index.sql') as contents; ; -- sets up $limit, $offset, and other variables (use pagination.debugVars() to see values in web-ui) SET total_rows = (SELECT COUNT(*) FROM uniform_resource_file ); SET limit = COALESCE($limit, 50); SET offset = COALESCE($offset, 0); SET total_pages = ($total_rows + $limit - 1) / $limit; SET current_page = ($offset / $limit) + 1; -- Display uniform_resource table with pagination SELECT 'table' AS component, 'Uniform Resources' AS title, "Size (bytes)" as align_right, TRUE AS sort, TRUE AS search, TRUE AS hover, TRUE AS striped_rows, TRUE AS small; SELECT * FROM uniform_resource_file ORDER BY uniform_resource_id LIMIT $limit OFFSET $offset; SELECT 'text' AS component, (SELECT CASE WHEN $current_page > 1 THEN '[Previous](?limit=' || $limit || '&offset=' || ($offset - $limit) || ')' ELSE '' END) || ' ' || '(Page ' || $current_page || ' of ' || $total_pages || ") " || (SELECT CASE WHEN $current_page < $total_pages THEN '[Next](?limit=' || $limit || '&offset=' || ($offset + $limit) || ')' ELSE '' END) AS contents_md ; | 2025-04-04 10:31:34 |
ur/uniform-resource-imap-account.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='ur/uniform-resource-imap-account.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, (SELECT COALESCE(title, caption) FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND path = 'ur/uniform-resource-imap-account.sql/index.sql') as contents; ; select 'title' as component, 'Mailbox' as contents; -- Display uniform_resource table with pagination SELECT 'table' AS component, 'Uniform Resources' AS title, "Size (bytes)" as align_right, TRUE AS sort, TRUE AS search, TRUE AS hover, TRUE AS striped_rows, TRUE AS small, 'email' AS markdown; SELECT '[' || email || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-folder.sql?imap_account_id=' || ur_ingest_session_imap_account_id || ')' AS "email" FROM uniform_resource_imap GROUP BY ur_ingest_session_imap_account_id ORDER BY uniform_resource_id; | 2025-04-04 10:31:34 |
ur/uniform-resource-imap-folder.sql | SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties; -- not including breadcrumbs from sqlpage_aide_navigation -- not including page title from sqlpage_aide_navigation SELECT 'breadcrumb' as component; SELECT 'Home' as title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' as link; SELECT 'Uniform Resource' as title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/index.sql' as link; SELECT 'Uniform Resources (IMAP)' as title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-account.sql' as link; SELECT 'Folder' as title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-folder.sql?imap_account_id=' || $imap_account_id:: TEXT as link; SELECT 'title' as component, (SELECT email FROM uniform_resource_imap WHERE ur_ingest_session_imap_account_id = $imap_account_id::TEXT) as contents; --Display uniform_resource table with pagination SELECT 'table' AS component, 'Uniform Resources' AS title, "Size (bytes)" as align_right, TRUE AS sort, TRUE AS search, TRUE AS hover, TRUE AS striped_rows, TRUE AS small, 'folder' AS markdown; SELECT '[' || folder_name || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-mail-list.sql?folder_id=' || ur_ingest_session_imap_acct_folder_id || ')' AS "folder" FROM uniform_resource_imap WHERE ur_ingest_session_imap_account_id = $imap_account_id:: TEXT GROUP BY ur_ingest_session_imap_acct_folder_id ORDER BY uniform_resource_id; | 2025-04-04 10:31:34 |
ur/uniform-resource-imap-mail-list.sql | SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties; -- not including breadcrumbs from sqlpage_aide_navigation -- not including page title from sqlpage_aide_navigation SELECT 'breadcrumb' AS component; SELECT 'Home' AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' SELECT 'Uniform Resource' AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/index.sql' as link; SELECT 'Uniform Resources (IMAP)' AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-account.sql' AS link; SELECT 'Folder' AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-folder.sql?imap_account_id='|| ur_ingest_session_imap_account_id AS link FROM uniform_resource_imap WHERE ur_ingest_session_imap_acct_folder_id = $folder_id::TEXT GROUP BY ur_ingest_session_imap_acct_folder_id; SELECT folder_name AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-mail-list.sql?folder_id=' || ur_ingest_session_imap_acct_folder_id AS link FROM uniform_resource_imap WHERE ur_ingest_session_imap_acct_folder_id=$folder_id::TEXT GROUP BY ur_ingest_session_imap_acct_folder_id; SELECT 'title' as component, (SELECT email || ' (' || folder_name || ')' FROM uniform_resource_imap WHERE ur_ingest_session_imap_acct_folder_id=$folder_id::TEXT) as contents; -- sets up $limit, $offset, and other variables (use pagination.debugVars() to see values in web-ui) SET total_rows = (SELECT COUNT(*) FROM uniform_resource_imap ); SET limit = COALESCE($limit, 50); SET offset = COALESCE($offset, 0); SET total_pages = ($total_rows + $limit - 1) / $limit; SET current_page = ($offset / $limit) + 1; -- Display uniform_resource table with pagination SELECT 'table' AS component, 'Uniform Resources' AS title, "Size (bytes)" as align_right, TRUE AS sort, TRUE AS search, TRUE AS hover, TRUE AS striped_rows, TRUE AS small, 'subject' AS markdown;; SELECT '[' || subject || '](uniform-resource-imap-mail-detail.sql?resource_id=' || uniform_resource_id || ')' AS "subject" , "from", CASE WHEN ROUND(julianday('now') - julianday(date)) = 0 THEN 'Today' WHEN ROUND(julianday('now') - julianday(date)) = 1 THEN '1 day ago' WHEN ROUND(julianday('now') - julianday(date)) BETWEEN 2 AND 6 THEN CAST(ROUND(julianday('now') - julianday(date)) AS INT) || ' days ago' WHEN ROUND(julianday('now') - julianday(date)) < 30 THEN CAST(ROUND(julianday('now') - julianday(date)) AS INT) || ' days ago' WHEN ROUND(julianday('now') - julianday(date)) < 365 THEN CAST(ROUND((julianday('now') - julianday(date)) / 30) AS INT) || ' months ago' ELSE CAST(ROUND((julianday('now') - julianday(date)) / 365) AS INT) || ' years ago' END AS "Relative Time", strftime('%Y-%m-%d', substr(date, 1, 19)) as date FROM uniform_resource_imap WHERE ur_ingest_session_imap_acct_folder_id=$folder_id::TEXT ORDER BY uniform_resource_id LIMIT $limit OFFSET $offset; SELECT 'text' AS component, (SELECT CASE WHEN $current_page > 1 THEN '[Previous](?limit=' || $limit || '&offset=' || ($offset - $limit) || '&folder_id=' || $folder_id || ')' ELSE '' END) || ' ' || '(Page ' || $current_page || ' of ' || $total_pages || ") " || (SELECT CASE WHEN $current_page < $total_pages THEN '[Next](?limit=' || $limit || '&offset=' || ($offset + $limit) || '&folder_id=' || $folder_id || ')' ELSE '' END) AS contents_md ; | 2025-04-04 10:31:34 |
ur/uniform-resource-imap-mail-detail.sql | SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties; -- not including breadcrumbs from sqlpage_aide_navigation -- not including page title from sqlpage_aide_navigation SELECT 'breadcrumb' AS component; SELECT 'Home' AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/'AS link; SELECT 'Uniform Resource' AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/index.sql' AS link; SELECT 'Uniform Resources (IMAP)' AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-account.sql' AS link; SELECT 'Folder' AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-folder.sql?imap_account_id=' || ur_ingest_session_imap_account_id AS link FROM uniform_resource_imap WHERE uniform_resource_id = $resource_id::TEXT GROUP BY ur_ingest_session_imap_acct_folder_id; SELECT folder_name AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-mail-list.sql?folder_id=' || ur_ingest_session_imap_acct_folder_id AS link FROM uniform_resource_imap WHERE uniform_resource_id=$resource_id::TEXT GROUP BY ur_ingest_session_imap_acct_folder_id; SELECT subject AS title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-mail-detail.sql?resource_id=' || uniform_resource_id AS link FROM uniform_resource_imap WHERE uniform_resource_id = $resource_id:: TEXT; --Breadcrumb ends-- - --- back button-- - select 'button' as component; select "<< Back" as title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/ur/uniform-resource-imap-mail-list.sql?folder_id=' || ur_ingest_session_imap_acct_folder_id as link FROM uniform_resource_imap WHERE uniform_resource_id = $resource_id:: TEXT; --Display uniform_resource table with pagination SELECT 'datagrid' as component; SELECT 'From' as title, "from" as "description" FROM uniform_resource_imap where uniform_resource_id=$resource_id::TEXT; SELECT 'To' as title, email as "description" FROM uniform_resource_imap where uniform_resource_id=$resource_id::TEXT; SELECT 'Subject' as title, subject as "description" FROM uniform_resource_imap where uniform_resource_id=$resource_id::TEXT; SELECT 'html' AS component; SELECT html_content AS html FROM uniform_resource_imap_content WHERE uniform_resource_id=$resource_id::TEXT ; | 2025-04-04 10:31:34 |
orchestration/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='orchestration/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 WITH navigation_cte AS ( SELECT COALESCE(title, caption) as title, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND path = 'orchestration'||'/index.sql' ) SELECT 'list' AS component, title, description FROM navigation_cte; SELECT caption as title, sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/' || COALESCE(url, path) as link, description FROM sqlpage_aide_navigation WHERE namespace = 'prime' AND parent_path = 'orchestration'||'/index.sql' ORDER BY sibling_order; | 2025-04-04 10:31:34 |
orchestration/info-schema.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='orchestration/info-schema.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, 'Orchestration Tables and Views' as contents; SELECT 'table' AS component, 'Name' AS markdown, 'Column Count' as align_right, TRUE as sort, TRUE as search; SELECT 'Table' as "Type", '[' || table_name || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/info-schema/table.sql?name=' || table_name || ')' AS "Name", COUNT(column_name) AS "Column Count" FROM console_information_schema_table WHERE table_name = 'orchestration_session' OR table_name like 'orchestration_%' GROUP BY table_name UNION ALL SELECT 'View' as "Type", '[' || view_name || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/console/info-schema/view.sql?name=' || view_name || ')' AS "Name", COUNT(column_name) AS "Column Count" FROM console_information_schema_view WHERE view_name like 'orchestration_%' GROUP BY view_name; | 2025-04-04 10:31:34 |
Error We are sorry, but an error occurred while generating this page. You should contact the site's administrator.
Error in query number 6:
Parsing failed: SQLPage couldn't understand the SQL file. Please check for syntax errors:
SELECT 'text' AS component,
(SELECT CASE WHEN $current_page > 1 THEN '[Previous](?limit=' || $limit || '&offset=' || ($offset - $limit) || ')' ELSE ' END) || ' ' ||
⬆️
'(Page ' || $current_page || ' of ' || $total_pages || ') ' ||
Backtrace
sql parser error: Expected: ), found: $current_page at Line: 42, Column: 35
"console/content/table/sqlpage_files.auto.sql" contains a syntax error preventing SQLPage from parsing and preparing its SQL statements.
You can hide error messages like this one from your users by setting the 'environment' configuration option to 'production'.