Skip to content

Commit 76503c9

Browse files
authored
Merge pull request #24 from hymkor/tempschema
Fix incorrect SQL for querying temporary tables in SQLite3
2 parents a1f1b4f + 6eb40e4 commit 76503c9

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

dialect/sqlite/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import (
1414
var Entry = &dialect.Entry{
1515
Usage: "sqlbless sqlite3 :memory: OR <FILEPATH>",
1616
SQLForTables: `
17-
select 'master' AS schema,name,rootpage,sql FROM sqlite_master
17+
select 'main' as schema,name,rootpage,sql from sqlite_master
1818
where type = 'table'
1919
union all
20-
select 'temp_schema' AS schema,name,rootpage,sql FROM sqlite_temp_schema
21-
where type = 'temp_schema'`,
20+
select 'temp' as schema,name,rootpage,sql from sqlite_temp_master
21+
where type = 'table'`,
2222
TypeConverterFor: typeNameToConv,
2323
PlaceHolder: &placeHolder{},
2424
SQLForColumns: `PRAGMA table_info({table_name})`,

release_note_en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Release notes (English)
1212
- Display `*` in the status line when there are unsaved changes
1313
- Implement page up/down
1414
- Assign `gg` as an additional keybinding for moving to the first row.
15+
- Fix incorrect SQL for querying temporary tables in SQLite3 (#24)
1516

1617
v0.27.0
1718
-------

release_note_ja.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Release notes (Japanese)
1313
- 変更がある場合、ステータスラインに`*` を表示
1414
- ページ単位の移動(PgDn,PgUp)を実装
1515
- `gg` にファイル先頭への移動を設定
16+
- SQLite3 のテーブル一覧取得時における、一時テーブルの誤った参照方法を修正 (#24)
1617

1718
v0.27.0
1819
-------

0 commit comments

Comments
 (0)