From 53514c978b9f66acee163b693b69688509a23a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Damkj=C3=A6r?= Date: Fri, 5 Apr 2024 16:49:41 +0200 Subject: [PATCH] fix old syntax in favorite (#1965) --- src/shared/modules/favorites/staticScripts.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/shared/modules/favorites/staticScripts.ts b/src/shared/modules/favorites/staticScripts.ts index 75f5ad9ea22..ae67f28686e 100644 --- a/src/shared/modules/favorites/staticScripts.ts +++ b/src/shared/modules/favorites/staticScripts.ts @@ -96,7 +96,24 @@ REQUIRE n. IS UNIQUE`, folder: 'profile', content: '// What kind of nodes exist\n// Sample some nodes, reporting on property and relationship counts per node.\nMATCH (n) WHERE rand() <= 0.1\nRETURN\nDISTINCT labels(n),\ncount(*) AS SampleSize,\navg(size(keys(n))) as Avg_PropertyCount,\nmin(size(keys(n))) as Min_PropertyCount,\nmax(size(keys(n))) as Max_PropertyCount,\navg(size( (n)-[]-() ) ) as Avg_RelationshipCount,\nmin(size( (n)-[]-() ) ) as Min_RelationshipCount,\nmax(size( (n)-[]-() ) ) as Max_RelationshipCount', - versionRange: '>=3' + versionRange: '>=3 <5' + }, + { + folder: 'profile', + content: `// What kind of nodes exist +// Sample some nodes, reporting on property and relationship counts per node. +MATCH (n) WHERE rand() <= 0.1 +RETURN +DISTINCT labels(n), +count(*) AS SampleSize, +avg(size(keys(n))) as Avg_PropertyCount, +min(size(keys(n))) as Min_PropertyCount, +max(size(keys(n))) as Max_PropertyCount, +avg(count{ (n)-[]-() } ) as Avg_RelationshipCount, +min(count{ (n)-[]-() } ) as Min_RelationshipCount, +max(count{ (n)-[]-() } ) as Max_RelationshipCount +`, + versionRange: '>=5' }, { folder: 'profile',