Features
SQL Snippets
Reusable SQL templates with autocomplete trigger support
SQL Snippets
Snippets are reusable SQL templates that save you from typing common patterns repeatedly.
Built-In Snippets
data-peek ships with snippets for common SQL operations:
| Category | Examples |
|---|---|
| SELECT | Basic select, select with join, select distinct |
| INSERT | Single insert, bulk insert |
| UPDATE | Simple update, conditional update |
| DELETE | Delete with condition |
| DDL | Create table, alter table, create index |
| Aggregates | Group by, having, window functions |
| Joins | Inner join, left join, full outer join |
Using Snippets
From the Snippets Dialog
- Open Snippets from the sidebar or command palette
- Browse or search for a snippet
- Click Insert to paste into the active editor, or Copy to clipboard
From Autocomplete
Custom snippets can define a trigger prefix. Type the prefix in the editor and select the snippet from autocomplete suggestions.
Custom Snippets
Creating a Snippet
- Open the Snippets dialog
- Click New Snippet
- Enter:
- Name - Descriptive label
- Category - For organization
- Trigger - Optional prefix for autocomplete (e.g.
seltriggers a SELECT template) - SQL - The snippet body
Editing and Deleting
Custom snippets can be edited or deleted from the Snippets dialog. Built-in snippets are read-only.
Use snippets with placeholder values like table_name or column_name that you replace after inserting.