- Fix clippy warnings in test code by adding #[allow(dead_code)] - Move all unit tests from source files to tests/ directory - Add integration tests for SQL parsing and schema operations - Create examples directory with 5 SQL query examples - Add Windows CI job to ci.yml for cross-platform coverage - Update Cargo.toml with documentation and readme fields - Add comprehensive clean room audit documentation All 39 tests passing, clippy clean, formatting verified
920 B
920 B
Example SQL Queries
This directory contains example SQL queries for common Notion database operations.
Available Examples
- select_basic.md - Basic SELECT queries with filtering and ordering
- insert_record.md - INSERT records into a database
- update_records.md - UPDATE multiple records with WHERE clauses
- delete_records.md - DELETE records safely
- aggregate_functions.md - COUNT(*), AVG, SUM, MIN, MAX with GROUP BY
Running Examples
Each example file contains a runnable command. For example:
notion-sql query --database-id YOUR_DATABASE_ID --sql "SELECT Name, Status FROM Tasks WHERE Status = 'Active';"
Prerequisites
- Set your NOTION_TOKEN environment variable
- Get your database ID from Notion URL (after
/v1/) - Run with
--executeflag to actually modify data (default is dry-run mode)
Help
notion-sql --help
notion-sql query --help