diff --git a/docs.json b/docs.json index 6247cc7..47cef23 100644 --- a/docs.json +++ b/docs.json @@ -457,14 +457,23 @@ ] }, { - "tab": "Windows preview", + "tab": "Windows", "icon": "windows", "groups": [ { "group": "TablePro for Windows", "pages": [ + "windows/install", + "windows/connect", + "windows/sql-editor", "windows/data-grid", "windows/browsing", + "windows/import-export", + "windows/mcp", + "windows/command-line", + "windows/links", + "windows/settings", + "windows/keyboard-shortcuts", "windows/account" ] } diff --git a/faq.mdx b/faq.mdx index a0228fb..a3a8293 100644 --- a/faq.mdx +++ b/faq.mdx @@ -96,7 +96,7 @@ Yes. The public beta has its own [supported engines](/linux/connect#engines). [I -The Windows app is in development and has no release yet. Follow progress in the [Windows source directory](https://github.com/TableProApp/TablePro/tree/main/windows). +Yes, for Windows 10 version 1809 and later and Windows 11. [Install on Windows](/windows/install) covers App Installer, winget and the release bundle, and lists what the Mac app has that Windows does not yet. Its engines are on [Connect](/windows/connect#engines). diff --git a/features/licensing.mdx b/features/licensing.mdx index 1f4a13b..6683664 100644 --- a/features/licensing.mdx +++ b/features/licensing.mdx @@ -23,7 +23,7 @@ There are two paid plans, Pro and Team. Team includes everything in Pro. Starter | [Team Catalog](/features/connection-sharing) | Team | Menu item hidden | | [Team Library](/features/team) | Team | Menu item hidden | -The table describes macOS features. The [Linux beta](/linux/install) uses the same plans and accounts; its [account guide](https://github.com/TableProApp/TablePro/blob/main/linux/README.md#tablepro-account) covers device limits and sign-in. The Windows preview signs in to the same accounts: see [TablePro account](/windows/account). The [iPhone and iPad app](/ios) needs no plan. +The table describes macOS features. The [Linux beta](/linux/install) uses the same plans and accounts; its [account guide](https://github.com/TableProApp/TablePro/blob/main/linux/README.md#tablepro-account) covers device limits and sign-in. The [Windows app](/windows/install) signs in to the same accounts: see [TablePro account](/windows/account). The [iPhone and iPad app](/ios) needs no plan. Signed out, a row, overlay or dialog offers **Sign In** and **Purchase License**. Signed in to an account without the feature, it offers **Upgrade Plan**, which opens the pricing page. A plan you already hold is never offered for sale: when it could not be checked, the gate says what **Settings > Account** says and offers **Try Again**, and past the [device limit](#devices) it offers **Open Account Settings…**. Everything else in the app works without a plan. diff --git a/images/windows-connection-form-dark.png b/images/windows-connection-form-dark.png new file mode 100644 index 0000000..c6853a2 Binary files /dev/null and b/images/windows-connection-form-dark.png differ diff --git a/images/windows-connection-form.png b/images/windows-connection-form.png new file mode 100644 index 0000000..17f784a Binary files /dev/null and b/images/windows-connection-form.png differ diff --git a/images/windows-csv-import-dark.png b/images/windows-csv-import-dark.png new file mode 100644 index 0000000..39f4c5a Binary files /dev/null and b/images/windows-csv-import-dark.png differ diff --git a/images/windows-csv-import.png b/images/windows-csv-import.png new file mode 100644 index 0000000..7d36899 Binary files /dev/null and b/images/windows-csv-import.png differ diff --git a/images/windows-import-from-app-dark.png b/images/windows-import-from-app-dark.png new file mode 100644 index 0000000..edb8311 Binary files /dev/null and b/images/windows-import-from-app-dark.png differ diff --git a/images/windows-import-from-app.png b/images/windows-import-from-app.png new file mode 100644 index 0000000..23a0887 Binary files /dev/null and b/images/windows-import-from-app.png differ diff --git a/images/windows-link-query-dark.png b/images/windows-link-query-dark.png new file mode 100644 index 0000000..5e08275 Binary files /dev/null and b/images/windows-link-query-dark.png differ diff --git a/images/windows-link-query.png b/images/windows-link-query.png new file mode 100644 index 0000000..ca92ea8 Binary files /dev/null and b/images/windows-link-query.png differ diff --git a/images/windows-mcp-settings-dark.png b/images/windows-mcp-settings-dark.png new file mode 100644 index 0000000..c2b9dbc Binary files /dev/null and b/images/windows-mcp-settings-dark.png differ diff --git a/images/windows-mcp-settings.png b/images/windows-mcp-settings.png new file mode 100644 index 0000000..807c730 Binary files /dev/null and b/images/windows-mcp-settings.png differ diff --git a/images/windows-new-connection-dark.png b/images/windows-new-connection-dark.png new file mode 100644 index 0000000..59477ba Binary files /dev/null and b/images/windows-new-connection-dark.png differ diff --git a/images/windows-new-connection.png b/images/windows-new-connection.png new file mode 100644 index 0000000..2d7a7cb Binary files /dev/null and b/images/windows-new-connection.png differ diff --git a/images/windows-results-json-dark.png b/images/windows-results-json-dark.png new file mode 100644 index 0000000..26a2848 Binary files /dev/null and b/images/windows-results-json-dark.png differ diff --git a/images/windows-results-json.png b/images/windows-results-json.png new file mode 100644 index 0000000..8866854 Binary files /dev/null and b/images/windows-results-json.png differ diff --git a/images/windows-row-details-dark.png b/images/windows-row-details-dark.png new file mode 100644 index 0000000..45bc60e Binary files /dev/null and b/images/windows-row-details-dark.png differ diff --git a/images/windows-row-details.png b/images/windows-row-details.png new file mode 100644 index 0000000..9f304e9 Binary files /dev/null and b/images/windows-row-details.png differ diff --git a/images/windows-settings-dark.png b/images/windows-settings-dark.png new file mode 100644 index 0000000..f8888a1 Binary files /dev/null and b/images/windows-settings-dark.png differ diff --git a/images/windows-settings.png b/images/windows-settings.png new file mode 100644 index 0000000..ebad155 Binary files /dev/null and b/images/windows-settings.png differ diff --git a/images/windows-sql-editor-dark.png b/images/windows-sql-editor-dark.png new file mode 100644 index 0000000..4a58f53 Binary files /dev/null and b/images/windows-sql-editor-dark.png differ diff --git a/images/windows-sql-editor.png b/images/windows-sql-editor.png new file mode 100644 index 0000000..560ee27 Binary files /dev/null and b/images/windows-sql-editor.png differ diff --git a/index.mdx b/index.mdx index 635cd82..0ed034a 100644 --- a/index.mdx +++ b/index.mdx @@ -1,6 +1,6 @@ --- title: Introduction -description: Database guides for macOS, iPhone and iPad, and the Linux beta +description: Database guides for macOS, Windows, iPhone and iPad, and the Linux beta --- Choose your platform to install the app, connect to a database, and run your first query. Database support and features differ by platform. @@ -15,8 +15,8 @@ Choose your platform to install the app, connect to a database, and run your fir Install from the beta PPA, COPR, or Flatpak repository. - - In development. No release is available. Follow the source repository for progress. + + Install with App Installer or winget on Windows 10 1809 or later and Windows 11. @@ -27,7 +27,7 @@ Choose your platform to install the app, connect to a database, and run your fir Mac connection window with a table sidebar and data grid -[Run your first query](/quickstart), [import existing connections](/switching), or find your engine in [Supported databases](/databases). For other platforms, use the [iPhone and iPad guide](/ios) or the [Linux connection guide](/linux/connect). +[Run your first query](/quickstart), [import existing connections](/switching), or find your engine in [Supported databases](/databases). For other platforms, use the [Windows guide](/windows/install), the [iPhone and iPad guide](/ios) or the [Linux connection guide](/linux/connect). ## Free and paid diff --git a/snippets/platform-guides.mdx b/snippets/platform-guides.mdx index 5aa2266..4e17762 100644 --- a/snippets/platform-guides.mdx +++ b/snippets/platform-guides.mdx @@ -1 +1 @@ -For another platform, follow the [iPhone and iPad guide](/ios) or the [Linux guide](/linux/install). [All platforms](/) lists availability. +For another platform, follow the [Windows guide](/windows/install), the [iPhone and iPad guide](/ios) or the [Linux guide](/linux/install). [All platforms](/) lists availability. diff --git a/windows/account.mdx b/windows/account.mdx index 058e9a6..65949fe 100644 --- a/windows/account.mdx +++ b/windows/account.mdx @@ -1,7 +1,6 @@ --- title: TablePro account description: Sign in to your TablePro account on Windows, check your plan, and remove a device from the license -tag: "Preview" --- Connections, queries and every other part of the app work signed out. [Shared links](/features/shared-links) need an account, and signing in puts your Free or Pro plan on this computer. The account is the one the Mac and Linux apps use. diff --git a/windows/browsing.mdx b/windows/browsing.mdx index 0096d4a..2b4223c 100644 --- a/windows/browsing.mdx +++ b/windows/browsing.mdx @@ -1,11 +1,18 @@ --- title: Browsing a connection -description: Filter a table, read its structure and DDL, open routines and triggers, export or share results, and find past queries in TablePro for Windows -tag: "Preview" +description: Work in the object tree, filter a table, read its structure and DDL, open routines and triggers, share results, and find past queries in TablePro for Windows --- Every object in the tree opens in a tab. Tables and views open as rows, and functions, procedures, triggers and sequences open as their source, read only. +## The object tree + +Objects sit in a folder per kind, with their count. Schemas show only when there is more than one besides the system ones. A folder lists its first 500 objects; **Show all** opens the rest in a list. Type in **Filter objects** (`Ctrl+P`) to find any object across schemas, names that start with the text first. `Ctrl+B` hides or shows the tree, and `F5` reads it again. + +Click a table or view to open its rows, or bring its open tab forward. Right-click it for **Open in new tab**, **Show structure**, **Show DDL**, **Copy name** and **Import CSV...**, and, where the engine has them and the connection is not read only, **Truncate...** and **Drop...**. + +A schema's menu has **New schema...** and **Drop schema**, or **New database...** and **Drop database** where the server's databases are its schemas. **New database...** and **New schema...** are in the **Database** menu too. Each shows its statements under Safe Mode and runs once you confirm. The engine's own databases and schemas, and the one you are in, are never offered for a drop. + ## Filter rows Click **Filter** in a table tab, or press `Ctrl+Shift+F`, to show the filter bar above the rows. @@ -32,7 +39,9 @@ Add a rule with **+**. With two or more rules, choose **Match all** or **Match a - A rule missing its value is pointed out before anything runs. - A filter the database refuses keeps the filter you had, and the results say why. Refresh reads the rows again. - Changing the filter while edits are pending asks before it discards them. -- The filter stays with the tab when TablePro restarts. +- Each table keeps the filter it was last read with, per connection, database and schema. Opening the table again applies it; **Clear** forgets it. + +To filter by a value in the grid, right-click the cell and open **Filter**. It offers equal and not equal to the value, greater and less than where the column orders, and **is NULL** or **is not NULL** on a NULL cell, each where the engine has the operator. Under **Match all**, the rule joins the ones you have and applies at once. Under **Match any** with two or more rules, it replaces them all, raw SQL included, so check the filter bar before you export or share the rows. A query result has no **Filter**. ## Read a table's structure @@ -82,29 +91,6 @@ A script whose statements return rows lists each result in the picker above the Earlier results are dropped as the script runs, and the status line says how many: `Rows: 1 · 12 ms · 990 earlier results were dropped.` A statement that returns no rows never counts toward the limit. A change applies from the next run. -## Export results - -Choose **File > Export results** or press `Ctrl+Shift+E`. - - - Export results dialog with CSV selected among JSON, Excel, Markdown, HTML and XML - Export results dialog with CSV selected among JSON, Excel, Markdown, HTML and XML - - - - - CSV, JSON, Excel, Markdown, HTML or XML. From a table tab, **SQL INSERT** writes one statement per row for that table. - - - **Current page** writes the rows on screen. **Entire table** reads every row the filter and sort pick, however many pages they span. - - - The file appears only once every row is written. A failed or cancelled export leaves no file behind. - - - -From a query tab, export writes the result shown. Export waits until the run has finished. CSV is the default; pick Excel for a spreadsheet, which holds up to 1,048,575 rows. - ## Share a result or query Sharing needs a signed-in [TablePro account](/windows/account); signed out, the share dialog offers **Sign in...**. @@ -123,7 +109,7 @@ Opening a `tablepro://share` link puts its SQL in a new query tab without runnin ## Find a past query -Choose **View > Show query history** to open the history beside the tabs. Every query you run in a query tab is kept with its time, duration and outcome, newest first. Type in the search box to find one by any words it contains. +Choose **Show query history** in the **View** menu to open the history beside the tabs. Every query you run in a query tab is kept with its time, duration and outcome, newest first. Type in the search box to find one by any words it contains. Query history pane listing a SELECT COUNT query with its time and duration @@ -131,7 +117,7 @@ Choose **View > Show query history** to open the history beside the tabs. Every - Double-click a query, or select it and press `Enter`, to open it in a new query tab. -- Right-click a query to copy or delete it. +- Right-click a query to copy, save, pin or delete it. A pinned run comes first and is never removed by the history limits in Settings. - **Clear history** removes the history of every connection, after asking. A statement that can hold a password, such as one that creates a user, is never kept. Sorting a result and committing or rolling back a transaction are not kept either. @@ -142,4 +128,4 @@ A statement that can hold a password, such as one that creates a user, is never |---|---| | Show or hide the filter bar | `Ctrl+Shift+F` | | Apply the filter | `Enter` in a value box | -| Export results | `Ctrl+Shift+E` | +| Filter objects in the tree | `Ctrl+P` | diff --git a/windows/command-line.mdx b/windows/command-line.mdx new file mode 100644 index 0000000..a7c6ba8 --- /dev/null +++ b/windows/command-line.mdx @@ -0,0 +1,116 @@ +--- +title: Command line +description: Query, browse and export saved connections from PowerShell or Command Prompt, and open files and links in TablePro for Windows +--- + +import CliExitStatus from "/snippets/cli-exit-status.mdx"; +import CliOutputFormats from "/snippets/cli-output-formats.mdx"; +import CliSchemaCommands from "/snippets/cli-schema-commands.mdx"; + +Installing TablePro adds a `tablepro` command to every terminal. A file or link argument opens in the app; a command such as `query` or `export` prints to standard output. + +## Set up + +```powershell +tablepro --help +tablepro help query +``` + +`tablepro --version` prints the version. The command is an app execution alias: if a terminal does not find it, check that **tablepro.exe** is on under **Apps > Advanced app settings > App execution aliases** in Windows Settings. + +Commands work through the app's [MCP server](/windows/mcp). Before querying, open TablePro and turn on **Enable MCP server** under **Settings > MCP server**. Commands never start the app. Each run reads the access token from Credential Manager, so there is nothing to pair, and after **Regenerate token...** the next command reads the new one. + +## Open files and links + +```powershell +tablepro +tablepro .\app.sqlite3 .\sales.duckdb +tablepro .\report.sql +tablepro "postgresql://ada@db.example.com:5432/shop" +``` + +With no arguments, the command starts the app or brings it forward. Database files open as [SQLite or DuckDB sessions](/windows/connect#sqlite-and-duckdb-files), a SQL file opens in a query tab without running, and a link opens as [Links and files](/windows/links) describes. + +`tablepro open ` opens a file or link too. Use it, or a path such as `.\tables`, for a file named like a command. A word that is neither an existing file nor a link exits 2. + +## Run a query + +```powershell +tablepro query -c Staging "SELECT id, email FROM users LIMIT 5" +tablepro query -c Staging -f report.sql --format csv > report.csv +"SELECT count(*) FROM orders" | tablepro query -c Staging --format json +``` + +Pass SQL as an argument, with `-f` (`--file`), or on standard input with `-f -`. + +| Option | Use | +|---|---| +| `-c`, `--connection` | Saved connection name or id; find it with the [browse commands](#browse-a-connection) | +| `--database` | A database open beside the connection in the app; the connection's own by default | +| `--format` | Choose an [output format](#output-formats) | +| `--limit` | Rows per result set, 100 by default; accepts 1 to 1,000 | +| `--timeout` | Seconds per statement, 30 by default; accepts 1 to 300 | +| `--read-only` | Refuse any statement that is not a read | + +On PostgreSQL and SQL Server, a database is open beside the connection once you switch to it in the app, which opens it as a rail item of its own. There is no `--schema` option on `query`: qualify names in SQL, such as `public.orders`. A result cut short says so on standard error. The limit bounds returned rows, not how many rows a write changes. + +### Open the connection + +Commands use connections open in the app. With standard error attached to a terminal, a command opens a closed connection and waits up to five minutes; answer any password prompt in the app. + +Without that terminal, as in a scheduled task, a closed connection exits 1. Open it in the app before the script runs. + +## Browse a connection + + + +As with `query`, `--database` picks only a database open beside the connection. Omit `--schema` to use the connection's default schema. + +## Export + +```powershell +tablepro export -c Staging --format csv orders > orders.csv +tablepro export -c Staging --schema public --format sql --limit 1000 orders users > shop.sql +``` + +`--format` is required: `csv`, `json` or `sql`. SQL writes `INSERT` statements in the engine's dialect. Pass table names without SQL quotes, and `--schema` for the schema. + +The [query row limit](#run-a-query) applies to each table; set `--limit` to change it. A call takes up to 20 tables, and standard error names any table cut short. For every row, use [Export results](/windows/import-export#export-results) in the app. + +PowerShell 5.1's `>` writes UTF-16. Pipe to `Out-File -Encoding utf8` for a UTF-8 file there; PowerShell 7 writes UTF-8 already. + +## Check status + +```powershell +tablepro status --format json +``` + +The report holds the app version, whether it is running, the MCP setting and port, whether a token was found, and whether the server is ready. It starts nothing. + +A ready server exits 0. A stopped or unreachable app exits 1. A server that is off, or a token it refuses, exits 3. + +## Shell completion + +```powershell +tablepro completion powershell | Out-String | Invoke-Expression +``` + +Add that line to your `$PROFILE` to complete commands, options and format names in every new PowerShell window. Connection names are not completed. `bash`, `zsh` and `fish` scripts print too, for a shell such as Git Bash. + +## Output formats + + + +JSON keeps the value types the server returned, numbers and booleans included. + +## Exit status + + + +## What a query may do + +A connection's [External clients](/windows/mcp#external-clients) level applies to every command that uses it. **Blocked** hides the connection, and naming it exits 2. **Read only** is the default and refuses writes. + +With **Read and write**, each write still waits for **Run** in the connection's window, and Safe Mode's **Read only** refuses it. `--read-only` refuses a write before anything is asked. + +Send one statement, or one SQL Server batch, per query. The SQL is limited to 100 KiB. A transaction a write leaves open is rolled back when the call ends. diff --git a/windows/connect.mdx b/windows/connect.mdx new file mode 100644 index 0000000..b4887c2 --- /dev/null +++ b/windows/connect.mdx @@ -0,0 +1,156 @@ +--- +title: Connect +description: The engines, the connection form, TLS, SSH tunnels, SQLite and DuckDB files, and the Connections page in TablePro for Windows +--- + +The Connections page is where a session starts: **New connection** (`Ctrl+N`), **New from URL**, **Open file** (`Ctrl+O`) and **Import** sit at its top. `Ctrl+Shift+H` comes back to it from any connection. Each open connection is an item on the rail at the window's left edge, with its own tabs and object tree. + +## Engines + +Every driver is built into the app. + +| Engine | Pick | Default port | +|---|---|---| +| PostgreSQL | **PostgreSQL** | 5432 | +| MySQL and MariaDB | **MySQL** | 3306 | +| SQL Server | **SQL Server** | 1433 | +| ClickHouse | **ClickHouse** | 8123 | +| Cassandra and ScyllaDB | **Cassandra / ScyllaDB** | 9042 | +| Redis | **Redis** | 6379 | +| MongoDB | **MongoDB** | 27017 | +| SQLite | **SQLite** | No port: a file | +| DuckDB | **DuckDB** | No port: a file | + + + New connection window listing MySQL, PostgreSQL, SQL Server and SQLite under Relational, then MongoDB, Redis, ClickHouse, DuckDB and Cassandra / ScyllaDB + New connection window listing MySQL, PostgreSQL, SQL Server and SQLite under Relational, then MongoDB, Redis, ClickHouse, DuckDB and Cassandra / ScyllaDB + + +## Add a connection + + + + Click **New connection**. The form opens in a window of its own, so the rest of the app stays usable. + + + Click its card, or type in **Search engines**. **Change engine** at the top of the next page goes back. + + + **Host**, **Port**, **User name**, **Password** and **Database**. **Port** starts on the engine's default, and **Database** is optional. + + + **Test** connects once and reports, **Connect** saves the connection and opens it, and **Save** keeps it without connecting. `Escape` closes the form. + + + +A field with a problem says so under it, and the section holding it opens. The password goes to Windows Credential Manager. An empty password is saved as empty, for a server that takes none. Editing a connection keeps its stored password unless you type a new one. + + + PostgreSQL connection form with Host localhost, Port 5432, an SSH tunnel section switched off and SSL/TLS set to Preferred, any certificate + PostgreSQL connection form with Host localhost, Port 5432, an SSH tunnel section switched off and SSL/TLS set to Preferred, any certificate + + +### From a connection URL + +Click **From connection URL...** on the engine page, or **New from URL** on the Connections page, and paste a URL such as `postgresql://ada@db.example.com:5432/shop`. `Ctrl+V` on the Connections page does the same with a URL on the clipboard. The form opens filled in, so you see what the URL holds before anything connects. + +A MongoDB URL with `mongodb+srv://`, several hosts or an authentication database, and any URL naming a local socket, cannot be kept yet. The form says which setting it cannot keep. + +### SQL Server sign-in + +**Authentication** picks **User name and password** or **Windows authentication**. Windows authentication signs in as the Windows user running TablePro, with no password in the form. + +## Options + +| Row | Sets | +|---|---| +| **Safe Mode** | What is asked before a write. See the next table | +| **External clients** | What MCP clients and the `tablepro` command may do: **Blocked**, **Read only** (the default) or **Read and write**. See [MCP server](/windows/mcp#external-clients) | +| **AI assistant** | Whether the assistant may send this connection's table structure: **Ask each time** (the default), **Always allow** or **Never** | +| **Query timeout** | Seconds a statement may run on this connection. Empty follows the one in Settings | + +| Safe Mode | Does | +|---|---| +| **Off**, the default | Asks only before DROP, TRUNCATE, and DELETE or UPDATE without WHERE | +| **Confirm writes** | Asks before every statement that changes the database, listing each one in full | +| **Read only** | Refuses every run that holds a write | + +Pick **Read only** for a production server you only read. A change applies at once to the connection's open sessions. Moving to or from **Read only** reconnects them, after asking about open transactions. + +**Appearance** sets a **Color** and a **Group**. The front connection's color tints the title bar, the menu bar and its tab strip, so a production connection stands out. + +## TLS + +**SSL/TLS** picks the mode: + +| Mode | Connection | +|---|---| +| **Off** | Plain, no TLS | +| **Preferred, any certificate** | PostgreSQL and MySQL only. Encrypted if the server offers TLS, otherwise plain. The certificate is not checked | +| **Required, any certificate** | Encrypted. The certificate is not checked | +| **Required, verify the certificate and host** | Encrypted. The certificate must be valid for the host | +| **Strict (TDS 8.0), verify the certificate and host** | SQL Server only. TLS before the login, as TDS 8.0 needs it | + +A new connection starts where the engine's own client starts: + +| Engine | Starts on | +|---|---| +| PostgreSQL, MySQL | **Preferred, any certificate** | +| SQL Server | **Required, verify the certificate and host** | +| ClickHouse | **Off**, or **Required, verify the certificate and host** on ports 443 and 8443 | +| MongoDB, Cassandra, Redis | **Off** | + +Choose **Required, verify the certificate and host** to check the server. For a server signed by your own certificate authority, choose its file in **CA certificate** rather than dropping to **Required, any certificate**. **Client certificate** and **Client key** sign in with a certificate, and **Certificate host name** checks the certificate against another name than **Host**. + +A failed handshake says what went wrong and offers the fix beside it: **Choose CA certificate** for an unknown issuer, **Set TLS server name** for a name mismatch, **Change encryption** when the server wants another mode. + +## SSH tunnels + +Turn on **SSH tunnel**, then fill **SSH host**, **SSH port** and **SSH user name**. + +| Authentication | Uses | +|---|---| +| **SSH agent** | Keys from the Windows OpenSSH agent service, or from Pageant | +| **Private key** | A key file. A passphrase is asked for when you connect | +| **Password** | The SSH server's own password | +| **Keyboard interactive** | The server's own questions, such as a one-time code | + +**Jump hosts** takes servers to pass through first, as `user@host:port`, separated by commas. + +The first connect to a server shows its key's fingerprint under **Trust this SSH server?**. Check it with whoever runs the server, then click **Trust and connect**. A key that changed since shows **SSH server identity changed**: connect only once you know why, and click **Forget saved key** to accept the new one. + +## SQLite and DuckDB files + +**Open file** (`Ctrl+O`) opens a SQLite or DuckDB file without saving a connection. The file's header picks the engine, whatever its name. Opening a `.db`, `.sqlite`, `.sqlite3` or `.duckdb` file with TablePro from Explorer does the same; [Links and files](/windows/links#files) lists every extension. + +To keep the file as a connection, pick **SQLite** or **DuckDB** in **New connection**. **File** replaces the server fields: **Browse...** picks an existing file, and **New file...** names one that is made when you connect. + +**Try the sample database** on a fresh Connections page, or **Open the sample database** in the **Help** menu, copies Chinook, a small music store, and saves it as **Chinook (Sample)**. + +## The Connections page + +The list has **Favorites**, **Recent** and **All connections**, the last with your groups. Type in **Search connections** to match name, host, database, user, engine, group or tag; `Enter` connects to the first match. + +| To | Do this | +|---|---| +| Connect | Double-click the row, or select it and press `Enter` | +| Rename | Press `F2`, or choose **Rename** in the row's menu | +| Delete | Press `Delete`, then confirm | +| Copy with its passwords | Choose **Duplicate** in the row's menu | +| Group | Drag the row onto a group, or choose **Move to group** | +| Tag | Choose **Tags** in the row's menu. **Tags** at the top renames, recolors or deletes a tag | +| Act on several | Click **Select**, check the rows, then **Connect**, **Add to Favorites**, **Move to group** or **Delete** | + +A connection with no saved password asks for it when you connect. Select **Save it in Credential Manager** to keep it once it signs in. + +A connect that fails shows the reason with **Retry**, **Edit connection** and **Copy details**. + +## While connected + +**Database** in the menu bar holds **Edit connection...**, **Reconnect** and **Disconnect**. + +On an engine with several databases, the first row of the object tree names the database, and `Ctrl+K` opens it to switch. On MySQL, MariaDB, ClickHouse, Cassandra and MongoDB the pick changes where new query tabs run. On PostgreSQL and SQL Server it opens that database as a rail item of its own, named for the connection and the database. + +A lost connection shows a bar over the tabs while TablePro reconnects. When it gives up, click **Reconnect**. A query tab's own connection is never reopened behind your back, since its transaction would be gone: the next run opens a new one and says so. + +When you start TablePro, it reopens the connections and tabs you had, and connects only the one in front. **Reopen the previous session** in Settings turns that off. diff --git a/windows/data-grid.mdx b/windows/data-grid.mdx index d778714..588a49a 100644 --- a/windows/data-grid.mdx +++ b/windows/data-grid.mdx @@ -1,7 +1,6 @@ --- title: Data grid -description: Edit a table's rows and save them together in TablePro for Windows -tag: "Preview" +description: Page through a table, edit its rows and save them together, inspect a row, arrange columns, sum a selection and read rows as JSON in TablePro for Windows --- A table opened from the object tree shows one page of rows, 1,000 by default. Edit its cells, add and delete rows, and save the changes together. @@ -11,7 +10,15 @@ A table opened from the object tree shows one page of rows, 1,000 by default. Ed Artist table with the first name underlined on a yellow fill and row 25 struck through on red -## Count a large table +## Page through a table + +**First page**, **Previous page**, **Next page** and **Last page** sit in the table's command bar, and the status reads `1,001-2,000 of 3,503 rows · 15 ms`. Click **Page 3 of 36** between them to type a page number. + +The **1,000 rows** button sets the page size for this tab: 5, 10, 20, 100, 500 or 1,000 rows, **Custom...** up to 1,000,000, or **All rows...**, which asks first. A new size keeps the page holding the first row on screen. **Settings > Pagination > Default page size** sets it for new tabs: 100, 500, 1,000, 5,000 or 10,000. + +Cassandra pages on the server, so it has no **Last page**, **Go to page** or **All rows...**, and **Count rows** stays off. + +### Count a large table A table counts its rows when it opens, so **Last page** and **Go to page** know where the end is. A table the database estimates at more rows than **Settings > Pagination > Count rows if estimate less than** skips that count: the status reads `1-1,000 of about 2,000,000 rows`, and **Count rows** in the toolbar counts it on request. @@ -39,6 +46,17 @@ A value with a line break edits on several lines, and `Ctrl+Enter` keeps it. Rig An edited cell is underlined on a yellow fill, a new row on green, and a row marked for deletion is struck through on red. Typing a cell back to its stored value drops the edit. +### Editors by column type + +| Column | `F2`, `Enter` or a double-click | +|---|---| +| Boolean | Toggles the value. NULL and false become true | +| Enum with up to 100 values | A menu of the values, the current one checked | +| MySQL `SET` | A menu with a check per value; each pick adds or removes it | +| Date, time, timestamp | A calendar, a time picker with **Set**, or both. The seconds, fraction and offset the value had stay | + +Each menu ends with **Edit as text**, and `Tab` into a cell always opens the text box. JSON is checked when you keep the edit. + ## Save or discard **Save changes** (`Ctrl+S`) writes every change in one batch and reloads the page. **Preview SQL** (`Ctrl+Shift+P`) shows the statements first, each with the values it sends. **Discard changes** drops them all after asking. @@ -47,3 +65,61 @@ An edited cell is underlined on a yellow fill, a new row on green, and a row mar - With Safe Mode set to Confirm writes, the save shows its statements and runs after **Execute**. - A save the server refuses writes nothing and keeps every change pending, with the row it stopped at selected. - Sorting, paging or refreshing asks before it discards pending changes. Closing the tab, disconnecting or quitting offers to save them. + +Pending changes are kept in the session as you type. After a crash, a forced sign-out or an update, the table reopens with them pending again, and a bar counts any it could not place on the page, with **Discard**. When a save was cut off before its answer, **Save** is refused with "The last save may have been written" until you discard and read the rows again. + +## Edit a query result + +A query tab's result edits like a table's page, with the same keys, marks and questions, when all of these hold: + +- the run returned one result set, from one `SELECT` on one table, with its primary key; +- the run left no transaction open; +- the tab runs in the connection's own database. + +Otherwise the grid stays read only, and trying to edit says why, such as "Rows from more than one table, a subquery or a CTE can't be edited." `Ctrl+S` saves the changes while the grid has focus; from the editor it saves the SQL file. After a save, the statement runs again to show what the table holds. Pending changes in a query result are not kept across a restart. + +## Row and table details + +Click **Details** in the table's command bar to open a pane beside the rows. + + + Artist table with Details open, showing Row 1 with ArtistId 1 as INTEGER and Name AC/DC as TEXT + Artist table with Details open, showing Row 1 with ArtistId 1 as INTEGER and Name AC/DC as TEXT + + +**Row** lists each column of the focused row with its type, in a box that edits the cell. The edit is kept when the box loses focus or on `Ctrl+Enter`, and `Escape` puts the value back. The **...** menu beside a field sets **Empty**, **NULL** or **Default** and copies the value. + +**Table** shows the row estimate, the data, index and total size, and the table's comment. A figure the engine does not keep reads **Not reported**. + +## Arrange columns + +Right-click a header for **Hide column**, **Show all columns**, **Move column left** and **Move column right** (`Alt+Left`, `Alt+Right`), **Freeze up to this column** and **Unfreeze columns**. Drag a header to move its column. **Columns** in the command bar lists every column with a check, with **Show all columns** and **Reset columns**. + +Each table keeps its order, hidden columns and frozen columns, by column name: a column added since goes last. A freeze that would leave less than a third of the grid to scroll is refused. A query result keeps no layout. + +## Sum a selection + +Select two or more cells and the bar under the grid shows **Sum**, **Average** and **Count**. Click it for every figure, each with **Copy**: count, numbers, empty cells, cells that are not a number, sum, average, minimum and maximum. + +Numeric columns are summed exactly; a column the engine could not type is summed where its text reads as a number. Rows marked for deletion are left out, and pending edits count. + +## Read rows as JSON + +**JSON** at the bottom of a results pane shows the rows the grid shows as JSON, in the grid's column order with hidden columns left out. **Text** is the indented array with **Copy JSON**; **Tree** opens a node per row. Select rows on the row numbers to narrow it. + + + JSON view of the Artist table with Text selected, Rows: 275, Copy JSON, and objects holding ArtistId and Name + JSON view of the Artist table with Text selected, Rows: 275, Copy JSON, and objects holding ArtistId and Name + + +NULL is `null`, numbers and booleans keep their exact digits, and a JSON column, a MongoDB document's nested field included, nests as written. The view stops at 1,000 rows or about 1 MB and says so. Pending edits show as typed, and rows marked for deletion are left out. + +## Values, copies and keys + +| To | Do this | +|---|---| +| Copy cells | `Ctrl+C`. Cells go out tab-separated, as a spreadsheet reads them, and NULL as an empty cell | +| Read a long value | Right-click the cell and choose **View value...**, then **Text**, **JSON**, **Hex** or **Image** | +| Open the row a foreign key points to | Right-click the cell and choose **Open referenced row** | +| List the rows that point at this one | Right-click a cell in the row and choose **Show referencing rows** | +| Filter by the cell's value | Right-click the cell and open **Filter**; see [Filter rows](/windows/browsing#filter-rows) | diff --git a/windows/import-export.mdx b/windows/import-export.mdx new file mode 100644 index 0000000..c23a4b0 --- /dev/null +++ b/windows/import-export.mdx @@ -0,0 +1,88 @@ +--- +title: Import and export +description: Import a CSV file into a table, export rows to CSV, JSON, Excel and other formats, move connections in a file, and bring connections over from another database client in TablePro for Windows +--- + +Rows come in from a CSV file, one table at a time, and go out to a file from any result or table. Connections travel in a TablePro connections file, or straight from another app on this PC. + +## Import a CSV file + + + + Right-click the table in the object tree and choose **Import CSV...**, then pick the file. + + + Set **Delimiter** (**Comma**, **Semicolon**, **Tab** or **Pipe**; a `.tsv` file starts on Tab), whether **First row is a header**, and the **NULL text**, the field text that means NULL. Empty, it means an empty field. The dialog counts the fields and rows. + + + Each column takes a field, or **Skip**. Fields whose header names a column start mapped. A column the database fills says so and is left to it. + + + Click **Import**. With Safe Mode off, the rows are written at once. With Safe Mode set to Confirm writes, a dialog first gives the number of rows and lists the statements. + + + + + Import into Genre dialog from genres.csv with a comma delimiter, a header row, GenreId set to Skip and Name mapped to the Name field + Import into Genre dialog from genres.csv with a comma delimiter, a header row, GenreId set to Skip and Name mapped to the Name field + + +- The file must be UTF-8 and at most 64 MiB. +- A field a column cannot read keeps the dialog open, naming its line and column, before anything is written. +- Read only refuses the import. +- A failure names the lines of the statement that failed and says whether the table may hold any of the rows. On an engine without transactions, rows written before the failure can stay. + +## Export results + +Choose **Export results...** in the **File** menu, or press `Ctrl+Shift+E`. + + + Export results dialog with CSV selected among JSON, Excel, Markdown, HTML and XML + Export results dialog with CSV selected among JSON, Excel, Markdown, HTML and XML + + + + + CSV, JSON, Excel, Markdown, HTML, XML or **SQL INSERT**. From a table tab, SQL INSERT writes one statement per row for that table. From a query tab it writes into `query_results`, with the result's column names. + + + **Current page** writes the rows on screen. **Entire table** reads every row the filter and sort pick, however many pages they span. + + + A bar counts the rows as they are written, with **Cancel**. The file appears only once every row is written. A failed or cancelled export leaves no file behind. + + + +From a query tab, export writes the result shown, once its run has finished. CSV is the default; pick Excel for a spreadsheet, which holds up to 1,048,575 rows. + +## Move connections in a file + +**Export connections...** in the **File** menu, or **Export** on the Connections page, writes every saved connection to a `.json` connections file. Passwords are not in the file. + +**Import** on the Connections page, then **Import from file...**, reads that file back, as does **Import connections...** in the **File** menu. Each imported connection asks for its password the first time it connects. + +To copy one connection on this PC with its passwords, right-click it on the Connections page and choose **Duplicate**. + +## Import from another app + + + + Click **Import** on the Connections page and choose **Import from another app...**, or choose it in the **File** menu. + + + Each app shows what was found on this PC, or **Not found on this PC**. An app that keeps its connections only in an export file asks for that file; export it with its passwords. + + + **Import passwords** and **Import saved queries** say where the app keeps each, and are dimmed where Windows does not let TablePro read them or the app keeps none. + + + Check the connections to bring. A connection that matches one you have starts deselected and offers **Add as copy**, **Replace**, or **Keep existing, add queries**. Click **Import**. + + + + + Import review dialog with two checked connections, Orders on MySQL and Analytics on PostgreSQL, and 2 of 2 connections selected + Import review dialog with two checked connections, Orders on MySQL and Analytics on PostgreSQL, and 2 of 2 connections selected + + +Passwords come across from an app's own encrypted files, a password file it keeps, or a key it stores in Credential Manager. An app that keeps them in another app's protected store leaves them behind, and a bar says so. Saved queries come across where the app ties each one to a connection, as scripts or query consoles; those with a default name start deselected. Each row lists what changes on the way, such as an SSL mode TablePro words differently. The import writes once: the connections, their passwords into Credential Manager, then the saved queries. A connection whose password stayed behind asks for it when you connect. diff --git a/windows/install.mdx b/windows/install.mdx new file mode 100644 index 0000000..b07cb17 --- /dev/null +++ b/windows/install.mdx @@ -0,0 +1,128 @@ +--- +title: Install on Windows +description: Install TablePro for Windows from its App Installer file, winget or a release bundle, keep it updated, and remove it +--- + +One package covers Windows 10 version 1809 (build 17763) and later and Windows 11, on x64 and Arm64. Windows installs the build for its own processor. [Connect](/windows/connect#engines) lists the database engines, and [Not in the Windows app yet](#not-in-the-windows-app-yet) what the Mac app has that this one does not. + +## Install + +Pick the App Installer file unless you manage software with winget. It is the only way Windows updates TablePro on its own. + +### App Installer file + + + + Download [TablePro.appinstaller](https://updates.tablepro.app/windows/TablePro.appinstaller) from updates.tablepro.app. + + + Open the downloaded file and click **Install** in App Installer. It installs the newest release. + + + +Windows then checks that file for a newer release at most once a day when TablePro starts, and every 8 hours in the background. + +For betas, download [TablePro-Beta.appinstaller](https://updates.tablepro.app/windows/TablePro-Beta.appinstaller) instead. It installs the newest build of either channel. Windows does not check the beta file on its own: betas arrive through the app's [own check](#updates). + +### winget + +```powershell +winget install TablePro.TablePro +winget upgrade TablePro.TablePro +``` + +winget lists releases only, never betas, and updates on `winget upgrade`. + +### Release bundle + +Each release on [GitHub Releases](https://github.com/TableProApp/TablePro/releases) has a tag starting `windows-v`. Betas are marked as pre-releases. + +| File | Holds | +|---|---| +| `TablePro__x64_arm64.msixbundle` | The x64 and Arm64 packages, signed | +| `TablePro.appinstaller` or `TablePro-Beta.appinstaller` | The channel's App Installer file, the same as the one on updates.tablepro.app | +| `SHA256SUMS` | The SHA-256 of each file | + +The package version is the release's version with `.99` added, so 0.1.0 ships as `TablePro_0.1.0.99_x64_arm64.msixbundle`. A beta ends in its number instead: 0.2.0-beta.1 is `0.2.0.1`. Compare the hash with `SHA256SUMS`, then install: + +```powershell +Get-FileHash .\TablePro_0.1.0.99_x64_arm64.msixbundle -Algorithm SHA256 +Add-AppxPackage -Path .\TablePro_0.1.0.99_x64_arm64.msixbundle +``` + +Opening the bundle in Explorer installs it too. + +A bundle or winget install is tied to no App Installer file, so Windows never checks for it. The app's own check still finds updates on the channel Settings picks, and an update installed from the app ties the install to that channel's file. + +### Windows Server + +Windows Server has no App Installer. Install the bundle with `Add-AppxPackage`. The app still says when an update is out, but installing it from the app fails, so install each new bundle the same way. + +## Updates + +The app checks for updates when it starts, every 24 hours while it runs, and when you choose **Check for updates...** in the **Help** menu. Once an update is out, that item reads **Update available...** and a bar under the menu bar says **TablePro** and the version **is available**. + + + + Click **Install update...** in the bar or in **Settings > Software update**, then **Restart**. + + + Unsaved table changes, open transactions and running queries are asked about as they are when you exit. + + + No window shows while Windows downloads and installs the package. + + + + +TablePro starts on the new version with a bar saying it was updated, and **What's new** opens the release notes. + + +A failed install names the reason, and TablePro starts again on the version it had. + +**Update channel** in **Settings > Software update** picks **Stable** or **Beta**. Until you pick, it shows the channel of the file you installed from. Switching back to Stable keeps the beta you have until a newer release ships. + +Settings shows the version as `0.1.0`, or `0.2.0-beta.1` for a beta. Windows Settings shows the package version, which ends in `.99` for a release. + +## Where your data lives + +| What | Where | +|---|---| +| Connections, groups, favorites, saved queries, history, settings, open tabs | The data folder. **Open the data folder** under **Settings > About** opens it | +| Passwords, passphrases, the MCP token, AI keys, the account sign-in | Windows Credential Manager, as generic credentials named `TablePro/...` | + +The data folder is `%LOCALAPPDATA%\Packages\\LocalState`. + +## Uninstall + + +Uninstalling deletes the data folder: saved connections, groups, saved queries, query history and settings. Choose **Export connections...** in the **File** menu first to keep your connections. The file holds no passwords. + + +Remove TablePro under **Apps > Installed apps** in Windows Settings, or from PowerShell: + +```powershell +Get-AppxPackage -Name TablePro | Remove-AppxPackage +``` + +Credential Manager keeps TablePro's credentials after an uninstall. To remove them, open Credential Manager, choose **Windows Credentials**, and remove each generic credential whose name starts with `TablePro/`. + +## Not in the Windows app yet + +These have no Windows counterpart today. Use the Mac app for them, or SQL where it can do the job. + +| Area | Missing | +|---|---| +| Editor | Completion, the formatter, snippets | +| Structure | Creating or altering tables, indexes and keys, and ER diagrams. The structure view is read only | +| Import and export | Importing a SQL file, exporting a whole database. A CSV file into one table and rows out to a file both work: [Import and export](/windows/import-export) | +| Grid | Copying rows as CSV, JSON, Markdown or INSERT statements, find in the grid, undoing one pending edit, pasting rows | +| Workspace | Open Quickly, a connect timeout per connection | +| Catalog | Staging a truncate or drop until Save: each runs once you confirm it. Dropping views, materialized views and sequences. A database switcher on Redis | +| AI assistant | Inline suggestions, agent mode, saved conversations, providers beyond Anthropic, OpenAI and an Ollama or compatible server | +| MCP | Setting a client up from the app, pairing a client with `tablepro://integrations/pair` | +| Links | `tablepro://import`. A database URL that matches a saved connection opens the connection form, not the connection | +| Account | Billing, license keys, offline license files, paid features. See [TablePro account](/windows/account) | +| Engines | Driver plugins. The engines are the ones in [Connect](/windows/connect#engines) | +| Notifications | Saves, imports and exports. Only query runs notify | +| Language | Any language but English | diff --git a/windows/keyboard-shortcuts.mdx b/windows/keyboard-shortcuts.mdx new file mode 100644 index 0000000..2870ec4 --- /dev/null +++ b/windows/keyboard-shortcuts.mdx @@ -0,0 +1,85 @@ +--- +title: Keyboard shortcuts +description: Every key TablePro for Windows binds, by where the focus is +--- + +The menus show each command's key beside it, and `Alt` with a menu's underlined letter opens it. The keys are fixed; none can be rebound yet. + +Focus decides what some keys do. `F2` renames a query tab when the tab has focus, edits a cell in the grid, and renames a row on the Connections page. `Ctrl+S` saves pending row changes to the database from a table tab, or from a query tab whose editable result grid has focus; from the editor it saves the SQL file. + +## General + +| Action | Shortcut | +|---|---| +| New connection | `Ctrl+N` | +| Open a database or SQL file | `Ctrl+O` | +| Connections page | `Ctrl+Shift+H` | +| Show or hide the object tree | `Ctrl+B` | +| Filter objects | `Ctrl+P` | +| Switch database | `Ctrl+K` | +| Refresh the object tree | `F5` | +| Export results | `Ctrl+Shift+E` | +| Documentation | `F1` | + +## Tabs + +| Action | Shortcut | +|---|---| +| New query tab | `Ctrl+T` | +| Close the tab | `Ctrl+W` or `Ctrl+F4` | +| Reopen the last closed tab | `Ctrl+Shift+T` | +| Next tab, previous tab | `Ctrl+Tab`, `Ctrl+Shift+Tab` | +| Tab 1 to 8, the last tab | `Ctrl+1` to `Ctrl+8`, `Ctrl+9` | +| Rename the query tab | `F2` | + +## Query tab + +| Action | Shortcut | +|---|---| +| Run the selection, or the whole text | `Ctrl+Enter` | +| Run the statement at the cursor | `Ctrl+Shift+Enter` | +| Stop | `Shift+F5` | +| Save the file, save it as, from the editor | `Ctrl+S`, `Ctrl+Shift+S` | +| Find, Find and replace | `Ctrl+F`, `Ctrl+H` | +| Next match, previous match | `F3`, `Shift+F3` | +| Replace all, in the find bar | `Ctrl+Alt+Enter` | +| Close the find bar | `Escape` | +| Comment or uncomment lines | `Ctrl+/` | +| Fold, unfold | `Ctrl+Shift+[`, `Ctrl+Shift+]` | +| Move lines up or down | `Alt+Up`, `Alt+Down` | +| Copy lines up or down | `Shift+Alt+Up`, `Shift+Alt+Down` | +| Delete lines | `Ctrl+Shift+K` | +| Select the next match of the word | `Ctrl+D` | +| Add a cursor above or under | `Ctrl+Alt+Up`, `Ctrl+Alt+Down` | +| Zoom in, out, back | `Ctrl+=`, `Ctrl+-`, `Ctrl+0` | +| Undo, redo | `Ctrl+Z`, `Ctrl+Y` | + +In [Vim mode](/windows/sql-editor#vim-mode), Normal mode takes `Ctrl+A`, `Ctrl+B`, `Ctrl+D`, `Ctrl+F` and `Ctrl+P` for Vim's own commands. + +## Table tab + +| Action | Shortcut | +|---|---| +| Show or hide the filter bar | `Ctrl+Shift+F` | +| Apply the filter | `Enter` in a value box | +| Edit the focused cell | `F2`, `Enter` or a double-click | +| Keep the edit | `Enter`, or `Ctrl+Enter` in a value with line breaks | +| Keep it and move to the next or previous cell | `Tab`, `Shift+Tab` | +| Cancel the edit | `Escape` | +| Add a row | `Ctrl+Shift+N` | +| Duplicate the selected rows | `Ctrl+Shift+D` | +| Mark the selected rows for deletion | `Delete` | +| Save changes | `Ctrl+S` | +| Preview SQL | `Ctrl+Shift+P` | +| Move the column left or right | `Alt+Left`, `Alt+Right` | +| Copy the selected cells | `Ctrl+C` | + +## Connections page + +| Action | Shortcut | +|---|---| +| Connect | `Enter` | +| Rename | `F2` | +| Delete, after asking | `Delete` | +| New connection from a URL on the clipboard | `Ctrl+V` | +| Leave selection mode, or keep the old name while renaming | `Escape` | diff --git a/windows/links.mdx b/windows/links.mdx new file mode 100644 index 0000000..7a49174 --- /dev/null +++ b/windows/links.mdx @@ -0,0 +1,56 @@ +--- +title: Links and files +description: The files Explorer opens in TablePro for Windows, the database URLs it reads, and the tablepro:// links that open a connection, a table, a query or Settings +--- + +Windows hands TablePro every file type, URL scheme and `tablepro://` link on this page, from Explorer, a browser, another app or the [tablepro command](/windows/command-line#open-files-and-links). When TablePro is already running, the running app takes them. + +## Files + +| Extension | Opens | +|---|---| +| `.sql`, `.psql`, `.pgsql` | A query tab on the connection in front, without running. With none connected, it waits for the next connection | +| `.db`, `.db3`, `.s3db`, `.sl3`, `.sqlite`, `.sqlite3`, `.sqlitedb` | The file as a SQLite or DuckDB session, without saving a connection | +| `.duckdb`, `.ddb` | The same | + +The file's own header picks SQLite or DuckDB, whatever the extension. Choose TablePro under **Open with** in Explorer when another app owns the extension. + +## Database URLs + +| Engine | Schemes | +|---|---| +| PostgreSQL | `postgresql`, `postgres` | +| MySQL and MariaDB | `mysql`, `mariadb`, `mysqlx` | +| SQL Server | `sqlserver`, `mssql` | +| ClickHouse | `clickhouse`, `ch` | +| Cassandra and ScyllaDB | `cassandra`, `cql`, `scylla`, `scylladb` | +| Redis | `redis`, `rediss`, `valkey`, `valkeys` | +| MongoDB | `mongodb`, `mongodb+srv` | +| SQLite | `sqlite`, `sqlite3` | +| DuckDB | `duckdb` | + +A SQLite or DuckDB URL opens the file and saves nothing. Any other URL opens the connection form filled in, so nothing reaches a server before you look at it and click **Connect**. A `jdbc:` wrapper around one of these works from the command line only. + +## tablepro links + +| Link | Opens | +|---|---| +| `tablepro://connect/` | The saved connection, or brings it forward | +| `tablepro://connect//table/` | That table, once connected | +| `tablepro://connect//database//table/` | A table in another database or schema of the connection | +| `tablepro://connect//database//schema//table/` | A table in a named schema of another database | +| `tablepro://connect//query?sql=` | A query, after asking. The SQL is URL-encoded, up to 51,200 characters | +| `tablepro://settings` | Settings | +| `tablepro://share/...` | A [shared link's](/windows/browsing#share-a-result-or-query) SQL in a new query tab, without running | +| `tablepro://integrations/start-mcp` | Nothing on screen: it restarts the [MCP server](/windows/mcp#start-the-server-from-a-link) when its last start failed | + +`` is a saved connection's id: `tablepro connections` prints them. An id no connection has shows **Connection failed** and says so. + +A query link never runs anything. **Open query from link** shows the SQL and the connection, with **Cancel** as the default; **Open query** puts it in a new query tab, or brings forward a tab that already holds exactly that SQL. + + + Open query from link dialog over the Genre table, showing SELECT COUNT(*) FROM Genre; with Open query and Cancel + Open query from link dialog over the Genre table, showing SELECT COUNT(*) FROM Genre; with Open query and Cancel + + +A link TablePro cannot read opens nothing and says nothing, as on the Mac. `tablepro://import` and `tablepro://integrations/pair` open nothing yet. The Mac app's full grammar is in [URL scheme](/developers/url-scheme). diff --git a/windows/mcp.mdx b/windows/mcp.mdx new file mode 100644 index 0000000..3070e9b --- /dev/null +++ b/windows/mcp.mdx @@ -0,0 +1,75 @@ +--- +title: MCP server +description: Let AI clients on this computer query your saved connections through TablePro for Windows, with a token, a level per connection and your approval for every write +--- + +The server is off until you turn it on, and it runs only while TablePro is open. Clients reach the connections you have open in the app, through the same server the [tablepro command](/windows/command-line) uses. + +## Turn it on + + + + Under **Settings > MCP server**, turn on **Enable MCP server**. **Status** reads **Running on port** and the port. + + + Click **Copy address**. It is `http://127.0.0.1:23508/mcp` unless you change **Port**, which takes 1024 to 65535. + + + Click **Copy header**. The clipboard gets `Bearer` and the access token: the value of the `Authorization` header a client sends. + + + Add the server to the client's configuration as an HTTP server, with that address and header. + + + + + MCP server section of Settings with Enable MCP server on, the server running, its address on 127.0.0.1, Copy header, Regenerate token and a Command Line client + MCP server section of Settings with Enable MCP server on, the server running, its address on 127.0.0.1, Copy header, Regenerate token and a Command Line client + + +Many clients take a JSON entry of this shape: + +```json +{ + "mcpServers": { + "tablepro": { + "url": "http://127.0.0.1:23508/mcp", + "headers": { "Authorization": "Bearer " } + } + } +} +``` + +The token is kept in Windows Credential Manager and never shown on screen, so a screenshot of Settings never carries it. **Regenerate token...** replaces it after asking; clients holding the old one are refused until you give them the new header. + +**Clients** lists each client that connected since the server started, with its version and when it last connected. + +## Who can connect + +The server listens on 127.0.0.1 only, and answers a client only when its process runs as your Windows user. A client started as administrator while TablePro is not can be refused. + +A port another program holds says so under **Status**: choose another port, or click **Try again** once it is free. + +## External clients + +Each connection's **External clients** option, under **Options** in its form, sets what clients may do there. + +| Level | Clients | +|---|---| +| **Blocked** | Do not see the connection | +| **Read only**, the default | Read the schema and the data. Every write is refused | +| **Read and write** | Can also write. Each statement waits for your approval | + +A connection opened from a file without saving it is never offered to clients. + +When a client asks to open a closed connection, TablePro opens it as **Connect** does. A connection that fails to open is brought forward, and the client is told. + +## Approve a write + +Under **Read and write**, a client's write brings its connection's window forward and asks **Run statement from MCP client?**, with the full statement. **Cancel** is the default; **Run** sends it. The question comes down unanswered if the client goes away. + +The question shows whatever the Safe Mode level, and Safe Mode's **Read only** still refuses the write. A client's statements are kept in the query history under the same rules as your own. + +## Start the server from a link + +`tablepro://integrations/start-mcp` starts the server again when **Enable MCP server** is on and its last start failed. It shows nothing and leaves the window where it is. A server that is running keeps its clients, and one that is off stays off. diff --git a/windows/settings.mdx b/windows/settings.mdx new file mode 100644 index 0000000..f05fcbd --- /dev/null +++ b/windows/settings.mdx @@ -0,0 +1,110 @@ +--- +title: Settings +description: Every setting in TablePro for Windows, with its default and its choices +--- + +Choose **Settings** in the **File** menu, or click **Settings** on the Connections page or at the bottom of the rail. A change applies as you make it; there is no Save. `tablepro://settings` opens the page too. + + + Settings page with Sign in under Account, App theme, Reopen the previous session on, and the Editor's font size 14, Default (Cascadia Mono) font and Vim mode off + Settings page with Sign in under Account, App theme, Reopen the previous session on, and the Editor's font size 14, Default (Cascadia Mono) font and Vim mode off + + +## Account + +Sign in, check your plan and manage your devices: see [TablePro account](/windows/account). + +## Appearance and startup + +| Setting | Default | Choices | +|---|---|---| +| App theme | Use system setting | Light, Dark, Use system setting | +| Reopen the previous session | On | On, Off | + +**Reopen the previous session** brings back the connections and tabs you had, and connects only the one in front. A Windows contrast theme keeps its own colors, and connection colors are not applied. + +## Editor + +| Setting | Default | Choices | +|---|---|---| +| Font size | 14 | 8 to 36 | +| Font | Cascadia Mono | The monospaced fonts installed | +| Word wrap | Off | On, Off | +| Highlight current statement | On | On, Off | +| Code folding | On | On, Off | +| Vim mode | Off | On, Off | +| Light color scheme, Dark color scheme | Default | The Mac app's built-in editor themes | + +**Highlight current statement** shades the statement **Run statement at cursor** runs. [Edit](/windows/sql-editor#edit) covers folding and [Vim mode](/windows/sql-editor#vim-mode) the Vim keys. + +## Data grid + +| Setting | Default | Choices | +|---|---|---| +| Font | Segoe UI | The fonts installed | +| Font size | 14 | 8 to 36 | +| NULL display | `NULL` | Up to 20 characters | + +The fonts and the NULL text reach open editors and grids at once. + +## Queries and pagination + +| Setting | Default | Choices | +|---|---|---| +| Row limit | 10,000 | 1 to 1,000,000 rows each result keeps | +| Results kept per run | No limit | 10, 20, 50, 100, 200, 500 or 1,000 of the newest | +| Query timeout | 0 | 0 to 86,400 seconds. 0 leaves it to the connection | +| Default page size | 1,000 | 100, 500, 1,000, 5,000, 10,000 | +| Count rows if estimate less than | 100,000 | 1,000; 10,000; 100,000; 1,000,000; Always count | + +A connection's own **Query timeout** in its [Options](/windows/connect#options) takes the place of this one. [Count a large table](/windows/data-grid#count-a-large-table) explains the count threshold. + +## Query history + +| Setting | Default | Choices | +|---|---|---| +| Keep runs for | 90 days | 7, 30, 90 or 180 days, 1 year, Forever | +| Maximum runs | 10,000 | 100, 500, 1,000, 5,000, 10,000, Unlimited | + +Pinned runs are never removed by either limit. **Clear history...** removes every connection's runs, pinned ones too, after asking. + +## Notifications + +| Setting | Default | Choices | +|---|---|---| +| Notify when long-running work finishes | On | On, Off | +| Only after | 20 seconds | 5, 10, 20 or 30 seconds, or 1, 2, 5 or 10 minutes | + +Keep **Only after** below the query timeout, or a query that would notify is stopped first. [Notifications](/windows/sql-editor#notifications) says when one shows. + +## AI assistant + +| Setting | Default | Choices | +|---|---|---| +| Provider | Off | Anthropic, OpenAI, Ollama or compatible server | +| Server address | `http://localhost:11434/v1` | An http or https address with its version path, for a compatible server | +| API key | None | Kept in Credential Manager with **Save key**, removed with **Remove key** | +| Model | `claude-opus-5-5` for Anthropic, none for the others | Any model id; open the list to read the provider's models | + +A key goes over plain http only to this computer. [AI assistant](/windows/sql-editor#ai-assistant) covers the pane. + +## MCP server + +| Setting | Default | Choices | +|---|---|---| +| Enable MCP server | Off | On, Off | +| Port | 23508 | 1024 to 65535, on 127.0.0.1 | + +**Address**, **Authorization header**, **Regenerate token...** and **Clients** are in [MCP server](/windows/mcp). + +## Software update + +| Setting | Default | Choices | +|---|---|---| +| Update channel | The channel you installed from | Stable, Beta | + +The section shows the version, when TablePro last checked, and **Check now** or **Install update...**. **What's new in this version** opens the release notes. A build not installed from its package says it does not check. [Updates](/windows/install#updates) covers the rest. + +## About + +The version, **Documentation**, **Report an issue**, and **Open the data folder**, which opens the folder [Where your data lives](/windows/install#where-your-data-lives) describes. diff --git a/windows/sql-editor.mdx b/windows/sql-editor.mdx new file mode 100644 index 0000000..70de736 --- /dev/null +++ b/windows/sql-editor.mdx @@ -0,0 +1,130 @@ +--- +title: SQL editor +description: Run statements and scripts, read results and server messages, handle transactions, edit with find, folding and Vim mode, keep queries, and ask the AI assistant in TablePro for Windows +--- + +`Ctrl+T` opens a query tab on the connection in front. Each query tab runs on a connection of its own, opened at its first run, so a transaction in one tab never reaches another. + + + Query tab holding two SELECT statements on one line, the second highlighted, and a result grid with column b and the value 2 + Query tab holding two SELECT statements on one line, the second highlighted, and a result grid with column b and the value 2 + + +## Run + +| To run | Press | Or choose in **Query** | +|---|---|---| +| The selection, or the whole text | `Ctrl+Enter` | **Run** | +| The statement at the cursor | `Ctrl+Shift+Enter` | **Run statement at cursor** | +| Stop the run | `Shift+F5` | **Stop** | + +**Run statement at cursor** runs the statement the cursor is in, or the last one before it, and selects it so you see what ran. **Highlight current statement** in Settings shades that statement while you type. + +Safe Mode reads each statement before anything is sent. When it asks, the dialog lists every statement in full, with **Cancel** as the default. Under **Read only**, a run that holds any write is refused whole. + +A statement stops after the query timeout: the connection's own, or **Settings > Queries > Query timeout**, where 0 leaves it to the connection. + +## Results + +The grid shows the first rows as soon as they arrive. A run that returns several result sets lists them in a picker over the grid, such as **Result 2 (50)**; a `+` after the count means the row limit cut that set short. Each result keeps up to **Settings > Queries > Row limit** rows, 10,000 by default, and [Keep fewer results from a script](/windows/browsing#keep-fewer-results-from-a-script) caps how many sets a run keeps. + +Click a column header to sort. A single statement that reads runs again with that `ORDER BY`, so the sort covers every row, not only those loaded. For a script, a write, `SHOW` or `EXPLAIN`, the rows already held are sorted, and the status says so. + +When the server prints notices, such as PostgreSQL's `RAISE NOTICE`, **Messages** appears beside **Results** with one line per notice. A run with no rows opens on Messages. + +**Data** and **JSON** at the bottom of the pane switch the result between the grid and JSON; see [Data grid](/windows/data-grid#read-rows-as-json). A result from one table with its primary key can be edited in place: [Edit a query result](/windows/data-grid#edit-a-query-result). + +A failed statement shows the server's message in an error bar. When the server says where it failed, **Go to Error** puts the cursor there. With the AI assistant set up, **Fix with AI** sends the statement and the error. + +## Transactions + +A statement that leaves a transaction open shows **Transaction open** over the tab's results, with **Commit** and **Roll back**. Roll back asks first. Other tabs show a bar naming the tab that holds one, with **Show**. + +Closing that tab, disconnecting or exiting asks first, since each rolls the transaction back. If the connection drops, its transaction is gone: the tab says so, and the next run opens a new connection. + +## Edit + +| To | Press | +|---|---| +| Find, Find and replace | `Ctrl+F`, `Ctrl+H` | +| Next match, previous match | `F3`, `Shift+F3` | +| Replace all | `Ctrl+Alt+Enter` in the find bar | +| Comment or uncomment lines | `Ctrl+/` | +| Fold, unfold | `Ctrl+Shift+[`, `Ctrl+Shift+]` | +| Move lines up or down | `Alt+Up`, `Alt+Down` | +| Copy lines up or down | `Shift+Alt+Up`, `Shift+Alt+Down` | +| Delete lines | `Ctrl+Shift+K` | +| Select the next match of the word | `Ctrl+D` | +| Add a cursor above or under | `Ctrl+Alt+Up`, `Ctrl+Alt+Down` | +| Zoom in, out, back | `Ctrl+=`, `Ctrl+-`, `Ctrl+0` | + +The find bar has **Match case**, **Match whole word** and **Use regular expression**. Folding works on statements, brackets, `BEGIN` blocks and block comments, from the chevrons in the line number gutter; turn it off with **Code folding** in Settings. + +### Vim mode + +Turn on **Vim mode** under **Settings > Editor**. A badge on the query bar shows the mode: NORMAL, INSERT, VISUAL, VISUAL LINE or REPLACE. Motions, operators, counts, registers, marks, macros and text objects work as in Vim, and a closed fold counts as one line. `:w` runs the query and `:q` closes the tab. + +In Normal mode, `Ctrl+A`, `Ctrl+B`, `Ctrl+D`, `Ctrl+F` and `Ctrl+P` are Vim's commands. Reach **Select all**, **Find**, **Object tree** and **Filter objects** from the **Edit** and **View** menus instead. In Insert mode, `Ctrl+W` deletes a word and `Ctrl+T` indents; they do not close or open a tab. + +Visual block mode, `:s` and `:{line}` are not there, as on the Mac. + +## Tabs + +| To | Do this | +|---|---| +| Rename a query tab | Press `F2` on the tab, or double-click it | +| Reopen the last closed tab | `Ctrl+Shift+T`. Each connection keeps its last 20 | +| Go to a tab | `Ctrl+1` to `Ctrl+8`, `Ctrl+9` for the last | +| Give a tab its own window | Drag it out of the strip, or choose **Move tab to new window** in the **File** menu | + +A tab moved to its own window keeps its session: its transaction and results come with it, and it can be dragged back into any window of the same connection. + +On an engine with several databases, each query tab names its database in its command bar. Pick another there to run in it; the pick waits while the tab runs or holds a transaction. A `USE` typed in the tab moves it too. + +## SQL files + +`Ctrl+O` opens a `.sql`, `.psql` or `.pgsql` file in a query tab of the connection in front, and **Open recent** in the **File** menu lists the last 10. Dropping a file on the editor opens it the same way. With no connection open, the file waits for the next one to connect. + +The tab is named for the file, with a dot while the text differs from it. With the editor in focus, `Ctrl+S` saves the file and `Ctrl+Shift+S` saves it under another name. With an editable result's grid in focus, `Ctrl+S` saves the row changes to the database instead. A file another program changed shows a bar with **Reload**; a save over that change asks to **Overwrite** or **Reload from disk**. + +The file keeps its encoding: its byte order mark, else UTF-8, else Latin-1. A save that would lose a character the encoding cannot store leaves the file untouched; **Save as...** writes UTF-8. + +## Saved queries + +Choose **Save query...** in the **Query** menu to keep the tab's text under a name, in a folder once you have folders. From the history, a run's menu has **Save query...** too. + +**Show saved queries** in the **View** menu opens them beside the tabs, where the history pane sits. Double-click a query to insert it: it replaces an empty query tab's text, follows the tab's text after a blank line, or opens a new tab. Its menu has **Insert in editor**, **Open in new tab**, **Copy query**, **Edit...**, **Move to** and **Delete**. + +Saved queries belong to a saved connection. A file opened without saving keeps none, and deleting a connection deletes its saved queries. + +[Find a past query](/windows/browsing#find-a-past-query) covers the query history. + +## Redis and MongoDB + +On a Redis connection the editor takes Redis commands. On MongoDB it takes mongosh statements such as `db.orders.find()`. A Redis key opens in a key tab from the object tree, with its type, length and expiry over its entries; **Load more** reads the next 500. + +## AI assistant + + + + Under **Settings > AI assistant**, choose **Anthropic**, **OpenAI** or **Ollama or compatible server**. Nothing is sent anywhere while the provider is **Off**, which is where it starts. + + + Paste the API key and click **Save key**. It goes to Credential Manager and is never shown again. A server on this computer usually needs none. + + + Open **Model** to list the provider's models, or type a model id. + + + +**Show AI assistant** in the **View** menu opens a chat beside the tabs. A conversation sends your questions, the structure of the tables involved, and the text of the query tab in front, up to its first 8,000 characters. It never reads rows, but the editor's text can hold values you typed into it. `Enter` sends and `Shift+Enter` starts a new line. A code block in a reply has **Copy** and **Insert in editor**. + +**Review with AI**, **Explain with AI** and **Optimize with AI**, in the **Query** menu and the editor's menu, send the selection or the statement at the cursor. + +The connection's **AI assistant** option decides what may be sent. Under **Ask each time**, the first request names the provider and host the data goes to, and your answer lasts until the connection disconnects. **Never** turns the assistant off for that connection. + +## Notifications + +A query that runs longer than **Settings > Notifications > Only after**, 20 seconds by default, posts a Windows notification when it ends somewhere you are not looking: another app in front, the window minimized, or another tab showing. Click it to go to the tab. A failure says only that it failed; the message stays in the tab. + +When Windows notifications are off for TablePro, the taskbar button flashes instead, and Settings links to Windows' notification settings.