-
Notifications
You must be signed in to change notification settings - Fork 153
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
Refactor Cypher.Map #3147
Refactor Cypher.Map #3147
Conversation
🦋 Changeset detectedLatest commit: 633d713 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
You have successfully added a new CodeQL configuration |
Performance ReportNo Performance Changes Show Full Table
Old Schema Generation: 49.689s |
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.
LGTM, left some minor comments.
I just drop something that I have in mind for this area.
As future improvements, I suggest accepting entries
as a parameter, to avoid the client potentially building a Record from a list of entries
that will be destructured in an array of entries
anyway in Cypher Builder, an example of that is present in create-projection-and-params.ts
where it could be easier to refactor with Cypher Builder if Map Projection accepts a list of entries
, from create-projection-and-params.ts
if (alias !== field.name || dbFieldName !== field.name || literalElements) {
res.projection.push(
new Cypher.RawCypher(
(env) =>
`${alias}: ${varName.property(dbFieldName).getCypher(env)}`
)
);
}
@MacondoExpress |
Description
This is a brief refactor of
Cypher.Map
andCypher.MapProjection
to use aMap
internally to better match the actual use case and add support for.size()
method.