Skip to content

Cypher25 default language #2372

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

Open
wants to merge 60 commits into
base: cypher-25
Choose a base branch
from

Conversation

renetapopova
Copy link
Collaborator

Replaces #2153

Copy link
Contributor

@Hunterness Hunterness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only got started on the review, have looked at 11/21 files and have all the big ones left. But figured I'd post the comments I have so far as I'm pausing for the day.


=== Alter a database

[.tabbed-example]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there actually any syntax differences in alter that would require the tabbed examples? 🤔 the previous PR didn't do tabs for alter 🤷

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have SET DEFAULT LANGUAGE CYPHER {5\|25} now? If yes, from which version of the server is it available? It's not in the docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marks PR was the one to add it to docs so yeah, it's not documented yet...

The command has been merged to both Cypher 5 and 25, but only the SET ... 5 version is generally available as the 25 option is hidden behind the cypher 25 feature flag. We decided that we didn't want to add it to documentation until both values were available, and then document that it exists in both Cypher 5 and Cypher 25.

So for both create and alter, all 4 of:

CYPHER 5 CREATE/ALTER DATABASE foo SET DEFAULT LANGUAGE CYPHER 5
CYPHER 5 CREATE/ALTER DATABASE foo SET DEFAULT LANGUAGE CYPHER 25
CYPHER 25 CREATE/ALTER DATABASE foo SET DEFAULT LANGUAGE CYPHER 5
CYPHER 25 CREATE/ALTER DATABASE foo SET DEFAULT LANGUAGE CYPHER 25 

will be valid once we release Cypher 25, but at the moment only

CYPHER 5 CREATE/ALTER DATABASE foo SET DEFAULT LANGUAGE CYPHER 5

is, hence us skipping documenting it until all 4 is allowed if that makes sense

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is true only if you are running a server on a version before 2025.06, right? Would it be true if you're on 2025.05, 2025.04, etc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because if they are on a version, let's say 2025.03, SET DEFAULT LANGUAGE won't be available at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment can be resolved, but let's reply to the questions first:

But this is true only if you are running a server on a version before 2025.06, right? Would it be true if you're on 2025.05, 2025.04, etc?
Because if they are on a version, let's say 2025.03, SET DEFAULT LANGUAGE won't be available at all.

Officially yes, it should only be available from 2025.06 and forward for both Cypher 5 and Cypher 25. Unofficially, there is some versions where CREATE/ALTER DATABASE foo SET DEFAULT LANGUAGE CYPHER 5 is available earlier than that as well but we don't care to document/say that it was so, it's neater to just say both became available now 🤷

Copy link
Contributor

@Hunterness Hunterness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still have 2 files left to look at, the privilege file (how did you get over 700 lines changed from our 90 something on the previous PR? XD) and the manage aliases for standard database file (only like 200 more lines changed than the previous PR :P)

Copy link
Contributor

@Hunterness Hunterness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of alias page

Copy link
Contributor

@Hunterness Hunterness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Started on the privilege file updates

Copy link
Contributor

@Hunterness Hunterness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next chunk of the privilege file updates

Copy link
Contributor

@Hunterness Hunterness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got through the file, now everything have been looked at once

@renetapopova
Copy link
Collaborator Author

renetapopova commented Jun 24, 2025

@Hunterness, could you please check where it should be SET DEFAULT LANGUAGE CYPHER {5|25}, [SET DEFAULT LANGUAGE CYPHER {5|25}], [DEFAULT LANGUAGE CYPHER {5|25}], DEFAULT LANGUAGE CYPHER {5|25}? I think they are inconsistent across Cypher 5 and Cypher 25, as well as across commands.

@mnd999
Copy link
Contributor

mnd999 commented Jun 24, 2025

@renetapopova just checking, you do know that SET DEFAULT LANGUAGE is also in Cypher 5?

@renetapopova
Copy link
Collaborator Author

@renetapopova just checking, you do know that SET DEFAULT LANGUAGE is also in Cypher 5?

Is this a question to my question above or separate?

@renetapopova
Copy link
Collaborator Author

In some places, it is with SET, in some without. Sometimes, it's optional, and sometimes, it's not. Hence, my question above.

@mnd999
Copy link
Contributor

mnd999 commented Jun 24, 2025

@renetapopova separate. I haven't been able to find the Cypher 5 docs for the release, and tracking the PR history is quite tricky. I want to make sure we documented SET DEFAULT LANGUAGE in both language versions.

From looking at the parser, SET is mandatory on ALTER DATABASE, and from Cypher 25 optional on CREATE DATABASE

…ses-standard-databases.adoc

Co-authored-by: Therese Magnusson <[email protected]>
Copy link
Contributor

@Hunterness Hunterness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some extra comments from review of neo4j/docs-cypher#1327

|===

[rol=label--new-2025.06]
=== Grant privilege to modify composite databases
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might need a tag to be able to link to this page, see: neo4j/docs-cypher#1327 (comment)

Copy link
Contributor

@Hunterness Hunterness Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you resolved it without adding a tag or a comment saying you skipped it 🤷 (and if you have just fixed it locally I guess I'll re-resolve it once you've pushed that and I've checked it off :P)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the anchor [[grant-privilege-alter-composite-database]] so that we can link to it. What do you mean by tag?

For example:

[source, cypher, role=noplay]
----
GRANT SET AUTH ON DBMS TO userModifier
GRANT SET AUTH ON DBMS TO authModifier
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just be aware hat you need to update the rest of the example to match with the new name as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what you mean

Comment on lines 32 to 34
* label:new[Introduced in 2025.06] Setting a default Cypher version for queries to the remote database.
+
Remote database aliases require configuration to safely connect to the remote target, which is described in xref::database-administration/aliases/remote-database-alias-configuration.adoc[Connecting remote databases].
It is not possible to impersonate a user on the remote database or to execute an administration command on the remote database via a remote database alias.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that got worse
image

@renetapopova renetapopova requested a review from Hunterness June 27, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants