little-brother / sqlite-gui Goto Github PK
View Code? Open in Web Editor NEWLightweight SQLite editor for Windows
License: GNU General Public License v2.0
Lightweight SQLite editor for Windows
License: GNU General Public License v2.0
Hi,
Saved queries has a shortcut to add to current editor - enter
.
The enter key doesn't add it to the editor. You must right-click and choose the option.
Thanks!
Hi,
You've nicely improved the charting ability in sqlite-gui
- thank you very much!
I like that I can scroll the chart downwards and see all data, but the scroll bar on the right doesn't actually allow me to click and drag it.
I can use the mouse wheel to go up and down, but I would expect the ability to click and drag the scroll bar - just like we can on any Windows application.
Please consider allowing the scroll bar to be clicked and dragged.
Thanks!
I tried to open some database and receive this error:
"attached databases must use the same text encoding as main database"
The sabe database was opened in "SQLiteStudio"
Thanks.
Minimal example of issue
#define UNICODE
#define _UNICODE
#include <tchar.h>
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
#include <richedit.h>
#define IDC_EDITOR 1000
#define IDC_BUTTON 1001
HWND hEditorWnd;
bool updateHighlighting(HWND hWnd) {
int carriagePos = 0;
SendMessage(hWnd, EM_GETSEL, (WPARAM)&carriagePos, (WPARAM)&carriagePos);
CHARFORMAT cf = {0};
cf.cbSize = sizeof(CHARFORMAT) ;
cf.dwMask = CFM_COLOR | CFM_BOLD;
cf.crTextColor = RGB(0, 0, 200);
cf.dwEffects = CFM_BOLD;
SendMessage(hWnd, EM_SETSEL, 0, -1);
SendMessage(hWnd, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
cf.dwMask = CFM_COLOR | CFM_BOLD;
cf.dwEffects = cf.dwEffects & ~CFM_BOLD;
cf.crTextColor = RGB(200, 0, 0);
SendMessage(hWnd, EM_SETSEL, 4, 6);
SendMessage(hWnd, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
SendMessage(hWnd, EM_SETSEL, carriagePos, carriagePos);
_tprintf(TEXT("End highlight\n"));
return true;
}
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
switch (message) {
case WM_DESTROY:
PostQuitMessage (0);
break;
case WM_COMMAND: {
if (LOWORD(wParam) == IDC_EDITOR && HIWORD(wParam) == EN_CHANGE)
return updateHighlighting(hEditorWnd);
if (LOWORD(wParam) == IDC_BUTTON && HIWORD(wParam) == BN_CLICKED)
_tprintf(TEXT("UNDO: can %i => result: %i\n"), Edit_CanUndo(hEditorWnd), Edit_Undo(hEditorWnd));
}
break;
default:
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0;
}
int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nCmdShow) {
InitCommonControls();
LoadLibrary(TEXT("msftedit.dll"));
HWND hwnd;
MSG msg;
WNDCLASSEX wincl;
wincl.hInstance = hThisInstance;
wincl.lpszClassName = TEXT("AppClass");
wincl.lpfnWndProc = WindowProcedure;
wincl.style = CS_DBLCLKS;
wincl.cbSize = sizeof (WNDCLASSEX);
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
wincl.lpszMenuName = NULL;
wincl.cbClsExtra = 0;
wincl.cbWndExtra = 0;
wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
if (!RegisterClassEx (&wincl))
return 0;
hwnd = CreateWindowEx (0, TEXT("AppClass"), TEXT("Test"), WS_OVERLAPPEDWINDOW | WS_VISIBLE, 300, 400, 310, 375, HWND_DESKTOP, NULL, hThisInstance, NULL);
CreateWindowEx(0, WC_BUTTON , L"UNDO", WS_VISIBLE | WS_CHILD | WS_TABSTOP, 10, 310, 280, 30, hwnd, (HMENU)IDC_BUTTON, hThisInstance, NULL);
hEditorWnd = CreateWindowEx(0, TEXT("RICHEDIT50W") , NULL, WS_VISIBLE | WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP | ES_NOHIDESEL, 0, 0, 300, 300, hwnd, (HMENU)IDC_EDITOR, hThisInstance, NULL);
SendMessage(hEditorWnd, EM_SETEVENTMASK, 0, ENM_CHANGE | ENM_UPDATE | ENM_KEYEVENTS);
while (GetMessage (&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
Hi,
This may need more experimenting and investigating on your part, because I'm not exactly certain what I'm seeing is related.
It seems saving a query (maybe multiple saves) cause the editor pane to become sluggish and doesn't update to edit/view the query.
The app never crashes or becomes unresponsive, but the editor pane doesn't refresh allowing you to see the text very well.
Thanks!
Hi,
Sometimes we can be a little sloppy when writing out a query.
It would be neat if sqlite-gui
could format queries, so that when we save them, they're saved formatted already.
Thanks!
Hi,
Sometimes I don't want to type the column names that I'm interested in querying from. It would be nice if I could copy the column name with ctrl+c and paste it into the editor window.
This is mostly working, but it will also copy over the datatype, so that has to be deleted as well.
For example, EventCode: TEXT
It would be nice if it would just copy EventCode
, then I copy paste that into the editor/terminal.
alternatively, is it possible for auto complete to look at column names?
Thanks!
Hello,
I wanted to thank you for working with me on all the bug reports. You response to the issues has been outstanding and I appreciate your willingness to continue improving sqlite-gui
.
You're doing a great job and this tool has improved greatly from when I first started using it - which is all the way back in September 2020!
Keep up the great work.
Best,
j.b.
Hi,
I like the saved query feature. If I'm working on something complex, I would want to save it often to make sure I don't lose my work.
However, it doesn't seem like I can delete a query within the GUI, with something like a right-click, or shift right-click.
The saved queries can probably be deleted directly in the prefs.sqlite
, but it would be nice to see a GUI option for deletion.
Thanks!
Hi,
You fixed an issue in #27, where an existing file is overwritten with a new save - good job!
However, the UI experience isn't what most other apps do. Other apps would give the user the ability to rename the file if they don't want to replace it.
This is an example of how gnuplot does it:
[Window Title]
Confirm Save As
[Content]
year2020-weather.png already exists.
Do you want to replace it?
[Yes] [No]
If user chooses no, the export window is still open and they can rename it.
In sqlite-gui
, the user has to choose to export the data again.
Hi,
It would be nice if the editor view display line numbers on the left margin.
Thanks!
Hi,
Not sure if you saw #23
Regardless of where the error is located, the error text always displays at line 1
Thanks!
Hi,
When a database was opened and then closed, auto complete can look at the table names.
sqlite-gui.1.5.4
select * from
and notice tables appear in the drop down menuI wouldn't expect table names to be present, since the database was closed.
Thanks!
Hi,
If I open an unencrypted database, encrypted it, close it, and reopen it, I can read the data without a password prompt.
sqlite-gui
sqlite-gui
opensqlite-gui
icon changed to cyan colorI think this is another instance where the database is kept open/in memory, even though sqlite-gui
shows it closed.
Thanks!
Hi,
For your consideration...
When an editor is already opened and has text in the editor, running a saved query will put the text in the same open editor. If you run the two different queries, you get two different results tabs, which is neat, but I would rather have a saved query put the text in a new editor.
Hi,
sqlite-gui
sqlite-gui
I would expect to be able to delete the directory my database was in, because the database has been closed and itself has been deleted.
thanks!
Hi,
Similar to #18
Something in sqlite-gui
is still holding on to the database after it's closed in the app. As a result, I can't delete or rename my database file. I haven't yet tracked down what's causing this.
Hi,
I like the terminal view for the results, since it also shows the query.
However, there doesn't seem to be a way to clear the data out. If I open one DB, use the terminal to execute some queries, then close and open another database, the old data is still present in the terminal.
I would request a way to clear the screen/buffer in the terminal view.
Thanks!
Hi,
In all GUI applications I use, I can press ctrl+backspace to delete the word behind the cursor.
With sqlite-gui
, double-clicking an editor allows you to rename it, but ctrl+backspace doesn't delete the text. Instead some weird character is put there.
Please consider supporting ctrl+backspace to rename tabs.
Thanks!
Hi,
If I have a few tabs open and I close the squlite-gui app, there is no prompt to save the queries. (yes/no prompt)
You may want to consider a prompt for the user to save the queries.
Maybe this only needs to be prompted when "Restore editor tabs at startup" is unchecked.
Thanks!
It is a multi-threaded issue. Commands are executed only for a "service"-connection. Should be executed for each tab connection.
Hi,
You implemented a nice feature in #9 - an in memory database. Thank you for putting that in your tool.
I can create an in memory DB, then import a sql file under Tools > Import SQL File, but I don't see a way where I can save my database after it's been imported.
Would you please consider the ability to convert an in memory DB to disk? That way the DB file can be opened again later.
Thanks!
Hi,
To be considered if you implement #22....
When there is an error in the editor, the results pane says there's an error. It could also include the line number with the error.
Thanks!
Hi,
Using sqlite-gui, the editor seems broken when you try to double-click text in single quotes.
Type
'hello'
in the editor and double-click hello. You'll notice you cannot, it will select the single quote on the right.
I would expect double clicking to function when there are single quotes around a word.
Hi,
I like that you can save the results from a query as a csv file and it includes the header.
This is a request to have the the header present when you copy to the clipboard.
This is copy/paste and notice there is no header... :(
1,Steelheart,Brandon Sanderson,978-0385743563,5.0,3
2,All Our Yesterdays,Cristin Terrill,978-1423176374,7.3,10
3,Life After Life,Jill McCorkle,978-1616203221,2.82,4
4,Life After Life,Kate Atkinson,978-0316176491,8.1,5
5,Foundation,Isaac Asimov,978-0553293357,12.7,8
Alternatively, maybe there can be a right-click option to copy data with header.
Thanks!
hi,
Since sqlite-gui
is 32 bit only (right now), could you please compile and include the vsv extension?
http://www.dessus.com/files/vsv.c
which looks the same/similar as this:
https://www.sqlite.org/src/file?name=ext/misc/csv.c&ci=trunk
Hi,
Similar to #47...
Is it possible to auto complete the column names while typing the name out?
SQL Server seems to support this.
Thanks!
Code::Block 17:12, Win7x64, original series.c
gcc -I ../include -g -shared series.c -o series.dll -s
Result: 39 engines
gcc -I ../include -g -shared series.c -o series.dll -s -O
Result: 14 engines
Hi,
It looks like the navigation tree isn't updating after an index is created.
create index
idx_books on books(isbn)
Press F9
to execute
Press F5
to refresh view
Sometimes the index isn't listed under indexes
, but if you right-click and select refresh, it will show up.
Hello,
Another chart option...
I don't see a way to export a chart as a PNG or JPG image. Could you please have an option to right-click, or something, to save the image?
Additionally, if there's too much data, you can see all the results.
Using my schema from #11, it looks like if I have a results with something more than a handful, the chart won't be show completely.
INSERT INTO "test" VALUES('2021-05-03',18,40);
INSERT INTO "test" VALUES('2021-05-03',12,67);
INSERT INTO "test" VALUES('2021-05-03',18,84);
INSERT INTO "test" VALUES('2021-05-04',24,56);
INSERT INTO "test" VALUES('2021-05-04',12,65);
INSERT INTO "test" VALUES('2021-05-05',12,9);
INSERT INTO "test" VALUES('2021-05-05',24,16);
INSERT INTO "test" VALUES('2021-05-05',12,69);
INSERT INTO "test" VALUES('2021-05-05',12,9);
INSERT INTO "test" VALUES('2021-05-06',24,17);
INSERT INTO "test" VALUES('2021-05-07',12,32);
INSERT INTO "test" VALUES('2021-05-07',18,46);
INSERT INTO "test" VALUES('2021-05-07',18,72);
INSERT INTO "test" VALUES('2021-05-08',12,51);
INSERT INTO "test" VALUES('2021-05-08',12,74);
INSERT INTO "test" VALUES('2021-05-08',18,98);
INSERT INTO "test" VALUES('2021-05-09',12,60);
INSERT INTO "test" VALUES('2021-05-09',18,99);
INSERT INTO "test" VALUES('2021-05-10',12,7);
INSERT INTO "test" VALUES('2021-05-10',12,10);
Hi,
ctrl+a does not highlight all text in an editor tab when you're trying to rename it.
In #20 you enhanced the ability to use ctrl+a in many places, so this would further improve sqlite-gui
,
Thanks!
Hi,
The query history
cannot be deleted all at once. You must select individual queries to delete. Pressing and holding the del
key works, but it's time consuming.
I would expect ctrl
+a
to work here, ctrl
+click, and/or shift
+click to allow multiple lines to be deleted together.
Thanks!
Hi,
Sometimes I need to use MS Excel to open a file and extract info from it. When I paste it in sqlite-gui
, I would expect it to paste as a plain text file. Instead, it's carrying over the formatting from MS Excel. That's not needed.
Please consider allowing pasting as plain text.
Thanks!
Hi,
Something for you to consider as a new setting...
Maybe an option to show the rowID when browsing the data checkbox could be added.
DB4S has an option to show the rowID if you right-click on the header when browsing the data. You don't see the rowID if your query doesn't have it.
thanks!
SQLite connection have to use WAL mode (by default - delete
) to allow to execute multiply writable (e.g. update
or delete
) queries.
Unlike other pragmas, this one changes the database file and attached databases too. If mode was changed to wall
by pragma journal_mode = wal
early, then pragma journal_mode = delete
falls with database is locked
. This could be happen because prefs.sqlite
(always attached as preferences
) also changed mode to wal
.
The mode can be changed for each base independently using schema:
pragma main.journal_mode = wal
But it also returns database is locked
. Another applications change the journal mode without error.
Hello,
How can I create an in memory database using sqlite-gui
? If no database is open, I cannot execute a query.
Thanks!
Hi,
If you uncheck Restore editor tabs at startup
(default is checked), the terminal view text is black and you can't read it unless you highlight the text.
.help
.help
I would expect to always see the text.
Thanks!
p.s. you probably want to change at to on:
Restore editor tabs ON startup
Hi,
I don't know what the database comparison does under tools, but it doesn't seem to do anything useful.
sqlite-gui
with the bookstore database---------------------------
Info
---------------------------
No differences found
---------------------------
OK
---------------------------
How could there not be any differences between the two unique databases? The compare schema
option seems to work fine.
Hi,
I found an issue when trying to close the edit view window.
You cannot close the app, even if you edit the view again and execute the view.
I had to use task manager to kill the app.
I would expect the app cancel button to function properly.
Hi,
ctrl
+alt
+esc
interferes with an existing Windows shortcut:
https://www.computerhope.com/jargon/a/alt-esc.htm
So pressing this doesn't close the editor tab in the app.
Thanks!
Hi,
I think export option in sqlite-gui
should automatically append the file extension to the file name.
In this example, the file name doesn't have .csv
appended to it.
I would expect the file extension present on the export.
Also, Tools > Export as CSV file doesn't append the file extension to the file that's exported.
It looks like .sql
is also absent when exporting files.
Appending file extensions is a standard Windows behavior when saving files.
Thanks!
Hi,
Please consider adding a button in the toolbar to comment/uncomment lines in squlie-gui
.
The user can of course type --
themselves, but having a button available would be a nice feature to have.
DBBS uses ctrl
+/
as a shortcut to comment/uncomment. Maybe you can use the same?
Hi,
I like the chart option that's built into the tool - so neat. Thank you for adding this in.
However, sometimes the query requests need to have more data than makes sense on a chart.
I would like an option to select columns to chart and maybe specify if it will be on X or Y column.
For instance, this data doesn't make any sense in the chart:
schema:
CREATE TABLE IF NOT EXISTS "test" (
"date" ,
"number" ,
"eventCode"
);
data:
INSERT INTO "test" VALUES('2021-05-03',18,40);
INSERT INTO "test" VALUES('2021-05-03',12,67);
INSERT INTO "test" VALUES('2021-05-03',18,84);
INSERT INTO "test" VALUES('2021-05-04',24,56);
INSERT INTO "test" VALUES('2021-05-04',12,65);
INSERT INTO "test" VALUES('2021-05-05',12,9);
INSERT INTO "test" VALUES('2021-05-05',24,16);
INSERT INTO "test" VALUES('2021-05-05',12,69);
INSERT INTO "test" VALUES('2021-05-05',12,9);
INSERT INTO "test" VALUES('2021-05-06',24,17);
Maybe I need to show all three columns in the results, but only need to have date
and eventcode
on the chart.
Right now all three are present and doesn't really represent anything useful.
Thanks for the consideration!
Hi,
If I export a csv file from a query, I can choose the same name without any warning the file exists and it will be replaced.
I would expect some kind of prompt to say yes/no for replacing file with new data. This is a standard behavior across windows.
Thanks!
Hi,
In sqlite-gui.1.5.1, if I open a database, work on it, then close it, sqlite-gui.1.5.1 still holds on to the database. As a result, I can't rename the database file.
I would expect that the database would be released once the application closes the file.
Thanks!
Hi,
I like the data viewer window you have in the app when you double-click on the column name. The where filter is also nice.
Could you please consider having ctrl+a
work as a highlight all in the where filter and in all the filters below the column names?
ctrl+A
is a standard behavior in almost anything involving text.
Thanks!
Hi,
If I have some results that I want to export, I can right-click and choose export to csv
.
The minor issues is, the header isn't apart of the data that's exported. By default, I would expect the header to be present.
Thanks!
Hi,
Please consider adding the version number of your application somewhere.
Typically this is found under the about tab. Maybe it would be nice to also have the SQLite3 version loaded with the app as well.
Thanks!
Hi,
I like that you record the datetime with the saved queries, but the format can be confusing to people at first.
It looks like it's DD-MM-YYYY UTC time.
I propose ISO8601 format when recording the date.
YYYY-MM-DDDD UTC time.
https://sqlite.org/forum/forumpost/bcbfc07a91?t=h
If it helps, this is the reason logged for detecting a threat:
Detected: PUA:Win32/InstallCore
Status: Failed
This threat or app might not be completely remediated.
This program has potentially unwanted behaviour.
On Windows 10 using Chrome or Edge to download the zip from the link given.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.