clickhouse: show sorting key

This commit is contained in:
SPRINX0\prochazka
2024-09-10 16:14:25 +02:00
parent 18e6200c3b
commit 5c50faa0a2
3 changed files with 25 additions and 5 deletions

View File

@@ -144,6 +144,7 @@
$: columns = tableInfo?.columns;
$: primaryKey = tableInfo?.primaryKey;
$: sortingKey = tableInfo?.sortingKey;
$: foreignKeys = tableInfo?.foreignKeys;
$: dependencies = tableInfo?.dependencies;
$: indexes = tableInfo?.indexes;
@@ -273,6 +274,23 @@
>
</ObjectListControl>
{#if sortingKey}
<ObjectListControl
collection={[sortingKey]}
title="Sorting key"
columns={[
{
fieldName: 'columns',
header: 'Columns',
slot: 0,
},
]}
>
<svelte:fragment slot="name" let:row><ConstraintLabel {...row} /></svelte:fragment>
<svelte:fragment slot="0" let:row>{row?.columns.map(x => x.columnName).join(', ')}</svelte:fragment>
</ObjectListControl>
{/if}
<ObjectListControl
collection={indexes}
onAddNew={isWritable && columns?.length > 0 ? addIndex : null}