Skip to content
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

Dev normalize predicate #804

Merged
merged 16 commits into from
Jan 22, 2024
Merged

Conversation

gem-neo4j
Copy link
Contributor

@gem-neo4j gem-neo4j commented Nov 30, 2023

Add a new Normalization Predicate Expression.

RETURN "string" IS NORMALIZED;

@neo-technology-commit-status-publisher
Copy link
Collaborator

This PR includes documentation updates.

You can view the updated docs at https://neo4j-docs-cypher-804.surge.sh

@gem-neo4j gem-neo4j force-pushed the dev_normalize_predicate branch from bb83ebc to 8160b01 Compare December 7, 2023 09:57
@gem-neo4j gem-neo4j force-pushed the dev_normalize_predicate branch from 8160b01 to 0cf84ca Compare January 3, 2024 10:38
@gem-neo4j gem-neo4j added the 5.17 label Jan 3, 2024
@gem-neo4j gem-neo4j force-pushed the dev_normalize_predicate branch from 0cf84ca to d9d1c96 Compare January 9, 2024 09:48
Copy link
Contributor

@JPryce-Aklundh JPryce-Aklundh left a comment

Choose a reason for hiding this comment

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

Thanks @gem-neo4j - looks good overall.
I think it might be a good idea, however, to include more about the purposes of normalization. From the examples thus far included, I was not sure when/why Id want to do this (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize - this made it more clear, and maybe we can take some inspiration from it). I don't think we need to say lots on this. Also, I think we should mention something about the different normalization forms. Let's talk about it when you are feeling better again :)

modules/ROOT/pages/clauses/where.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/clauses/where.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
@gem-neo4j gem-neo4j force-pushed the dev_normalize_predicate branch 2 times, most recently from 6143950 to e6cc76f Compare January 17, 2024 08:26
modules/ROOT/pages/clauses/where.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
@gem-neo4j gem-neo4j force-pushed the dev_normalize_predicate branch from e6cc76f to 903e6cf Compare January 17, 2024 10:21
@gem-neo4j gem-neo4j marked this pull request as ready for review January 17, 2024 10:23
Copy link
Contributor

@AzuObs AzuObs left a comment

Choose a reason for hiding this comment

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

Great work. I had a few nitpicks!

@@ -338,6 +338,35 @@ The `name` and `age` for `Peter` are are returned because his name contains "ete
|===


[[match-string-is-normalized]]
=== Checking if a `STRING` `IS NORMALIZED`
Copy link
Contributor

Choose a reason for hiding this comment

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

"STRING" has mostly been written as "string" in other headers

[[match-string-is-normalized]]
=== Checking if a `STRING` `IS NORMALIZED`

The `IS NORMALIZED` operator is used to check whether the given `STRING` is in the `NFC` Unicode normalization form:
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment about STRING - usually just written as "string" on this page

Copy link
Contributor

Choose a reason for hiding this comment

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

I will fix this in a separate PR (have carded it) - it should be STRING as per the new formatting style. This page in general is in a pretty dire need of restructuring, so will try to get to it sooner rather than later. I think @gem-neo4j PR can go in as is for now.

In Unicode, a codepoint for a character that looks the same may be represented by two, or more, different codepoints.
For example, the character `<` can be represented as `\uFE64` (﹤) or `\u003C` (<).
To the human eye, the characters may appear identical.
However, if compared, Cypher will return false as `\uFE64` does not equal `\u003C`.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Cypher" appears as "Cypher (r)" here but not on other pages. I find this a bit inconsistent although I don't think that's a problem Gem could fix...

cc. @JPryce-Aklundh

Copy link
Contributor

Choose a reason for hiding this comment

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

The first time that Cypher is mentioned on each page, we have to add that to show its status as a registered trademark. A way to fix it would be to mention Cypher earlier in the page. Will have a look.

@@ -148,6 +148,173 @@ RETURN ltrim(' hello')

======


Copy link
Contributor

Choose a reason for hiding this comment

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

I leave this entirely to your discretion, but the IS NORMALIZED section has a link to the normalize() function but not the other way around.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good suggestion @AzuObs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah nice, I can add that in :)

modules/ROOT/pages/functions/index.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/functions/string.adoc Outdated Show resolved Hide resolved
modules/ROOT/pages/syntax/operators.adoc Outdated Show resolved Hide resolved
@neo-technology-commit-status-publisher
Copy link
Collaborator

Thanks for the documentation updates.

The preview documentation has now been torn down - reopening this PR will republish it.

@JPryce-Aklundh JPryce-Aklundh merged commit b55982d into neo4j:dev Jan 22, 2024
5 checks passed
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.

4 participants