Commit Graph

11901 Commits

Author SHA1 Message Date
chrislu
586a795b02 return fast on error 2025-09-02 14:09:38 -07:00
chrislu
1a2225c0f5 rename to "weed db" 2025-09-02 11:02:08 -07:00
chrislu
c9e093194d setup integration test for postgres 2025-09-02 10:51:37 -07:00
chrislu
8b4914be55 hook up seaweed sql engine 2025-09-02 08:42:36 -07:00
chrislu
5a8c31fcda Revert "add jdbc"
This reverts commit a6e48b7690.
2025-09-02 08:25:39 -07:00
chrislu
85306bb2b0 add postgres protocol 2025-09-02 08:25:29 -07:00
chrislu
a6e48b7690 add jdbc 2025-09-02 06:56:49 -07:00
chrislu
6fb88a8edb buffer start stored as 8 bytes 2025-09-02 00:57:48 -07:00
chrislu
61bacd23b0 parquet file can query messages in broker memory, if log files do not exist 2025-09-02 00:49:12 -07:00
chrislu
618cb89885 the parquet file should also remember the first buffer_start attribute from the sources 2025-09-02 00:42:37 -07:00
chrislu
db75742e37 explain with broker buffer 2025-09-02 00:35:52 -07:00
chrislu
de866bfd09 dedup with buffer start index 2025-09-02 00:26:35 -07:00
chrislu
e3a56d7c30 filter out already flushed messages 2025-09-02 00:10:07 -07:00
chrislu
467034c8c7 process buffer from brokers 2025-09-01 23:45:52 -07:00
chrislu
7ca3b59c44 save source buffer index start for log files 2025-09-01 23:33:35 -07:00
chrislu
f5ed25f755 fix decoding data 2025-09-01 22:17:17 -07:00
chrislu
99bfe95e51 detailed logs during explain. Fix bugs on reading live logs. 2025-09-01 22:16:46 -07:00
chrislu
c7a0b89067 fix after refactoring 2025-09-01 21:40:24 -07:00
chrislu
e385f0ce7d refactor 2025-09-01 20:19:59 -07:00
chrislu
61ad3c39ac add tests 2025-09-01 20:05:24 -07:00
chrislu
4214d765cf use mock for testing 2025-09-01 19:36:47 -07:00
chrislu
a3f6a5da27 skip 2025-09-01 18:55:14 -07:00
chrislu
dfd0897e49 improve tests 2025-09-01 18:52:22 -07:00
chrislu
7d88a81482 add tests 2025-09-01 18:00:55 -07:00
chrislu
eaa7136c92 explain the execution plan 2025-09-01 17:19:36 -07:00
chrislu
93a09f5da4 explain 2025-09-01 16:47:52 -07:00
chrislu
55cad6dc4a combine parquet results with live logs 2025-09-01 16:26:35 -07:00
chrislu
352fad7172 truncate topic 2025-09-01 16:12:20 -07:00
chrislu
e3798c2ec9 sql 2025-09-01 16:12:10 -07:00
chrislu
2fbceca959 fmt 2025-09-01 15:40:09 -07:00
chrislu
55dfb97fc8 parquet file generation remember the sources also 2025-09-01 15:11:06 -07:00
chrislu
2fa8991a52 scan all files 2025-09-01 14:51:23 -07:00
chrislu
ada704ad80 parquet file generate stats 2025-09-01 13:55:57 -07:00
chrislu
c7598d89f1 remove emoji 2025-09-01 13:55:44 -07:00
chrislu
c73ceac79f use parquet statistics for optimization 2025-09-01 13:50:56 -07:00
chrislu
471ba271dc fix reading system fields 2025-09-01 13:28:38 -07:00
chrislu
8498240460 fmt 2025-09-01 13:09:44 -07:00
chrislu
8645f3a264 column name case insensitive, better auto column names 2025-09-01 11:25:04 -07:00
chrislu
32e73811f2 support aggregation functions 2025-09-01 11:15:00 -07:00
chrislu
cbf1bfd333 remove emoji 2025-09-01 11:05:23 -07:00
chrislu
cf9ad26608 scan topic messages 2025-09-01 10:50:01 -07:00
chrislu
762eeca8d4 Update .gitignore 2025-09-01 08:56:39 -07:00
chrislu
ac8e6c8c82 actual column types 2025-09-01 08:56:27 -07:00
chrislu
49c0f74a1f Update describe.go 2025-09-01 08:31:58 -07:00
chrislu
3e54e7356c show tables works 2025-09-01 01:25:54 -07:00
chrislu
aa883472a5 show databases works 2025-09-01 01:08:11 -07:00
chrislu
675ec42fad integer conversion 2025-08-31 23:22:20 -07:00
chrislu
ec7efe0652 fmt 2025-08-31 23:16:34 -07:00
chrislu
6e35019238 Delete test_utils_test.go 2025-08-31 23:10:54 -07:00
chrislu
0679e5d38b feat: Enhanced SQL CLI Experience
 COMPLETE ENHANCED CLI IMPLEMENTATION:

🚀 **Multiple Execution Modes:**
- Interactive shell with enhanced prompts and context
- Single query execution: --query 'SQL' --output format
- Batch file processing: --file queries.sql --output csv
- Database context switching: --database dbname

📊 **Multi-Format Output:**
- Table format (ASCII) - default for interactive
- JSON format - structured data for programmatic use
- CSV format - spreadsheet-friendly output
- Smart auto-detection based on execution mode

⚙️ **Enhanced Interactive Shell:**
- Database context switching: USE database_name;
- Output format switching: \format table|json|csv
- Command history tracking (basic implementation)
- Enhanced help with WHERE operator examples
- Contextual prompts: seaweedfs:dbname>

🛠️ **Production Features:**
- Comprehensive error handling (JSON + user-friendly)
- Query execution timing and performance metrics
- 30-second timeout protection with graceful handling
- Real MQ integration with hybrid data scanning

📖 **Complete CLI Interface:**
- Full flag support: --server, --interactive, --file, --output, --database, --query
- Auto-detection of execution mode and output format
- Structured help system with practical examples
- Batch processing with multi-query file support

💡 **Advanced WHERE Integration:**
All extended operators (<=, >=, !=, LIKE, IN) fully supported
across all execution modes and output formats.

🎯 **Usage Examples:**
- weed sql --interactive
- weed sql --query 'SHOW DATABASES' --output json
- weed sql --file queries.sql --output csv
- weed sql --database analytics --interactive

Enhanced CLI experience complete - production ready! 🚀
2025-08-31 23:10:50 -07:00