Skip to content

Releases: hymkor/sqlbless

v0.10.0

08 May 11:52
Compare
Choose a tag to compare
  • Implement -auto option (for test and benchmark)
  • Replace the test code written by ExpectLua-Script to PowerShell
  • Use CSVI as a pager for the output of SELECT statement

  • テストやベンチマークのため -auto オプションを実装
  • ExpectLua スクリプトで書かれたテストコードを PowerShell へ置き換えた
  • SELECT文の出力のため、CSVI をページャーとして使用するようにした

image

v0.9.0

04 Sep 07:16
Compare
Choose a tag to compare
  • When lines end with ;, Enter-key works as submiting

  • 入力行が ; で終わっていた場合、Enter キーを入力終結として機能するようにした。

v0.8.0

14 May 16:28
Compare
Choose a tag to compare
  • Added input completion for some keywords such as SELECT and INSERT with TAB-key

  • TABキーで、SELECT や INPUT といったキーワードの入力補完ができるようになった。

v0.7.1

04 May 03:13
Compare
Choose a tag to compare
  • Update importing libraries
    • go-readline-ny from v0.10.1 to v0.11.2
    • go-multiline-ny from v0.6.7 to v0.7.0
      • Ctrl-B can move cursor to the end of the previous line when cursor exists at the beginning of the line
      • Ctrl-F can move cursor to the beginning of the next line when cursor exists at the end of the line

  • インポートしているライブラリを更新
    • go-readline-ny from v0.10.1 to v0.11.2
    • go-multiline-ny from v0.6.7 to v0.7.0
      • 行頭にカーソルがあるとき、← や Ctrl-B でも前の行末にカーソルを移動できるようにした。
      • 行末にカーソルがあるとき、→ や Ctrl-F でも次の行頭にカーソルを移動できるようにした。

v0.7.0

24 Apr 21:10
Compare
Choose a tag to compare
  • Option -f -: read a script from STDIN
  • When STDIN is not a terminal, do not use go-readline-ny and read STDIN sequentially
  • Support MySQL
  • ( Add debug option -print-type that enables to print types of columns output by SELECT for debug )

  • オプション: -f - で標準入力よりスクリプトを読むようにした
  • 標準入力が端末ではない時、 go-readline-ny を使わず、標準入力をシーケンシャルに読むようにした
  • MySQL をサポート
  • (デバッグオプションとして、SELECT結果の各列の型を表示する -print-type を追加)

v0.6.0

22 Apr 02:42
Compare
Choose a tag to compare
  • Disable Ctrl-S and Ctrl-R (incremental search) because they do not support multilines.
  • Add the option -submit-enter that swaps Enter and Ctrl-Enter
  • Remove automatic-rollback on error because the command psql (PostgreSQL) does not do it
  • Implement START filename and -f filename that execute SQLs in the file. (The terminator of SQL is ;)
  • Implement REM for comments
  • Spool: append ; at the tail of SQL
  • Print Ok after DDL succeeds.

  • (複数行対応していないので)インクリメンタルサーチの Ctrl-S と Ctrl-R を無効化
  • オプション -submit-enter を追加(Enter と Ctrl-Enter を入れ替える)
  • PostgrelSQL のコマンド psql もやっていないようなので、エラー時の自動ロールバックを廃止
  • ファイルの SQL を実行するコマンド START filename とオプション -f filename を実装(SQLの終端子は ; になります)
  • コメント用の REM 文を追加
  • spool 文:SQL の末尾に ; を追加するようにした
  • DDL文が成功したときは Ok を表示するようにした

v0.5.0

19 Apr 05:12
Compare
Choose a tag to compare
  • spool writes program version also
  • Support Microsoft SQL Server
  • Fix: login error was not raised until the first SQL was input.

  • spool でプログラムのバージョンも記録するようにした
  • Microsoft SQL Server もサポート
  • 最初の SQL が入力されるまでログインエラーが起きない問題を修正

v0.4.0

17 Apr 14:57
Compare
Choose a tag to compare
  • On start, print version, GOOS, GOARCH, and runtime-version at building
  • Add the options
    • -null "string" : set the string represeting NULL
    • -fs "string" : set field separator character instead of comma
    • -crlf : use CRLF for newline
    • -tsv : use TAB as field separator

  • 起動時にバージョン、ビルド時の GOOS,GOARCH,Goのバージョンを表示するようにした
  • オプション追加
    • -null "string" : NULL を表現する文字列を設定
    • -fs "string" : カンマの代わりの区切り文字を指定
    • -crlf : 改行に CRLF を使う
    • -tsv : 区切り文字として TAB を使う

v0.3.0

16 Apr 06:17
Compare
Choose a tag to compare
  • select: when data is []byte and valid as utf8, print it as string
  • Implement desc and \d command to display the list of tables with no arguments, or print specifications for the table given as parameter
  • Improve the editor: Print text enclosed with double quotations with magenta
  • Implement history command to print command-line histories
  • Improve spool command
    • With no arguments show the current status instead of stopping spooling
    • Output timestamp into the spooling file for each command
    • Show the current spooling filename on prompt
    • Open as append-mode. Do not truncate existing spooled file.

  • select: フィールドが utf8 として妥当な []byte の時、文字列として表示するようにした
  • desc\d: 引数なしでテーブル一覧表示、引数指定のテーブル仕様表示を実装
  • エディター改良: 二重引用符で囲まれたテキストをマゼンタで表示
  • spool コマンド改良
    • 引数なしがない場合、スプールを終了するのではなく、現在の状況を表示するようにした
    • コマンドごとにタイムスタンプをスプールファイルに出力するようにした
    • プロンプトにスプール中のファイル名を表示
    • アペンドモードでオープンし、既存のファイルを空にしないようにした

v0.2.0

15 Apr 09:43
Compare
Choose a tag to compare
  • Insert # at the beginning of each line of spooled SQL ( grep -v "^#" FILENAME can extract only CSV data )
  • Fix for go-readline-ny v0.10.1 ( The return values of Coloring interface methods are changed from int to readline.ColorSequence )
  • Enabled automatic rollback by default on errors except for Oracle (Previously, when using PostgreSQL, we used to roll back. The point is, when the number of supported DBs increases in the future, which one will be the default)
  • On error, contain "(%T)" (type of error) into error message
  • Implemented automatic rollback of a transaction on 'exit', 'quit', or EOF

  • スプールされた SQL の各行の先頭に # を挿入 ( grep -v "^#" FILENAME で、CSVデータのみが取り出せる)
  • go-readline-ny v0.10 のための修正(色付けinterfaceの戻り値が int から readline.ColorSequence 型にかえる対応)
  • Oracle以外ではデフォルトでエラー時に自動でロールバックするようにした(前は PosgreSQL の時はロールバックするようにしていた。要は今後サポート DB が増えたときにどちらがデフォルトにするかという話)
  • エラー時、メッセージに (%T) (エラーの型)を含むようにした
  • exit , quit , EOF で終了する際、トランザクションを自動的にロールバックするようにした。