Skip to content

Commit ab97b84

Browse files
committed
Version 2.0.0
1 parent 4658c08 commit ab97b84

5 files changed

Lines changed: 84 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ In AWS, a `c5a.xlarge` instance running Windows Server 2022 will do.
5252
## How to release a new version
5353

5454
- Check for new updates to NuGet packages.
55+
- Write release notes in `project/finished`.
5556
- Bump `AssemblyFileVersion` and `AssemblyCopyright` in `src\SqlNotebook\Properties\AssemblyInfo.cs`.
5657
- Bump `ProductVersion` in `src\SqlNotebook.wxs`.
5758
- Add a news entry in `web\index.html`.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
### 🔄 FOREACH Loop Statement
2+
Iterate through table rows with automatic variable assignment:
3+
```sql
4+
FOREACH (@id, @name, @email) IN customers
5+
BEGIN
6+
PRINT CONCAT('Customer: ', @name, ' (', @email, ')');
7+
END
8+
```
9+
- Variables are automatically declared and assigned values from each row
10+
- Supports BREAK and CONTINUE statements like other loops
11+
- Works with tables, views, and subqueries
12+
13+
### 💻 Command-Line Interface
14+
Execute SQL Notebook scripts from the command line without opening the GUI:
15+
```bash
16+
SqlNotebookCmd "MyNotebook.sqlnb" "MyScript"
17+
```
18+
- Perfect for automation, batch processing, and CI/CD pipelines
19+
- Outputs results in CSV format
20+
- Returns appropriate exit codes for success/failure
21+
22+
### 📝 Dynamic Script Management
23+
Create and delete scripts programmatically:
24+
```sql
25+
-- Create a new script
26+
CREATE SCRIPT DataCleanup AS '
27+
DELETE FROM temp_table WHERE processed = 1;
28+
PRINT ''Cleanup completed'';
29+
';
30+
31+
-- Execute the script
32+
EXECUTE DataCleanup;
33+
34+
-- Remove the script when no longer needed
35+
DROP SCRIPT DataCleanup;
36+
```
37+
- `CREATE SCRIPT` to add new scripts dynamically
38+
- `DROP SCRIPT` and `DROP PAGE` to remove scripts and pages
39+
- Useful for generating reports, temporary procedures, and workflow automation
40+
41+
### 💾 Save Command
42+
Save your notebook programmatically from within scripts:
43+
```sql
44+
-- Save to current file
45+
SAVE;
46+
47+
-- Save to a specific file
48+
SAVE 'MyBackup.sqlnb';
49+
```
50+
- Particularly useful in SqlNotebookCmd for persisting changes
51+
- Must be used outside of transactions (use "None (auto-commit)" mode in GUI)
52+
53+
### 🦆 DuckDB Integration
54+
Import data from DuckDB files with full UI support:
55+
- Drag and drop `.duckdb` files directly into SQL Notebook
56+
- Available in Import menu → "From file..."
57+
- Support for both copying data and live database connections
58+
```sql
59+
-- Copy data from DuckDB
60+
IMPORT DATABASE 'duckdb'
61+
CONNECTION 'Data Source=C:\data\analytics.duckdb'
62+
TABLE sales_data;
63+
64+
-- Create live connection
65+
IMPORT DATABASE 'duckdb'
66+
CONNECTION 'Data Source=C:\data\analytics.duckdb'
67+
TABLE sales_data
68+
OPTIONS (LINK: 1);
69+
```
70+
71+
### 🗄️ Enhanced SQLite Support
72+
Expanded SQLite file compatibility:
73+
- Open SQLite databases (`.db`, `.sqlite`, `.sqlite3`) directly via File → Open
74+
- Import SQLite tables using the same interface as other databases
75+
- Seamless integration with your existing SQLite workflows

src/SqlNotebook.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<?define ProductVersion = "1.2.3"?>
2+
<?define ProductVersion = "2.0.0"?>
33
<?define ProductUpgradeCode = "1E7BF0C5-FEDF-4702-A504-6E32A7C86BA4"?>
44
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
55
<Product

src/SqlNotebook/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
[assembly: AssemblyVersion("1.0.0.0")]
3636

3737
// this is Application.ProductVersion
38-
[assembly: AssemblyFileVersion("1.2.3")]
38+
[assembly: AssemblyFileVersion("2.0.0")]

web/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ <h1>Open source app for casual data exploration in SQL</h1>
2222
<hr width="100%" size="2">
2323
<h2>News</h2>
2424
<ul>
25+
<li><b>2025-06-09</b> - Version 2.0.0 is released. This major release adds a <code>FOREACH</code> loop statement
26+
for iterating through table rows, a command-line interface (<code>SqlNotebookCmd</code>) for automation, dynamic
27+
script management with <code>CREATE SCRIPT</code> and <code>DROP SCRIPT</code>, programmatic saving with the
28+
<code>SAVE</code> command, and DuckDB import support. Enhanced SQLite compatibility now allows opening
29+
<code>.db</code>, <code>.sqlite</code>, and <code>.sqlite3</code> files directly. Now includes
30+
<a moz-do-not-send="true" href="https://sqlite.org/releaselog/3_50_1.html">SQLite 3.50.1</a>.<br></li>
2531
<li><b>2024-06-18</b> - Version 1.2.3 is released. Arm64-based computers are now supported. <a moz-do-not-send=
2632
"true" href="https://sqlite.org/releaselog/3_46_0.html">SQLite 3.46.0</a> includes minor bug fixes and adds the
2733
ability to use underscores in numeric literals, like 1_999.<br></li>

0 commit comments

Comments
 (0)