Releases: hymkor/sqlbless
Releases · hymkor/sqlbless
v0.27.4
Changes in v0.27.4 (English)
editstatement: Restore row deletion commands (dd,dr):
Fixed a keybinding conflict that rendered row deletion unavailable. Thedkey has been unassigned from the "Set Null" function to restore theddanddrcommands, following specification changes in Csvi. Field Null assignment remains available via thexkey. (#35)editstatement: Prevent creation of empty lines at the end of the editable CSV content. (csvi#79)- (internal changes) Stop using deprecated fields:
csvi.KeyEventArgs.CursorRowandCursorCol(csvi#80,#38) editstatement: Quit immediately onqwithout a prompt if there are no changes.(csvi#81,#39)
Changes in v0.27.4 (Japanese)
edit文: 行削除コマンド(dd,dr)の復旧
レコードの削除操作(dd,dr)を再び利用可能にした。以前のバージョンでは、Null設定機能をdキーにも割り当てていたため、Csvi側の仕様変更(Dの廃止)に伴い、行削除が実行できない状態になっていた。今回、dへのNull設定機能を解除することでこの競合を解消した。※Null設定機能は、引き続きxキーで利用可能。 (#35)edit文: 編集対象の CSV データ末尾に空行が生成されないようにした。(csvi#79)- (内部修正) 廃止予定のフィールド
csvi.KeyEventArgs.CursorRowとCursorCol使わないようにした (csvi#80,#38) edit文: 変更がない場合はqで確認なしに終了するようにした。(csvi#81,#39)
v0.27.3
Changes in v0.27.3 (English)
- Improved single-key input handling so that control key escape sequences (e.g. the Up Arrow
\x1B[A) are not misinterpreted even when they are split by terminal behavior. As part of this change, theEsckey is now always treated as a prefix key. The following internal dependencies were updated: (#29,#30)- Csvi v1.20.1 → v1.21.1
- go-multiline-ny v0.22.3 →v0.22.4
- go-readline-ny v1.13.0 → v1.14.1
- go-ttyadapter v0.2.0 → v0.3.0
edit: RemovedcandEsc. Useqto exit the editor, whether applying changes or not. (#32)
Changes in v0.27.3 (Japanese)
v0.27.2
Changes in v0.27.2 (English)
- Update github.com/hymkor/csvi from v1.19.1 to v1.20.1 (#27)
- Use
(*csvi.Application) MessageAndGetKeyinstead of removed(*csvi.Application) YesNo - Fix display overflow caused by halfwidth kana with voiced/semi-voiced sound marks
- Fix a CPU spinning issue after data fetching completed
- Use
Changes in v0.27.2 (Japanese)
- Update github.com/hymkor/csvi from v1.19.1 to v1.20.1 (#27)
- 廃止された
(*csvi.Application) YesNoのかわりに、(*csvi.Application) MessageAndGetKeyを使うようにした - 半角カナの濁音・半濁音記号が含まれていると表示桁数が超過して表示が乱れる問題を修正
- データ読み込みが終わると、CPU が空回りになる問題に対処
- 廃止された
v0.27.1
Changes in v0.27.1 (English)
- Update go-multiline-ny from 0.22.1 to v0.22.3
- Fixed incorrect cursor position handling in syntax highlighting when editing multiple lines. The cursor offset is now correctly adjusted to account for the prefixed lines.
- Update go-readline-ny from v1.12.3 to v1.13.0
- Fix: completion: cursor moved to the start of the previous word when the current word is empty
- Made input prediction case-insensitive.
- Update github.com/hymkor/csvi from v1.15.1 to v1.19.1 (#26)
- Truncate text that exceeds the cell width and append U+2026 (ellipsis).
- Display
*in the status line when there are unsaved changes - Implement page up/down
- Assign
ggas an additional keybinding for moving to the first row.
- Fix incorrect SQL for querying temporary tables in SQLite3 (#24)
Changes in v0.27.1 (Japanese)
- Update go-multiline-ny from 0.22.1 to v0.22.3
- シンタックスハイライトで扱われるカーソル位置が不正確だった問題を修正。
カーソル位置は前行までのバイト数分を加味して正しく調整されるようになった。
- シンタックスハイライトで扱われるカーソル位置が不正確だった問題を修正。
- Update go-readline-ny from v1.12.3 to v1.13.0
- 補完で、現在の単語が空の場合にカーソルが前の単語の先頭に移動してしまう不具合を修正
- 入力予測機能で英大文字・小文字を区別しないようにした
- Update github.com/hymkor/csvi from v1.15.1 to v1.19.1 (#26)
- テキストがセル幅を超える場合、末尾を U+2026(…)で省略表示するようにした
- 変更がある場合、ステータスラインに
*を表示 - ページ単位の移動(PgDn,PgUp)を実装
ggに先頭レコードへの移動を設定
- SQLite3 のテーブル一覧取得時における、一時テーブルの誤った参照方法を修正 (#24)
v0.27.0
Changes in v0.27.0 (English)
Bug fixes
- Fix: Errors were not reported during execution of
SAVEPOINTandSAVE TRANSACTION. (#19) - SQL Server: Fixed an issue where
ROLLBACK TRANSACTIONwithout a savepoint was not recognized as ending the transaction, causing the prompt to remain asSQL*. (#22)
Specification Changes
- Enable
RELEASE SAVEPOINT(#19),REPLACE INTO(#20,MySQL) andSET(#21) to execute within a transaction.
Changes in v0.27.0 (Japanese)
不具合修正
SAVEPOINT,SAVE TRANSACTIONの実行中にエラーが発生してもメッセージが表示されなかった問題を修正 (#19)- SQL Server: SAVEPOINT を指定しない
ROLLBACK TRANSACTIONでトランザクションは終了するのに、それを認識せず、プロンプトがトランザクション中を意味するSQL*のままになっていた問題を修正 (#22)
仕様変更
v0.26.0
Changes in v0.26.0 (English)
Bug fixes
- Fix: completion — cursor moved to the start of the previous word when the current word was empty (#15, go-readline-ny #17)
- Fix: an issue where pressing
Enteron the result of thedesccommand (table list) did not show the column (desc TABLE) for the selected table on databases other than SQLite3. (#16) - Fix issue where
editcould not launch due to MySQL identifier quoting
Specification changes
- Support
SAVEPOINTas a TCL command (#11) - Support
SAVE TRANSACTIONas a TCL command (#14) - Support
ROLLBACK TO(orROLLBACK TRANSACTION) as a TCL command (#11) - Require
;afterROLLBACKto prevent accidental execution (#11) - Script execution improvements (#12):
- Fix: correct handling of
io.EOF - Suppress output of empty lines and leading/trailing spaces
- Fix:
CSVIlaunched bySELECTin a script now terminates automatically with>,q, andy
- Fix: correct handling of
Internal changes
- Refactor
dialectsubpackage: renamed fields and methods for clarity (#8) - Switched terminal input API calls to use
go-ttyadapterv0.2.0 (#9)
Changes in v0.26.0 (Japanese)
不具合修正
- 補完で、現在の単語が空の場合にカーソルが前の単語の先頭に移動してしまう不具合を修正 (#15,go-readline-ny v1.12.3 #17)
- SQLite3 以外のデータベースで、引数なしのdesc コマンド(テーブル一覧)の中から
Enterを押下して、該当行のテーブルのカラム一覧を表示できなかった不具合を修正 (#16) - MySQL で識別子の引用符が原因で
editコマンドが起動できなかった問題を修正
仕様変更
SAVEPOINTを TCL コマンドとしてサポート (#11)SAVE TRANSACTIONを TCL コマンドとしてサポート (#14)ROLLBACK TO(もしくはROLLBACK TRANSACTION)を TCL コマンドとしてサポート (#11)- 誤操作防止のため、
ROLLBACKには;を必須とした (#11) - スクリプト実行時の修正 (#12)
io.EOFが誤ってエラーとして扱われていた問題を修正した- SQL のログ出力で、空行や行頭・行末の空白が出力されないようにした
SELECTで起動したCSVIは、>,q,yの操作で自動的に終了するようにした
内部修正
v0.25.0
Changes in v0.25.0 (English)
Bug fixes
hostandstart: Fixed a panic in filename completion when the last token was an empty string.
(#4, go-readline-ny#10, Fixed in go-readline-ny v1.21.1 )
Specification changes
- Pressing
rin thedesccommand without a table name now launches theeditcommand for the table under the cursor. - Pressing
Enterin thedesccommand without a table name now launchesdesccommand for the table under the cursor. - Running
editwithout arguments now opens a table selection mode. - The Oracle
MERGEstatement is now treated as a DML command. COMMITandROLLBACKcan now be executed without a semicolon (;).- Added support for the
NO_COLORenvironment variable to disable colored output. (#6)
Internal changes
- Updated internal dependencies (go-multiline-ny v0.22.1, go-box v3) (#4)
- Use context from completion.CmdCompletionOrList.CandidatesContext instead of context.TODO() (#5)
- Rewrote the SQLite3 test written in PowerShell 7 using Go’s standard
go testframework to enable testing on Linux and GitHub Actions. (#7)
Changes in v0.25.0 (Japanese)
不具合修正
host文,start文: 最後のトークンが空文字列のときにファイル名補完で panic が発生する問題を修正
(#4, go-readline-ny#10, go-readline-ny v1.21.1 にて修正)
仕様変更
- テーブル名指定なしの
descコマンド中にrを押下すると、edit (カーソル行のテーブル名)を起動するようにした - テーブル名指定なしの
descコマンド中にEnterを押下すると、desc (カーソル行のテーブル名)を起動するようにした - 引数なしで
editコマンドが起動された時、カーソルでテーブルを選択するモードを起動するようにした。 - Oracle の
MERGE文も DML 扱いするようにした。 COMMITやROLLBACKもセミコロンなしで実行できる1行コマンドとした。- カラー出力を抑制する環境変数の
NO_COLORをサポート (#6)
内部的な変更
v0.24.0
Changes in v0.24.0 (English)
- Fixed an issue in the
editcommand where table names containing spaces were incorrectly expanded in SQL statements. - Changed SQLite3 placeholders from
?to bind variables in the$v%dformat. - In interactive mode, SQL-Bless now prevents exiting (
Ctrl-D,exit,quit) while a transaction is open, showing:transaction is not closed. Please Commit or Rollback.This check is skipped during script execution. - Modified Ctrl-C behavior during command-line editing. Instead of terminating SQL-Bless, it now cancels (discards) the SQL statement currently being edited.
- Enabled record-style display for SQLite3
PRAGMAcommands, similar toSELECTandDESC. - Enabled syntax highlighting for the
HOSTcommand and filename completion afterHOST.
Changes in v0.24.0 (Japanese)
edit文において、行追加・更新時の SQL 上で、空白を含んだテーブル名がおかしい展開をされていた問題を修正- SQLite3 でプレースホルダーとして
$v%d形式のバインド変数を使うようにした - 対話モードでトランザクションが未完了の状態で
Ctrl-D、exit、quitによって終了しようとした場合、transaction is not closed. Please Commit or Rollbackと表示して終了を防止するようにした。 このチェックはスクリプト実行時には行われない。 - コマンドライン編集中の
Ctrl-Cで SQL-Bless が終了してしまっていたが、現在入力中の SQL の破棄するだけに変更した。 - SQLite3 の
PRAGMAコマンドでも、SELECTやDESCと同様にレコードを表示できるようにした。 - OSコマンドを実行する
HOSTに対してシンタックスハイライトを適用。また、HOST以降でファイル名補完が聞くようにした
v0.23.0
Changes in v0.23.0 (English)
- For non-DML SQL,
"database/sql".Connis now used instead of"database/sql".DB- This ensures the same connection is used continuously, avoiding potential issues caused by using different connections for consecutive SQL statements
- Users can no longer use
BEGINstatements- Transactions are automatically started internally, and using
BEGINcould cause inconsistencies
- Transactions are automatically started internally, and using
- Behavior of DDL execution within transactions has been improved
- Previously, all DDL was disallowed within transactions; now the database-specific rules determine which statements can run
- PostgreSQL: All statements are allowed except
VACUUM,REINDEX,CLUSTER,CREATE/DROP DATABASE,CREATE/DROP TABLESPACE - SQLite3: All statements are allowed except
VACUUM
- Update csvi package to v1.15.0 + snapshot:
- Added key bindings
]and[to adjust the width of the current column (widen and narrow, respectively). - Added
-rvoption to prevent unnatural colors on terminals with a white background - At startup, the width of ambiguous-width Unicode characters was being measured, but on terminals that do not support the cursor position query sequence
ESC[6n, this could cause a hang followed by an error. To address this:- If
ESC[6nis not supported, the program now continues without aborting. - Skipped the measurement of ambiguous-width Unicode characters when the environment variable
RUNEWIDTH_EASTASIANis defined.
- If
- Suppress color output if the
NO_COLORenvironment variable is set (following https://no-color.org/ ) - When the environment variable
COLORFGBGis defined in the form(FG);(BG)and(FG)is less than(BG), the program now uses color settings designed for light backgrounds (equivalent to-rv).
- Added key bindings
Changes in v0.23.0 (Japanese)
- DML 以外の SQL について、
"database/sql".DBの代わりに"database/sql".Connを使用するようにした- 前後の SQL で別の接続が使われることで発生しうるトラブルを防ぐため、同一接続を継続使用するように変更
- BEGIN 文をユーザが使用できないようにした
- トランザクションは内部で自動開始されるため、BEGIN を使うと不整合が起こる可能性がある
- トランザクション中の DDL 実行に関する挙動を改善
- 従来は一律不可としていたが、データベースごとに実行可能な文を判定するように変更
- PostgreSQL:
VACUUM,REINDEX,CLUSTER,CREATE/DROP DATABASE,CREATE/DROP TABLESPACE以外はトランザクション内で実行可能 - SQLite3:
VACUUM以外はトランザクション内で実行可能
- CSVI を v1.15.0 + snapshot へ更新:
- カーソル列の幅を広げる
]と、縮める[を実装 - 白背景の端末でも色が不自然にならないよう、
-rvオプションを追加 - 起動時に曖昧幅の Unicode 文字の表示幅を計測していたが、カーソル位置を取得するシーケンス
ESC[6nをサポートしない端末では、入力待ちのままエラー終了してしまう問題があった。そのため:ESC[6nが無効な場合でもエラーとせず、編集を継続できるようにした。- 環境変数
RUNEWIDTH_EASTASIANが定義されていたら、曖昧幅の Unicode 文字の幅計測を省くようにした。
- 環境変数
NO_COLORが定義されている場合、カラー表示を抑制するようにした ( https://no-color.org/ に準拠 ) - 環境変数
COLORFGBGが(FG);(BG)形式で定義されており、(FG) が (BG) より小さい整数の時、白背景を想定した色使いをするようにした (-rvと等価)
- カーソル列の幅を広げる
v0.22.0
Changes in v0.22.0 (English)
- On the
editcommand:- Unified the exit operation to the
ESCkeyESC+y: Apply changes and exitESC+n: Discard changes and exitc: Still supported but deprecatedq: Now equivalent toESC
- Changed the brackets around the table name display from
【】to[] - Added options to apply all (
a) or discard all (N) when applying changes - Adjusted confirmation SQL output to reduce line usage: SET clause, WHERE clause, and parameter list are now shown on a single line each
- Unified the exit operation to the
- Modified the existing CRLF mode to avoid using golang.org/x/text/transform.
Changes in v0.22.0 (Japanese)
editコマンド- 終了操作を
ESCキーに一本化したESC+y: 変更を適用して終了ESC+n: 変更を破棄して終了c: まだ利用可能だが、廃止予定q:ESCと等価
- テーブル名表示を囲む括弧の種類を 【】から [] に変更
- 変更適用時の選択肢に、全てを適用する
a、全て破棄するNを追加した - 確認用の SQL が行数をとりすぎるので、SET句、WHERE句、引数リストはそれぞれ一行におさめるようにした
- 終了操作を
- CRLF モードの実装で、golang.org/x/text/transform を使用しないようにした