SQL notebooks with Markdown cells and saved results

オープン
#3,618 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
macos, markdown, sql, swift
領域
databases, desktop

調査の方向性

Read features/query-results.mdx, features/sql-files.mdx, and features/query-parameters.mdx to understand the existing query, file, and parameter behavior. The issue defines the target as a Markdown notebook with three SQL cells, two Markdown cells, saved results, and ordered execution that stops at the first error. No implementation files or tests are named, so the first step is locating the notebook and query execution entry points.

索引モデルが issue の本文から書いたものです。

説明

enhancement platform-macos
Problem

A query tab holds SQL text and a set of results. Each statement can run on its own from the gutter (#2278), every run gets its own result, and pinning keeps one while you try another (features/query-results.mdx:8-40). Two things are missing:

  • Results are not kept. Saving a tab writes its SQL to the .sql file and nothing else (features/sql-files.mdx:18-26), so reopening an investigation means running every query again.
  • Notes live in SQL comments. Nothing renders Markdown between queries.

An incident write-up, a runbook or a weekly report that mixes queries, explanations and results gets rebuilt by hand each time, or pasted cell by cell into another document with Copy as Markdown (features/data-grid.mdx:166). #2278 set real notebook cells aside as a separate document model and product decision; this issue is that decision.

Proposed solution
  • A notebook is a Markdown file. Each fenced sql block is a SQL cell and the text between blocks is a Markdown cell, so a notebook diffs cleanly in Git and reads on GitHub.
  • Each SQL cell shows its result grid, or its chart, beneath it, using the existing grid and row cap. Cmd+Enter runs the cell; Run All and Run From Here run in order and stop at the first error.
  • A notebook runs on one connection, database and schema, shown in its header. :name query parameters set once at the top apply to every cell (features/query-parameters.mdx).
  • Save Results writes each cell's result below it as a Markdown table, capped at 100 rows, so a shared notebook shows what it showed. Clear Results removes them before a commit.
  • Export to HTML and PDF.
  • Notebooks open from Finder and Cmd+O, and linked SQL folders list them beside .sql files.
  • Safe Mode and the connection's policies apply to every cell as they do to a query tab.

Done when: a notebook with three SQL cells and two Markdown cells saves, reopens with its results, renders on GitHub, and Run All stops at a failing second cell without running the third.

Alternatives considered

Keep the queries in a .sql file and the notes and pasted results in a separate document.

Platform

macOS

Related database type

N/A / General

主要言語
Swift
スター
6.2k
フォーク
412
平均マージ
3時間 56分
マージ済み PR(30日)
669

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TableProApp/TablePro のほかの issue

TableProApp/TablePro の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。