From e26eba065e82a741b3b3c8dfcc4cddd01409e21f Mon Sep 17 00:00:00 2001 From: Leonardo <leomilho@gmail.com> Date: Wed, 26 Jun 2024 16:42:08 +0200 Subject: [PATCH] chore(qb): change # conn to # Connections --- .../lib/querybuilder/model/graphology/metaAttributes.ts | 4 ++-- libs/shared/lib/querybuilder/model/graphology/utils.ts | 2 +- libs/shared/lib/querybuilder/query-utils/query2backend.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/shared/lib/querybuilder/model/graphology/metaAttributes.ts b/libs/shared/lib/querybuilder/model/graphology/metaAttributes.ts index 6a6a279f3..4c34d0884 100644 --- a/libs/shared/lib/querybuilder/model/graphology/metaAttributes.ts +++ b/libs/shared/lib/querybuilder/model/graphology/metaAttributes.ts @@ -3,8 +3,8 @@ import { Handles, QueryElementTypes } from '../reactflow'; import { QueryGraphEdgeAttribute, QueryGraphEdgeHandle, QueryGraphNodes } from './model'; const metaAttribute: Record<string, QueryGraphEdgeAttribute> = { - '(# conn)': { - attributeName: '(# conn)', + '(# Connection)': { + attributeName: '(# Connection)', attributeType: 'float', attributeDimension: 'numerical', }, diff --git a/libs/shared/lib/querybuilder/model/graphology/utils.ts b/libs/shared/lib/querybuilder/model/graphology/utils.ts index 11f21580a..c2d3ae399 100644 --- a/libs/shared/lib/querybuilder/model/graphology/utils.ts +++ b/libs/shared/lib/querybuilder/model/graphology/utils.ts @@ -56,7 +56,7 @@ export class QueryMultiGraphology extends Graph<QueryGraphNodes, QueryGraphEdges attributes.attributes = attributes.attributes || []; - // Add to the beginning the meta attributes, such as (# conn) + // Add to the beginning the meta attributes, such as (# Connection) attributes.attributes = [...checkForMetaAttributes(attributes).map((a) => ({ handleData: a })), ...attributes.attributes]; return attributes; diff --git a/libs/shared/lib/querybuilder/query-utils/query2backend.ts b/libs/shared/lib/querybuilder/query-utils/query2backend.ts index e65308ca8..fc1aa9942 100644 --- a/libs/shared/lib/querybuilder/query-utils/query2backend.ts +++ b/libs/shared/lib/querybuilder/query-utils/query2backend.ts @@ -139,7 +139,7 @@ export function calculateQueryLogic( if (!connectionToInputRef.attributes?.sourceHandleData) throw Error('Malformed Graph! Logic node is connected but has no sourceHandleData'); // Is connected to entity or relation node - if (connectionToInputRef.attributes.sourceHandleData.attributeName === '(# conn)') { + if (connectionToInputRef.attributes.sourceHandleData.attributeName === '(# Connection)') { return ['Count', `@${connectionToInputRef.attributes.sourceHandleData.nodeId}`]; } return `@${connectionToInputRef.attributes.sourceHandleData.nodeId}.${connectionToInputRef.attributes.sourceHandleData.attributeName}`; -- GitLab