File tree Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,12 @@ import {
5757 killQueriesProcedure ,
5858 listQueriesProcedure
5959} from 'shared/modules/cypher/queriesProcedureHelper'
60- import { getRawVersion , hasProcedure } from 'shared/modules/dbMeta/dbMetaDuck'
60+ import {
61+ getRawVersion ,
62+ hasProcedure ,
63+ isOnCausalCluster
64+ } from 'shared/modules/dbMeta/dbMetaDuck'
6165import { getDefaultBoltScheme } from 'shared/modules/features/versionedFeatures'
62- import { isOnCausalCluster } from 'shared/utils/selectors'
6366
6467type QueriesFrameState = {
6568 queries : any [ ]
Original file line number Diff line number Diff line change @@ -48,11 +48,11 @@ import {
4848 getDatabases ,
4949 getMetricsNamespacesEnabled ,
5050 getMetricsPrefix ,
51- isEnterprise
51+ isEnterprise ,
52+ isOnCausalCluster
5253} from 'shared/modules/dbMeta/dbMetaDuck'
5354import { hasMultiDbSupport } from 'shared/modules/features/versionedFeatures'
5455import { Frame } from 'shared/modules/frames/framesDuck'
55- import { isOnCausalCluster } from 'shared/utils/selectors'
5656
5757export type DatabaseMetric = { label : string ; value ?: string }
5858export type SysInfoFrameState = {
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ import {
3737 SYSTEM_DB ,
3838 metaQuery ,
3939 serverInfoQuery ,
40- VERSION_FOR_CLUSTER_ROLE_IN_SHOW_DB
40+ VERSION_FOR_CLUSTER_ROLE_IN_SHOW_DB ,
41+ isOnCausalCluster
4142} from './dbMetaDuck'
4243import {
4344 Database ,
@@ -71,7 +72,6 @@ import {
7172} from 'shared/modules/connections/connectionsDuck'
7273import { clearHistory } from 'shared/modules/history/historyDuck'
7374import { backgroundTxMetadata } from 'shared/services/bolt/txMetadata'
74- import { isOnCausalCluster } from 'shared/utils/selectors'
7575import {
7676 getListFunctionQuery ,
7777 getListProcedureQuery
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import { guessSemverVersion } from './featureDuck.utils'
2525import { GlobalState } from 'project-root/src/shared/globalState'
2626
2727const NEO4J_4_0 = '4.0.0-alpha01'
28+ const NEO4J_5_0 = '4.0.0-alpha01'
2829
2930export const FIRST_MULTI_DB_SUPPORT = NEO4J_4_0
3031// Keep the following as 3.4.0 as 3.5.X has a
@@ -50,6 +51,10 @@ export const getDbClusterRole = (state: GlobalState) => {
5051 if ( ! semver . valid ( serverVersion ) ) {
5152 return pre4
5253 }
54+ if ( serverVersion && semver . gte ( serverVersion , NEO4J_5_0 ) ) {
55+ const db = getUseDb ( state )
56+ return `SHOW DATABASES YIELD role, name WHERE name = "${ db } "`
57+ }
5358 if ( serverVersion && semver . gte ( serverVersion , NEO4J_4_0 ) ) {
5459 const db = getUseDb ( state )
5560 return `CALL dbms.cluster.role("${ db } ") YIELD role`
You can’t perform that action at this time.
0 commit comments