Skip to content

Commit 030401d

Browse files
Up to 1.9.3
* Database diagram is back * UI to manage quick references * Improve encryption dialog inc. issue #165 * New tool to data transformation * Up SQLite to 3.47.0 * Minor changes inc. fix issue #166
1 parent 0adeb13 commit 030401d

File tree

15 files changed

+8496
-3168
lines changed

15 files changed

+8496
-3168
lines changed

include/sqlite3.c

Lines changed: 5585 additions & 2820 deletions
Large diffs are not rendered by default.

include/sqlite3.h

Lines changed: 171 additions & 22 deletions
Large diffs are not rendered by default.

src/dbutils.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,13 @@ namespace dbutils {
190190
sqlite3_result_text(ctx, res, -1, SQLITE_TRANSIENT);
191191
}
192192

193+
void double_quote (sqlite3_context* ctx, int argc, sqlite3_value **argv) {
194+
if (sqlite3_value_type(argv[0]) == SQLITE_NULL)
195+
return sqlite3_result_null(ctx);
196+
197+
const char* arg = (const char*)sqlite3_value_text(argv[0]);
198+
char* res = utils::double_quote(arg);
199+
sqlite3_result_text(ctx, res, -1, SQLITE_TRANSIENT);
200+
delete [] res;
201+
}
193202
}

src/dbutils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ namespace dbutils {
1414
void rownum(sqlite3_context *ctx, int argc, sqlite3_value **argv);
1515
void md5 (sqlite3_context *ctx, int argc, sqlite3_value **argv);
1616
void tosize (sqlite3_context *ctx, int argc, sqlite3_value **argv);
17+
void double_quote (sqlite3_context *ctx, int argc, sqlite3_value **argv);
1718
}
1819
#endif

src/dialogs.cpp

Lines changed: 675 additions & 130 deletions
Large diffs are not rendered by default.

src/dialogs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace dialogs {
2828
BOOL CALLBACK cbDlgAttachODBC (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
2929
BOOL CALLBACK cbDlgAddonManager (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
3030
BOOL CALLBACK cbDlgCustomFunctions (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
31+
BOOL CALLBACK cbDlgReferences (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
3132
BOOL CALLBACK cbDlgResultFind (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
3233
BOOL CALLBACK cbDlgUriDbPath (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
3334
BOOL CALLBACK cbDlgInfo (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);

src/global.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,6 @@ ULONG_PTR Menu_GetItemData(HMENU hMenu, UINT wID);
188188
COLORREF RichEdit_GetTextColor (HWND hWnd, int pos);
189189
int TabCtrl_GetItemText(HWND hWnd, int iItem, TCHAR* pszText, int cchTextMax);
190190
LRESULT onListViewMenu(HWND hListWnd, int rowNo, int colNo, int cmd, bool ignoreLastColumn = false);
191-
TCHAR* getDDL(const TCHAR* schema16, const TCHAR* name16, int type, bool withDrop = false);
191+
TCHAR* getDDL(const TCHAR* schema16, const TCHAR* name16, int type, int mode = 0);
192192
bool showDbError(HWND hWnd);
193193
#endif

src/main.cpp

Lines changed: 187 additions & 81 deletions
Large diffs are not rendered by default.

src/prefs.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace prefs {
66
sqlite3* db = NULL;
77

8-
const int ICOUNT = 89;
8+
const int ICOUNT = 91;
99
const char* iprops[ICOUNT] = {
1010
"x", "y", "width", "height", "splitter-position-x", "splitter-position-y",
1111
"maximized", "font-size", "max-query-count", "exit-by-escape", "beep-query-duration", "synchronous-off",
@@ -28,8 +28,9 @@ namespace prefs {
2828
"color-null", "color-blob", "color-text", "color-integer", "color-real", "color-current-cell",
2929
"color-keyword", "color-function", "color-quoted", "color-comment", "color-parenthesis", "color-pragma",
3030
"data-generator-row-count", "data-generator-truncate",
31-
"link-fk", "link-view", "link-trigger",
31+
"show-fk-links", "show-column-types", "show-isolation-reasons",
3232
"format-keyword-case", "format-function-case",
33+
"transpose-is-first-column", "transpose-is-row-col-names",
3334
"use-logger"
3435
};
3536

@@ -56,8 +57,9 @@ namespace prefs {
5657
0xFFF0F0, 0xFFF0FF, 0xF9F9F9, 0xF0F9FF, 0xF0FFF0, 0xA66046,
5758
0xC80000, 0xFF5C00, 0x00C800, 0x0000FF, 0xFFFF7F, 0x404080,
5859
100, 0,
59-
1, 0, 0,
60+
1, 1, 1,
6061
1, 1,
62+
0, 0,
6163
0
6264
};
6365

src/resource.h

Lines changed: 105 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#define GUI_VERSION "1.9.2"
2-
#define GUI_VERSION2 1, 9, 2, 0
1+
#define GUI_VERSION "1.9.3"
2+
#define GUI_VERSION2 1, 9, 3, 0
33
#ifdef __MINGW64__
44
#define GUI_PLATFORM 64
55
#else
@@ -32,7 +32,6 @@
3232
#define IDD_ADD_INDEX 29
3333
#define IDD_CUSTOM_FUNCTIONS 30
3434
#define IDD_RESULT_FIND 31
35-
#define IDD_TEXT_COMPARISON 32
3635
#define IDD_FK_SELECTOR 33
3736
#define IDD_COLOR_PICKER 34
3837
#define IDD_URI_DB_PATH 35
@@ -41,6 +40,7 @@
4140
#define IDD_ATTACH_ODBC 38
4241
#define IDD_VALUE_VIEWER 39
4342
#define IDD_VALUE_EDITOR 40
43+
#define IDD_REFERENCES 41
4444

4545
#define IDD_TOOL_IMPORT_CSV 55
4646
#define IDD_TOOL_IMPORT_JSON 56
@@ -49,21 +49,25 @@
4949
#define IDD_TOOL_EXPORT_JSON 61
5050
#define IDD_TOOL_EXPORT_SQL 62
5151
#define IDD_TOOL_EXPORT_IMPORT_ODBC 63
52+
#define IDD_TOOL_TEXT_COMPARISON 70
5253
#define IDD_TOOL_GENERATE_DATA 71
5354
#define IDD_TOOL_GENERATE_DATA_SET 72
54-
#define IDD_TOOL_COMPARE_DATABASE 73
55-
#define IDD_TOOL_DATABASE_SEARCH 74
56-
#define IDD_TOOL_STATISTICS 75
57-
#define IDD_TOOL_FOREIGN_KEY_CHECK 76
58-
#define IDD_TOOL_DESKTOP_SHORTCUT 77
59-
55+
#define IDD_TOOL_DATABASE_DIAGRAM 73
56+
#define IDD_TOOL_COMPARE_DATABASE 74
57+
#define IDD_TOOL_DATABASE_SEARCH 75
58+
#define IDD_TOOL_STATISTICS 76
59+
#define IDD_TOOL_FOREIGN_KEY_CHECK 77
60+
#define IDD_TOOL_DESKTOP_SHORTCUT 78
61+
#define IDD_TOOL_TRANSFORM_DATA 79
6062

6163
#define IDC_MENU_MAIN 100
6264
#define IDC_MENU_EDITOR 101
6365
#define IDC_MENU_RESULT 102
6466
#define IDC_MENU_TAB_RESULT 103
6567
#define IDC_MENU_EDIT_DATA 104
6668
#define IDC_MENU_VIEW_DATA 105
69+
#define IDC_MENU_DIAGRAM 106
70+
#define IDC_MENU_DIAGRAM_TABLE 107
6771
#define IDC_MENU_QUERYLIST 108
6872
#define IDC_MENU_CHART 109
6973
#define IDC_MENU_CLI 110
@@ -270,6 +274,27 @@
270274
#define IDC_DLG_VIEWER_REPOSITORY_LABEL 489
271275
#define IDC_DLG_MODIFIER_REPOSITORY 490
272276
#define IDC_DLG_MODIFIER_REPOSITORY_LABEL 491
277+
#define IDC_DLG_REFERENCES 492
278+
#define IDC_DLG_TITLE 493
279+
#define IDC_DLG_QUERY 494
280+
#define IDC_DLG_TABLENAME_LABEL 495
281+
#define IDC_DLG_COLNAME_LABEL 496
282+
#define IDC_DLG_TITLE_LABEL 497
283+
#define IDC_DLG_QUERY_LABEL 498
284+
#define IDC_DLG_SRC_SCHEMA 499
285+
#define IDC_DLG_TRG_SCHEMA 500
286+
#define IDC_DLG_SOURCE 501
287+
#define IDC_DLG_TARGET 502
288+
#define IDC_DLG_ISFIRSTCOLUMN 503
289+
#define IDC_DLG_ISROWCOLNAMES 504
290+
#define IDC_DLG_AXIS_X 510
291+
#define IDC_DLG_AXIS_X_LABEL 511
292+
#define IDC_DLG_AXIS_Y 512
293+
#define IDC_DLG_AXIS_Y_LABEL 513
294+
#define IDC_DLG_VALUE 514
295+
#define IDC_DLG_VALUE_LABEL 515
296+
#define IDC_DLG_DUPLICATES_LABEL 516
297+
#define IDC_DLG_DUPLICATES 517
273298

274299
#define IDC_DLG_CIPHER_KEY 601
275300
#define IDC_DLG_CIPHER_SHOW_KEY 602
@@ -330,8 +355,9 @@
330355
#define IDM_MODIFIER_PLUGINS 1008
331356
#define IDM_EXTENSIONS 1009
332357
#define IDM_CUSTOM_FUNCTIONS 1020
333-
#define IDM_SETTINGS 1021
334-
#define IDM_EXIT 1022
358+
#define IDM_REFERENCES 1021
359+
#define IDM_SETTINGS 1022
360+
#define IDM_EXIT 1023
335361

336362
#define IDM_RECENT 1100 // iterable
337363
#define IDM_RECENT_ATTACHED 1150 // iterable
@@ -370,6 +396,8 @@
370396
#define IDM_GENERATE_DATA 1542
371397
#define IDM_COMPARE_DATABASE 1544
372398
#define IDM_DATABASE_SEARCH 1545
399+
#define IDM_DATABASE_DIAGRAM 1546
400+
#define IDM_TRANSFORM_DATA 1547
373401

374402
#define IDM_HELP 1550
375403
#define IDM_ABOUT 1551
@@ -440,46 +468,54 @@
440468
#define IDM_EDIT 1703
441469
#define IDM_DELETE 1704
442470
#define IDM_RENAME 1705
443-
#define IDM_DUPLICATE 1706
444-
#define IDM_ADD_COLUMN 1707
445-
#define IDM_ADD_INDEX 1708
446-
#define IDM_ERASE_DATA 1709
447-
#define IDM_DDL 1710
448-
#define IDM_ENABLE 1711
449-
#define IDM_DISABLE 1712
450-
#define IDM_VIEW 1713
451-
#define IDM_TEMP_EXPLAIN 1714
452-
#define IDM_PIN_ON_TOP 1715
453-
454-
#define IDM_ADD 1716
455-
#define IDM_REFRESH 1717
456-
#define IDM_ENABLE_ALL 1718
457-
#define IDM_DISABLE_ALL 1719
458-
459-
#define IDM_VALUE_VIEW 1720
460-
#define IDM_VALUE_EDIT 1721
461-
#define IDM_VALUE_NULL 1722
462-
#define IDM_ROW_ADD 1723
463-
#define IDM_ROW_EDIT 1724
464-
#define IDM_ROW_DELETE 1725
465-
#define IDM_ROW_REFRESH 1726
466-
#define IDM_ROW_DUPLICATE 1727
467-
#define IDM_LAST_SEPARATOR 1728
468-
#define IDM_EXPORT_PNG 1729
469-
#define IDM_EXPORT_CLIPBOARD 1730
470-
#define IDM_EXPORT_FILE 1731
471-
#define IDM_FILTER_TYPE 1732
472-
#define IDM_COMPARE_TEXTS 1733
473-
#define IDM_CHART_RESET 1734
474-
475-
#define IDM_CLI_COPY 1740
476-
#define IDM_CLI_CUT 1741
477-
#define IDM_CLI_CLEAR_ALL 1742
478-
479-
#define IDM_PREV_DIALOG 1750
480-
#define IDM_NEXT_DIALOG 1751
481-
482-
#define IDM_TEST 1760
471+
#define IDM_DIAGRAM 1706
472+
#define IDM_DUPLICATE 1707
473+
#define IDM_GENERATE 1708
474+
#define IDM_TRANSFORM 1709
475+
#define IDM_ADD_COLUMN 1710
476+
#define IDM_ADD_INDEX 1711
477+
#define IDM_ERASE_DATA 1712
478+
#define IDM_DDL 1713
479+
#define IDM_ENABLE 1714
480+
#define IDM_DISABLE 1715
481+
#define IDM_VIEW 1716
482+
#define IDM_TEMP_EXPLAIN 1717
483+
#define IDM_PIN_ON_TOP 1718
484+
485+
#define IDM_ADD 1720
486+
#define IDM_REFRESH 1721
487+
#define IDM_ENABLE_ALL 1722
488+
#define IDM_DISABLE_ALL 1723
489+
490+
#define IDM_VALUE_VIEW 1730
491+
#define IDM_VALUE_EDIT 1731
492+
#define IDM_VALUE_NULL 1732
493+
#define IDM_ROW_ADD 1733
494+
#define IDM_ROW_EDIT 1734
495+
#define IDM_ROW_DELETE 1735
496+
#define IDM_ROW_REFRESH 1736
497+
#define IDM_ROW_DUPLICATE 1737
498+
#define IDM_LAST_SEPARATOR 1738
499+
#define IDM_EXPORT_PNG 1739
500+
#define IDM_EXPORT_CLIPBOARD 1740
501+
#define IDM_EXPORT_FILE 1741
502+
#define IDM_FILTER_TYPE 1742
503+
#define IDM_COMPARE_TEXTS 1743
504+
#define IDM_CHART_RESET 1744
505+
#define IDM_ISOLATE 1745
506+
507+
#define IDM_CLI_COPY 1750
508+
#define IDM_CLI_CUT 1751
509+
#define IDM_CLI_CLEAR_ALL 1752
510+
511+
#define IDM_SHOW_FKLINKS 1765
512+
#define IDM_SHOW_COLTYPES 1766
513+
#define IDM_SHOW_REASONS 1767
514+
515+
#define IDM_PREV_DIALOG 1770
516+
#define IDM_NEXT_DIALOG 1771
517+
518+
#define IDM_TEST 1780
483519

484520
#define IDM_RESULT_COMPARE 1800 // iterable, 100
485521
#define IDM_RESULT_MODIFIER 1900 // iterable, MAX_PLUGIN_COUNT
@@ -514,6 +550,7 @@
514550
#define IDT_HIGHLIGHT 7001
515551
#define IDT_REFERENCE 7002
516552
#define IDT_EDITOR 7003
553+
#define IDT_DIAGRAM_INPUT 7004
517554

518555
#define IDR_INIT 9000
519556
#define IDR_HELP 9001
@@ -533,7 +570,8 @@
533570
#define IDS_ATTACH_ODBC_HELP 10017
534571
#define IDS_CLI_HELP 10018
535572
#define IDS_FUNCTIONS_HELP 10019
536-
#define IDS_TEMP_EXPLAIN 10020
573+
#define IDS_REFERENCES_HELP 10020
574+
#define IDS_TEMP_EXPLAIN 10021
537575
#define IDS_TOOLTIP_OPEN IDM_OPEN
538576
#define IDS_TOOLTIP_CLOSE IDM_CLOSE
539577
#define IDS_TOOLTIP_SAVE IDM_SAVE
@@ -544,6 +582,10 @@
544582
#define IDS_TOOLTIP_ROW_ADD IDM_ROW_ADD
545583
#define IDS_TOOLTIP_ROW_DELETE IDM_ROW_DELETE
546584
#define IDS_TOOLTIP_FILTER_TYPE IDM_FILTER_TYPE
585+
#define IDS_DIAGRAM_LINKS_ERROR 10025
586+
#define IDS_TRANSPOSE_ERROR 10030
587+
#define IDS_CONVERT_TO_MATRIX_ERROR 10031
588+
#define IDS_CONVERT_TO_3COLUMNS_ERROR 10032
547589

548590
#define WMU_SET_DLG_ROW_DATA WM_USER + 1
549591
#define WMU_UPDATE_DATA WM_USER + 2
@@ -568,7 +610,7 @@
568610
#define WMU_CIPHER_CHANGED WM_USER + 21
569611
#define WMU_SET_VALUE WM_USER + 22
570612
#define WMU_GET_VALUE WM_USER + 23
571-
#define WMU_SET_ICON WM_USER + 24
613+
#define WMU_SET_ECRYPT_FLAG WM_USER + 24
572614
#define WMU_OPEN_NEW_TAB WM_USER + 25
573615
#define WMU_UPDATE_CARET_INFO WM_USER + 26
574616
#define WMU_UPDATE_CHART WM_USER + 27
@@ -582,7 +624,9 @@
582624
#define WMU_UPDATE_PREVIEW WM_USER + 35
583625
#define WMU_RESET_PREVIEW WM_USER + 36
584626
#define WMU_RESET_CACHE WM_USER + 37
585-
#define WMU_FUNCTION_SAVE WM_USER + 40
627+
#define WMU_FUNCTION_SAVE WM_USER + 39
628+
#define WMU_SAVE_REFERENCE WM_USER + 40
629+
#define WMU_UPDATE_REFERENCES WM_USER + 41
586630
#define WMU_UPDATE_RESULTSET WM_USER + 43
587631
#define WMU_UPDATE_FILTER_SIZE WM_USER + 44
588632
#define WMU_SET_HEADER_FILTERS WM_USER + 45
@@ -600,6 +644,13 @@
600644
#define WMU_ADD_EMPTY_ROW WM_USER + 61
601645
#define WMU_TEST WM_USER + 62
602646
#define WMU_RESET_MODIFIER WM_USER + 63
647+
#define WMU_GET_TABLE WM_USER + 64
648+
#define WMU_RECALC_WIDTH WM_USER + 65
649+
#define WMU_GET_DIAGRAM_RECT WM_USER + 66
650+
#define WMU_TRANSFORM_TRANSPOSE WM_USER + 67
651+
#define WMU_TRANSFORM_TO_MATRIX WM_USER + 68
652+
#define WMU_TRANSFORM_TO_3COLUMNS WM_USER + 69
653+
603654

604655
// ricedit.h has own WM_USER + N message, but N less 210
605656
#define WMU_HIGHLIGHT WM_USER + 260

0 commit comments

Comments
 (0)