From 15c400747e75def1680e5bac7afb23a70ce48f94 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Wed, 11 Sep 2024 08:48:15 +0200 Subject: [PATCH] table engine shown in object tree --- .../web/src/appobj/DatabaseObjectAppObject.svelte | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/web/src/appobj/DatabaseObjectAppObject.svelte b/packages/web/src/appobj/DatabaseObjectAppObject.svelte index e12c5406..4dbd0d08 100644 --- a/packages/web/src/appobj/DatabaseObjectAppObject.svelte +++ b/packages/web/src/appobj/DatabaseObjectAppObject.svelte @@ -860,6 +860,18 @@ return createDatabaseObjectMenu(data, passProps?.connection); } + function getExtInfo(data) { + const res = []; + if (data.tableRowCount != null) { + res.push(`${formatRowCount(data.tableRowCount)} rows`); + } + if (data.tableEngine) { + res.push(data.tableEngine); + } + if (res.length > 0) return res.join(', '); + return null; + } + $: isPinned = !!$pinnedTables.find(x => testEqual(data, x)); @@ -873,7 +885,7 @@ showPinnedInsteadOfUnpin={passProps?.showPinnedInsteadOfUnpin} onPin={isPinned ? null : () => pinnedTables.update(list => [...list, data])} onUnpin={isPinned ? () => pinnedTables.update(list => list.filter(x => !testEqual(x, data))) : null} - extInfo={data.tableRowCount != null ? `${formatRowCount(data.tableRowCount)} rows` : null} + extInfo={getExtInfo(data)} on:click={() => handleClick()} on:middleclick={() => handleClick(true)} on:expand