Skip to content

Commit

Permalink
Show function name
Browse files Browse the repository at this point in the history
Just as we do for relation name

Fixes #475
  • Loading branch information
pgiraud committed Aug 22, 2024
1 parent 97781ba commit c85b198
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/components/GridRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,14 @@ function formattedProp(propName: keyof typeof NodeProp) {
</b>

<span class="text-body-secondary">
<template v-if="node[NodeProp.RELATION_NAME]">
<template
v-if="node[NodeProp.RELATION_NAME] || node[NodeProp.FUNCTION_NAME]"
>
<span class="text-secondary">on</span>
<span v-if="node[NodeProp.SCHEMA]"
>{{ node[NodeProp.SCHEMA] }}.</span
>{{ node[NodeProp.RELATION_NAME] }}
>{{ node[NodeProp.RELATION_NAME]
}}{{ node[NodeProp.FUNCTION_NAME] }}
<span v-if="node[NodeProp.ALIAS]">
<span class="text-secondary">as</span>
{{ node[NodeProp.ALIAS] }}
Expand Down
5 changes: 4 additions & 1 deletion src/components/PlanNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,16 @@ function centerCte() {
</header>
<div class="text-start font-monospace">
<div
v-if="node[NodeProp.RELATION_NAME]"
v-if="
node[NodeProp.RELATION_NAME] || node[NodeProp.FUNCTION_NAME]
"
:class="{ 'line-clamp-2': !showDetails }"
>
<span class="text-secondary">on</span>
<span v-if="node[NodeProp.SCHEMA]"
>{{ node[NodeProp.SCHEMA] }}.</span
>{{ node[NodeProp.RELATION_NAME] }}
{{ node[NodeProp.FUNCTION_NAME] }}
<span v-if="node[NodeProp.ALIAS]">
<span class="text-secondary">as</span>
{{ node[NodeProp.ALIAS] }}
Expand Down
1 change: 1 addition & 0 deletions src/services/help-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ const notMiscProperties: string[] = [
"size", // Manually added to use FlexTree
NodeProp.RELATION_NAME,
NodeProp.ALIAS,
NodeProp.FUNCTION_NAME,
]

export function shouldShowProp(key: string, value: unknown): boolean {
Expand Down

0 comments on commit c85b198

Please sign in to comment.