Releases: hymkor/sqlbless
Releases · hymkor/sqlbless
v0.17.0
Changes in v0.17.0 (English)
- Update the dependency of go-multiline-ny to v0.18.4 and go-readline-ny to v1.7.1
- When prefix key(
Esc
) is pressed, echo it asEsc-
- Assign
Esc
→Enter
to submit
- When prefix key(
- Modified so that a transaction does not start when an error occurs.
- Applied colors to input SQL, such as cyan for reserved words and magenta for strings.
Changes in v0.17.0 (Japanese)
v0.16.0
- Show the prompt as
SQL*
instead ofSQL>
during a transaction. - Erase continuation prompts after submiting so that copied prompt does not get in the way
- edit: display SQL and usage on the header
- Update go-readline-ny to v1.6.2
- line-based predictive input support based on history
- Fix: on Linux desktop, the second or later lines were missing when pasting multi-lines using the terminal feature
- Update go-multiline-ny to v0.17.0
- Implement the incremental search (Ctrl-R)
- Fix: on the legacy terminal of Windows, cursor does not move to the upper line
- Fix: on the terminal of Linux desktop, backspace-key could not remove the line feed
- Fix: when editing the longer lines than screen height, the number of the lines scrolling was one line short
- トランザクション中はプロンプトを
SQL>
ではなくSQL*
とするようにした - コピペの邪魔にならないよう、入力後、継続プロンプトを削除するようにした
- edit文: ヘッダに SQL と説明を表示するようにした
- go-readline-ny を v1.6.2 へ更新
- 履歴を元にした行単位の予想入力のサポート
- Linux デスクトップのターミナルで、複数行を貼り付けた時、二行目以降が欠ける不具合を修正
- go-multiline-ny を v0.17.0 へ更新
- インクリメンタルサーチ実装 (Ctrl-R)
- Windows の旧ターミナルで、カーソルが上に移動しない問題を修正
- Linux デスクトップのターミナルで、Backspace キーで改行を削除できない不具合を修正(Ctrl-H は可能)
- 画面行数を越える長い行の編集時、スクロール行数がおかしくなる不具合を修正
v0.15.2
v0.15.1
v0.15.0
- With the support for windows/386 in modernc.org/sqlite v1.31.0, the SQLite3 driver has been consolidated to github.com/glebarez/go-sqlite. PureGo implementation is now enabled for all architectures.
- modernc.org/sqlite v1.31.0 での windows/386 対応にともない、SQLite3 ドライバーをgithub.com/glebarez/go-sqlite に一本化。全てのアーキテクチャでPureGo化
v0.14.0
Changes on v0.14.0 (English)
- When the cell validation fails, prompt to modify the input text instead of discarding
- Treat the types including FLOAT, DOUBLE, REAL, SERIAL, YEAR as number
- Not only the last entry of history, but all modified entries are kept the last value until the current input is completed.
- The the 1st command line parameter DRIVERNAME can be omitted when the 2nd parameter DataSourceName contains DRIVERNAME as the prefix
- To enquote the DATASOURCENAME is now not necessary even when it contains a SPACE
desc
: Display the executed sql when-debug
is specfied- New option
-term STRING
: specfying the terminater of SQL instead of semicolon
(-term "/"
enables to execute PL/SQL of Oracle ) - For MySQL, the default setting is now
?parseTime=true&loc=Local
edit
: column names in SQL are now enclosed in double quotes when they contain spaces
Fixed bugs
- Fix:
edit
with-debug
would panic when ColumnType.ScanType() returned nil - Fix: When
-debug
was specfied,d
orx
could clear the debug-header.
v0.14.0 での変更点(日本語)
- セルの入力チェックに失敗した時、失敗した入力値を破棄せず、修正を促すようにした
- FLOAT, DOUBLE, REAL, SERIAL, YEAR という語句を含む型も数値扱いするようにした
- ヒストリ参照前の変更テキストが保存されるのが最新エントリだけだったのを、全エントリに対して、今の入力が確定されるまで保存するようにした
- コマンド第二引数のデータソース名がドライバー名を接頭語として含んでいれば、第一引数のドライバー名は省略できるようにした
- コマンド引数のデータソース名に空白が含まれていても引用符で囲まなくてもよくした
-debug
オプション指定時、desc
コマンドが発行している SQL を表示するようにした-term string
オプション: セミコロンのかわりに使うSQL の終了文字を指定
(-term "/"
で、Oracle の PL/SQL が実行可能になった)- MySQL では
?parseTime=true&loc=Local
をデフォルトとした edit
: カラム名に空白が含まれているとき、カラム名を二重引用符で囲むようにして、SQLをエラーにしないようにした
不具合修正
-debug
指定時、d
もしくはx
でデバッグ用ヘッダー行がクリアできる問題を修正-debug
オプション指定時、ColumnType.ScanType() が nil を返すカラムがあると、edit
コマンドが panic する不具合を修正
v0.13.0
Changes on v0.13.0 (English)
- Modify the error message of
desc
with no arguments when no tables exist.
: table not found
→no tables are found
- Change the time format of spooled files:
# (2024-05-30 18:15:52)
→### <2024-05-30 18:46:13> ###
- Insert blank line before the message
Spooling to '%s'
select
andedit
: implment-debug
instead of-print-type
to insert the type-information into the header- For types that can store time zones, the time zone is now included in date and time literals
- Support fractional seconds, Oracle TIMESTAMP type, and SQL Server SMALLDATETIME and DATETIMEOFFSET type
Changes of EDIT command
- Executed SQLs are recorded to spooled file now.
- Print
\n---\n
before SQL is displayed. - When confirming SQL execution, keys other than
y
andn
are ignored. - When SQL fails, ask whether continue(
c
) or abort(a
) - Minimal input check is now performed when entering data into cells in the editor.
x
andd
store NULL into the current column- Fix:
edit
could not be started when no data records were selected.
Changes from csvi v1.10
- Fix:
o
andO
: inserted column was always the first one of the new line - Fix:
O
: the line of cursor is incorrect before new cell text is input - Header can not be modified now.
- Do not create an empty row at the tail
v0.13.0 での変更点 (日本語)
- テーブルが一つもない時の
desc
コマンドのメッセージを修正
: table not found
→no tables are found
- スプールファイルの日時フォーマットを変更
# (2024-05-30 18:15:52)
→### <2024-05-30 18:46:13> ###
Spooling to '%s'
というメッセージの前に空行を追加edit
&select
:-print-type
に かわって-debug
を実装。SELECT/EDIT時にヘッダに型情報を載せる- タイムゾーンを格納できる型では、日時のリテラルにタイムゾーンを含めるようにした
- 小数秒、OracleのTIMESTAMP型、SQL ServerのSMALLDATETIME型,DATETIMEOFFSET などをサポート
edit コマンドの修正
- 発行されるSQLもスプールファイルに記録するようにした
- 実行するSQLを表示する前に
\n---\n
で区切るようにした - 実行の確認で、
y
とn
以外のキーは無視するようにした(要再入力) - SQLがエラーになった時、残りの SQL の実行を継続するか(
c
)、中断するか(a
)確認するようにした - エディターでのセル入力時に必要最小限の入力チェックを行うようにした
x
やd
で NULL をセットできるようにした- 1行も存在しない時に
data not found
となって起動できなかった問題を修正
csvi v1.10.0 での修正
o
やO
で入力されたテキストが記入される列がカーソルのあった列ではなく常に先頭列になっていた不具合を修正O
でテキストを入力する時の反転セルの行位置がずれている不具合を修正- ヘッダー部を変更できないようにした
- 末尾のデータがない行を作らないようにした
v0.12.0
- (#1) Support SQLite3. For windows-386, use "mattn/go-sqlite3" and for others, "glebarez/go-sqlite".
- Fix: error was not displayed even when not supported driver name was given
- (Fixed the problem that the test script was not compatible with the latest specifications and moved it to ./test)
- (#1) SQLite3 をサポート。windows-386向けには "mattn/go-sqlite3" を、他の組合せには "glebarez/go-sqlite" を使うようにした。
- サポートしていないドライバー名が与えられた時、エラーにならない問題を修正
- ( テストスクリプトが最新仕様に対応していなかった点を修正し、./test へ移動 )
Thanks to @emisjerry and @spiegel-im-spiegel for their valuable contributions.
v0.11.0
- Create new statement:
edit TABLENAME [WHERE...]
to edit the records of table like a spreadsheet. - Fix: The command
START
did not show error-messages start
: do not include the contents of script into historyselect
: Fix: all columns were joined when-tsv
was specified- (go-multiline-ny) The text before the first Ctrl-P/N is treated as if it were the latest entry in the history not to lose them
- テーブルデータをスプレッド風に編集するコマンド:
edit テーブル名 [where ...]
を用意 - START コマンドがエラーメッセージを返さない不具合を修正
- START コマンド用のスクリプトの内容はヒストリに含めないようにした
-tsv
オプションを使用すると SELECT の列がすべて連結されてしまう不具合を修正- (go-multiline-ny) Ctrl-P/N を入力する前のテキストを、ヒストリの最新エントリ扱いにして、失なわれないようにした
v0.10.1
- Fix: CSV pager was called even when SQL Statement raised error
- Fix: Escape Sequences were inserted into the spooled file
- Fix:
desc TABLE
called pager even when TABLE did not exist - Fix: EOF was reported as an error when Ctrl-D or
exit
is typed.
- SQL がエラーの時でも CSV ページャが呼ばれる問題を修正
- エスケープシーケンスがスプールファイルに含まれてしまう問題を修正
desc TABLE
で TABLE が存在しない時もページャが呼ばれる問題を修正- Ctrl-D もしくは
exit
で終了した時、EOF がエラーとして表示される問題を修正