| Crates.io | sql2viz |
| lib.rs | sql2viz |
| version | 0.2.0 |
| created_at | 2025-10-18 07:11:24.449451+00 |
| updated_at | 2025-11-03 02:42:42.584095+00 |
| description | Transform SQL queries into beautiful visualizations with DuckDB and Iced |
| homepage | |
| repository | https://github.com/nkwork9999/sql2viz |
| max_upload_size | |
| id | 1888904 |
| size | 2,023,082 |
Transform Raw SQL queries into visualizations using DuckDB and Iced.
[dependencies]
sql2viz = { version = "0.1", features = ["gui"] }
use sql2viz::vizcreate;
fn main() {
let query = "SELECT 'A' as x, 10 as y UNION ALL SELECT 'B', 20";
vizcreate(query.to_string()).unwrap();
}
use sql2viz::vizcreate;
fn main() {
let queries = "
-- Connect to existing database
ATTACH 'mydata.db' AS mydb;
-- Query 1: Sales summary by category
SELECT category, SUM(amount) as total_sales
FROM mydb.sales
GROUP BY category
ORDER BY total_sales DESC;
-- Query 2: Load CSV file
SELECT * FROM 'test.csv' LIMIT 100;
";
vizcreate(queries.to_string()).unwrap();
}



MIT OR Apache-2.0