-
Notifications
You must be signed in to change notification settings - Fork 11
Fixes cypher 25 check for semver servers #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
}> { | ||
const query = 'CALL dbms.components() YIELD versions'; | ||
const query = 'CALL dbms.components() YIELD name, versions'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
originally I wanted this query to end with : WHERE name = "Cypher" RETURN versions
but this fails on system db.
Instead I opted to sort out the "Cypher" row and "versions" column in the resulttransformer.
/** | ||
* Get dbms version | ||
*/ | ||
export function getVersion(): ExecuteQueryArgs<{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This old method became unused so I removed it, though I will reintroduce it in the "switch lintWorker" PR where we will once more want to match based off server version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are going to reintroduce the method later on, please don't delete it
export function getVersion(): ExecuteQueryArgs<{ | ||
serverVersion: string | undefined; | ||
export function getCypherVersions(): ExecuteQueryArgs<{ | ||
cypherVersions: string[] | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should call this serverCypherVersions
so it's clear what it means
New servers produce this from
dbms.components()
:Since
semver.coerce(...)
expects a string without zero-padding this format for neo4j server semvers break the coercion in the check for whether the server supports Cypher 25.This PR switches so we use the new "Cypher" row returned from
dbms.components()
, in accordance with this comment