Skip to main content

SQL Console Release v0.3.0

·361 words·2 mins·
PolloChang
Author
PolloChang
Senior Information Engineer & System Administrator
  • GitHub Repository: sql-console
  • Development Guide: Check out DEVELOP.md in the repo root.
  • AI Agent Skill for sql-console: sql-operator

Hello everyone, SQL Console v0.3.0 is officially released! 🎉

In this update, we have significantly enhanced our support for Oracle databases and upgraded the overall system security:

  1. New Oracle-specific commands: You can now use desc to view table structures and show parameter to query system parameters directly, seamlessly aligning with your daily operational habits!
  2. Strict security enhancements: We introduced a whitelist-based validation mechanism to effectively intercept illegal inputs (SEC-403) and thoroughly defend against potential SQL Injection risks, strengthening security compliance in terminal environments.
  3. Architectural refactoring: We implemented a new Stateless Translator pattern, fully adhering to SOLID (SRP/OCP) principles. By separating the SQL translation logic from the execution logic, we’ve built a solid foundation for future extensions.

This is an open-source tool designed specifically for SREs/DBAs who need to maintain multiple databases (PostgreSQL, Oracle, MSSQL, etc.) in the Terminal. Connected via JDBC, it saves you from frequently switching between different environments!

Check out the detailed release notes and documentation here: https://github.com/PolloChang/sql-console/releases/tag/v0.3.0

Feel free to download it, try it out, and share your feedback!

v0.3.0
#

  • Feature: Support Oracle Database special commands (show parameter and desc/describe).
  • Security: Implement whitelist validation input regex to defend against SQL Injection in client commands.
  • SOLID: Refactor ClientCommandProcessor to a pure stateless translator pattern and clean up execution engine logic.

Feather Preview: Oracle Database Special Commands
#

Show Parameters
#

1
testdb> show parameter sga_target;

Output:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
testdb> show parameter sga_target;
sql_id: 8f255f9d , transaction: auto-commit
result fetch size: 20
page: 1/1, total rows: 1
┌────────────┬──────┬────────────┬────────────────────┐
│    NAME    │ TYPE │   VALUE    │    DESCRIPTION     │
├────────────┼──────┼────────────┼────────────────────┤
│ sga_target │ 6    │ 8589934592 │ Target size of SGA │
└────────────┴──────┴────────────┴────────────────────┘

(1 rows affected, 24ms)

DescRIBE command
#

1
testdb> desc dual
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
testdb> desc dual
sql_id: 54e09cab , transaction: auto-commit
result fetch size: 20
page: 1/1, total rows: 1
┌───────┬────────┬─────────────┐
│ NAME  │ NULL ? │    TYPE     │
├───────┼────────┼─────────────┤
│ DUMMY │ NULL   │ VARCHAR2(1) │
└───────┴────────┴─────────────┘

(1 rows affected, 226ms)