README.md

May 29, 2026 · View on GitHub

EasyDB

EasyDB Logo

A lightweight desktop data query tool that uses SQL to query local files directly, with a built-in query engine

License: MIT Release Platform Stars Total Downloads

English | 中文


Introduction

EasyDB is a lightweight desktop data query tool built with Rust and Tauri, featuring a built-in Apache DataFusion query engine. No need to install a database or any other dependencies — just use SQL to query local files directly.

It treats files as database tables, supporting CSV, TSV, Text, NdJson, Excel, Parquet, MySQL, and PostgreSQL as data sources. It supports complex multi-table JOINs, subqueries, window functions, and other advanced SQL features. It effortlessly handles data files from hundreds of MB to multiple GB with minimal hardware resources.

demo.gif

Core Features

  • High Performance — Built on Rust and DataFusion, effortlessly handles large files
  • Low Memory Usage — Runs with minimal hardware resources
  • Multi-format Support — CSV, TSV, Text, NdJson, Excel, Parquet, MySQL, PostgreSQL
  • Ready to Use — No file conversion needed, query directly
  • Cross-platform — Supports macOS and Windows
  • Full SQL Support — Multi-table JOINs, subqueries, window functions, regex matching, and more
  • Smart Editor — SQL syntax highlighting, autocomplete (function names + column names), formatting
  • Drag & Drop SQL Generation — Drag files into the editor to auto-generate query statements
  • Internationalization — Supports Simplified Chinese and English, auto-detects browser language
  • Virtual Scrolling & Pagination — Smooth rendering for large datasets with scroll-to-load
  • Result Export — Export to CSV, TSV, or SQL (INSERT/UPDATE), with MySQL or PostgreSQL dialect options
  • Query History — Automatically records the last 50 queries with execution status
  • Modern Interface — Native desktop app built with Tauri v2 + HeroUI

Changelog

See CHANGELOG_EN.md

Features & Roadmap

File Reader Functions

  • read_csv() — Read CSV files with custom delimiter, header, and schema inference options
  • read_tsv() — Read TSV files
  • read_text() — Read text files with custom delimiter
  • read_json() — Read JSON files (temporarily removed in v2.0, planned for reimplementation)
  • read_excel() / read_xlsx() — Read Excel files with worksheet selection
  • read_parquet() — Read Parquet columnar storage files
  • read_ndjson() — Read NDJSON files
  • read_mysql() — Read MySQL database tables
  • read_postgres() — Read PostgreSQL database tables

Scalar Functions

  • REGEXP_LIKE() — Regular expression matching

Editor & Interaction

  • Drag & drop file auto-generate SQL (option to insert full SQL or just read_xxx() function)
  • SQL smart autocomplete (function names, parameter names, result column names)
  • Execute selected SQL fragment
  • SQL formatting and clearing

Data Export

  • Export query results to CSV / TSV / SQL
  • SQL export supports INSERT and UPDATE statements
  • SQL export supports MySQL and PostgreSQL dialects
  • Query history recording

Planned

  • Excel lazy loading performance optimization
  • Excel enhanced data type compatibility
  • Multi-session window support
  • Directory browsing
  • S3 remote file support
  • Direct querying of server files
  • Data visualization

Technical Architecture

Core Tech Stack

LayerTechnology
FrontendReact 18 + TypeScript + Vite
BackendRust + Tauri v2
Query EngineApache DataFusion 50.3
UI FrameworkHeroUI + Tailwind CSS
Virtual Scroll@tanstack/react-virtual + @tanstack/react-table
SQL EditorAce Editor (react-ace)
SQL Parsingsqlparser-rs (Rust) + node-sql-parser (JS)
i18nLightweight custom i18n, zh-CN / en-US
History StorageSQLite (rusqlite)

Query Engine Selection

Currently Using: Apache DataFusion

DataFusion is part of the Apache Arrow project, providing complete SQL query capabilities and supporting complex SQL syntax including multi-table JOINs, subqueries, window functions, and other advanced features. Compared to Polars, DataFusion offers more comprehensive SQL compatibility.

Version Evolution: v1.0 previously used the Polars engine, which excelled in stream processing and memory usage but had limitations in complex SQL support. v2.0 switched back to DataFusion for more complete SQL support while maintaining good performance and resource efficiency.

User Guide

Basic Syntax

-- Query CSV files
SELECT *
FROM read_csv('/path/to/file.csv', infer_schema => false)
WHERE "age" > 30
LIMIT 10;

-- Query TSV files
SELECT *
FROM read_tsv('/path/to/file.tsv');

-- Query text files (custom delimiter)
SELECT *
FROM read_text('/path/to/file.txt', delimiter => '\t');

-- Query Excel files (specific worksheet)
SELECT *
FROM read_excel('/path/to/file.xlsx', sheet_name => 'Sheet2')
WHERE "age" > 30;

-- Query NDJSON files
SELECT *
FROM read_ndjson('/path/to/file.json')
WHERE "status" = 'active';

-- Query Parquet files
SELECT *
FROM read_parquet('/path/to/file.parquet');

-- Query MySQL database
SELECT *
FROM read_mysql('users', conn => 'mysql://user:password@localhost:3306/mydb')
WHERE "age" > 30;

-- Query PostgreSQL database
SELECT *
FROM read_postgres('users', host => 'localhost', username => 'postgres', db => 'mydb', pass => 'password')
WHERE "age" > 30;

-- Cross-source join (Excel + MySQL)
SELECT *
FROM read_excel('/path/to/file.xlsx', sheet_name => 'Sheet1') AS t1
INNER JOIN
read_mysql('users', conn => 'mysql://user:password@localhost:3306/mydb') AS t2
ON t1."user_id" = t2."id"
WHERE t1."age" > 30;

-- Regex matching
SELECT *
FROM read_csv('/path/to/file.csv')
WHERE REGEXP_LIKE("Distance", '^([0-9]+)\.([0-9]+)?$');

Supported Data Sources

FormatFunctionDescription
CSVread_csv()Custom delimiter, header, schema inference
TSVread_tsv()Tab-separated files
Textread_text()General text files with custom delimiter
Excelread_excel() / read_xlsx().xlsx support, optional worksheet
NdJsonread_ndjson()One JSON object per line
Parquetread_parquet()Columnar storage format
MySQLread_mysql()Direct MySQL database table connection
PostgreSQLread_postgres()Direct PostgreSQL database table connection

Function Parameters

read_csv() parameters
ParameterTypeDefaultDescription
infer_schemabooleantrueAuto-infer data types (based on first 100 rows)
has_headerbooleantrueWhether the file contains a header row
delimiterstring,Field delimiter, supports escape sequences like \t, \n
file_extensionstring.csvFile extension
read_excel() parameters
ParameterTypeDefaultDescription
sheet_namestringFirst sheetName of the worksheet to read
infer_schemabooleantrueAuto-infer data types
read_mysql() parameters
ParameterTypeDefaultDescription
connstringRequiredMySQL connection string, e.g. mysql://user:password@host:port/database
read_postgres() parameters
ParameterTypeDefaultDescription
hoststringRequiredPostgreSQL server host
usernamestringRequiredPostgreSQL username
dbstringRequiredPostgreSQL database name
passstringOptionalPostgreSQL password
portstring5432PostgreSQL port number
sslmodestringdisableSSL mode
read_text() parameters
ParameterTypeDefaultDescription
infer_schemabooleantrueAuto-infer data types
has_headerbooleantrueWhether the file contains a header row
delimiterstring\tField delimiter
file_extensionstring.txtFile extension

Quick Start

System Requirements

  • macOS: 10.15+ (Catalina or higher)
  • Windows: Windows 10 or higher
  • Memory: 4 GB or more recommended
  • Storage: At least 100 MB available space

Installation

  1. Visit the Releases page and download the installer for your system
  2. macOS: Download the .dmg file, drag to Applications folder
  3. Windows: Download the .exe file, run the installer

FAQ

macOS "Application is damaged and cannot be opened"

This is caused by macOS Gatekeeper blocking unsigned applications. Run the following command in Terminal:

xattr -r -d com.apple.quarantine /Applications/EasyDB.app

If this doesn't work, go to System Preferences > Security & Privacy > General and click "Open Anyway".

SQL Syntax Notes

Field names should be wrapped in double quotes:

SELECT "id", "name" FROM table WHERE "id" = 1;

Backticks also work:

SELECT `id`, `name` FROM table WHERE `id` = 1;

String values in WHERE clauses use single quotes:

SELECT * FROM table WHERE "id" = '1';

Non-standard File Extensions

For files without CSV, XLSX, JSON, or Parquet extensions, EasyDB automatically uses the read_text() function.

Project Background

From Server to App

EasyDB Server is primarily deployed on Linux servers as a web service for efficient querying of large-scale text files. Although Docker deployment is available, the local experience on macOS and Windows is not as convenient.

EasyDB App is specifically optimized for macOS and Windows to improve the local user experience.

Project Naming

  • EasyDB Server — Server-side version, based on DataFusion
  • EasyDB App — Desktop client version, based on DataFusion (v2.0+)

Contributing

Contributions are welcome in all forms!

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Environment

# Clone repository
git clone https://github.com/shencangsheng/easydb_app.git
cd easydb_app

# Install frontend dependencies
yarn

# Start development server
cargo tauri dev

# Build application
cargo tauri build

Prerequisites

  • Rust 1.89+
  • Node.js 18+
  • Yarn

License

MIT License © Cangsheng Shen

Author

Cangsheng Shen

Acknowledgments

Thanks to the following open source projects:

Contributors

Contact


If this project helps you, please give us a Star

Made with ❤️ by Cangsheng Shen