Releases: fakhrulnugroho/pgrs
Releases · fakhrulnugroho/pgrs
Release list
v0.9.0
What's Changed
🚀 New Features
\edit/\e: buka editor multiline reedline khusus untuk menulis/mengedit SQL panjang, jalankan otomatis saat submit- REPL line history kini persisten per-koneksi (
~/.pgrs/history-<koneksi>), ditulis setelah setiap perintah — bertahan lintas restart/crash \history <n>: jumlah riwayat terbaru kini bisa dikonfigurasi- Mode expanded
\xkini melipat nilai panjang ke lebar terminal - Parsing argumen quote-aware untuk
\save/\run/\unsave— nama dengan spasi bisa dikutip
🐛 Bug Fixes
- Deteksi statement selesai di REPL kini melewati komentar SQL dan dollar-quote, sehingga tidak salah membaca apostrof/
;di dalamnya
Changed
- Perintah
\-prefixed yang tidak dikenal kini menampilkan pesan error, bukan diteruskan ke Postgres - Konfirmasi keluar kini via reedline — Ctrl-C/Ctrl-D keluar bersih
- Pesan usage backslash-command diseragamkan
Full Changelog: v0.8.0...v0.9.0
v0.8.0
What's Changed
🚀 New Features
- Saved queries — simpan & putar ulang SQL favorit per-koneksi:
\save <nama> <id>,\saved,\run <nama>,\unsave <nama>(persisten di~/.pgrs/pgrs.db) \explain/\explain+— render plan EXPLAIN sebagai pohon ASCII;\explain+menambahANALYZE- Auto pager — output panjang dialirkan ke
$PAGER(fallbackless -SR) saat melebihi tinggi terminal; toggle via\pager - REPL transaction-aware — alias
\begin/\commit/\rollback, indikator status transaksi di prompt, dan konfirmasi-rollback saat keluar dengan transaksi terbuka
🔁 Changed
- DML transaction guard —
INSERT/UPDATE/DELETEditolak di REPL kecuali ada transaksi terbuka (jalankanBEGINdulu);connect/psqltidak terpengaruh
Full Changelog: v0.7.0...v0.8.0
v0.7.0
What's Changed
⚠️ Breaking (internal):pgrsis now a Cargo workspace split into two crates —pgrs-core(logic) andpgrs-cli(thepgrsbinary). The CLI behavior is unchanged; this only affects anyone consuming the code as a library.
🚀 New Features
- Postgres query errors kini menampilkan SQLSTATE code, detail/hint, dan penanda caret (^) pada posisi error — pesan error jauh lebih informatif
🐛 Bug Fixes
\stats <table>tidak lagi kosong — penggunaan kolom nyata kini direkam dengan benar- Path data dir yang bukan UTF-8 kini memunculkan error eksplisit (tidak lagi fallback diam-diam)
🧹 Internal / Refactoring
- Kode dipecah menjadi workspace
pgrs-core+pgrs-clidengan boundary hexagonal yang ditegakkan compiler pg_cataloglookups & klasifikasi SQL (DDL/DML) dipindah ke core- Error port diseragamkan ke
DomainError; service membubble-up error alih-aliheprintln! - DI analytics/schema dipindah ke composition root
Full Changelog: v0.6.0...v0.7.0
v0.6.0
What's Changed
🚀 New Features
- Tab-completion suggestions kini diurutkan berdasarkan frekuensi akses — kolom/tabel yang sering digunakan muncul lebih dulu
- Completion kolom kini menyarankan tiga bentuk:
kolom,tabel.kolom, danalias.kolom
🐛 Bug Fixes
- Completion kolom kini muncul setelah
SELECTmeski belum ada klausaFROM
🔧 Internal Refactors
- SQL parsing diganti dengan crate
sqlparser— lebih robust untuk query kompleks - Alias & tokenizer dipindah ke
core/query(keluar dari repl adapter) CompletionServicedipecah menjadi query dan command concerns- ID koneksi diganti dari UUID ke SQLite autoincrement
Replstruct danCommandHandlerdiperkenalkan untuk konsistensi dengan pola CLI- CLI dipecah per handler,
ConnectionSvctrait diinjeksi keCli - Berbagai service refactor untuk konsistensi trait (
AnalyticsSvc,SchemaSvc)
Full Changelog: v0.5.0...v0.6.0
v0.5.0
What's Changed
🚀 New Features
\exportcommand: export hasil query ke file CSV dari dalam REPL, dengan dukungan quoted paths dan tilde expansion (~/file.csv)- SQLite backend: koneksi kini disimpan di
~/.pgrs/pgrs.db(SQLite), menggantikanconnections.json - Analytics:
\historymenampilkan riwayat query dengan ID dan timestamp lokal;\statsmenampilkan tabel dan query yang paling sering digunakan - Schema caching: skema tabel/kolom di-cache di SQLite untuk performa tab-completion yang lebih cepat
DomainErrorenum: error handling end-to-end diganti dariStringke typed enumDomainError- UUID v4 sebagai generator ID koneksi (menggantikan
DefaultHasher)
🐛 Bug Fixes
\export: blokir DDL dalam export, cleanup file parsial jika write gagal\export: tampilkan usage jika diketik tanpa argumen- CSV quoting: handle
\rdengan benar - SQLite: tambahkan
ROLLBACKpada errorsave_schema, transaction direcord_query - Install script: deteksi OS dan arsitektur dengan benar untuk binary yang sesuai
- UUID: ganti
DefaultHasherdengan UUID v4 untuk ID yang lebih aman
♻️ Refactors
- Pemisahan arsitektur heksagonal: repository, service, dan port traits dipecah ke modul yang lebih fokus (analytics, schema, connection)
- REPL commands dipecah ke modul terpisah (
commands.rs,ui.rs,csv.rs,sql_utils.rs)
Full Changelog: v0.4.1...v0.5.0
v0.4.1
What's Changed
🐛 Bug Fixes
- Replace
/dev/urandomwith cross-platform ID generation for Windows compatibility - Gate Unix-only APIs behind
#[cfg(unix)]to fix Windows builds
🔧 CI / Maintenance
- Vendor OpenSSL to fix builds on Linux runners
- Expand CI matrix to multi-platform builds (Linux, macOS, Windows)
- Remove needless return statement flagged by clippy
Full Changelog: v0.4.0...v0.4.1
v0.4.0
What's Changed
🚀 New Features
Connection IDs
- Setiap koneksi sekarang mendapat ID hex 8-karakter saat ditambahkan
- Semua perintah (
connect,shell,delete, dll.) kini menerima ID atau nama - Kolom ID ditampilkan di output
list - Alias baru:
ls(list),del/rm(delete)
Environment Labels
- Tambahkan label environment opsional ke koneksi via
--env - Kolom ENV tampil di
list, label muncul di prompt REPL
REPL: Describe Table (\d / \d+)
\d <table>menampilkan kolom, tipe, nullability, dan default\d+ <table>menampilkan juga indeks, foreign key, check constraint, dan trigger- Tab-completion nama tabel setelah
\ddan\d+
REPL: List Databases (\l)
- Perintah
\lmenampilkan semua database di server
🐛 Bug Fixes
- Decode karakter percent-encoded di kredensial URL koneksi
- Pesan error kini menggunakan nama koneksi yang sudah di-resolve (bukan alias)
- Semicolon di dalam identifier double-quoted tidak lagi mengakhiri statement
- Tolak nama tabel kosong pada perintah describe
⚙️ Improvements
- Multi-platform CI release builds dengan version injection
- Refactor REPL: tokenizer, alias resolver, dan schema port dipisah menjadi modul terstruktur
- Teks bantuan (
--help) distrukturkan sebagai data array untuk kemudahan pemeliharaan
Full Changelog: v0.3.0...v0.4.0
v0.3.0
What's Changed
🚀 New Features
- REPL table rendering: minimal style dengan truncation, expanded record view (
\x), middle-truncate untuk sel panjang - REPL backslash commands:
\dt(list tables),\x(toggle expanded),\refresh(reload schema),\q(quit); DDL auto-refresh setelah CREATE/DROP/ALTER - Ghost text completion: SqlHinter dengan common-prefix suggestion saat mengetik
- Context-aware JOIN ON completion: kolom yang ada di kedua tabel diprioritaskan
- Alias-aware completion: resolusi alias FROM/JOIN/subquery di dot-completion dan column completion
- CLI UX improvements: perbaikan help text, dukungan TLS modes per koneksi, pengalaman REPL/connect yang lebih baik
🐛 Bug Fixes
- Prefix matching pada SqlHinter untuk ghost text yang akurat
- Char-safe indexing di hint suffix computation
- Perbaikan needless borrow dan allocation di completer
♻️ Refactoring
- Hapus normalize_val yang redundan di expanded renderer
Full Changelog: v0.2.0...v0.3.0
v0.2.2
Improvements
Autocomplete
- Tab now accepts the highlighted suggestion when the completion dropdown is open
Colorized Output
- t and f (PostgreSQL short boolean format) are now recognized and colored the same as true and false
Internals
- Refactored Postgres query column extraction and REPL for cleaner code structure
v0.2.1
Improvements
Autocomplete
- Tab now accepts the highlighted suggestion when the completion dropdown is open
Colorized Output
- t and f (PostgreSQL short boolean format) are now recognized and colored the same as true and false
Internals
- Refactored Postgres query column extraction and REPL for cleaner code structure