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

Expose getPrimaryKeys() API at HollowStateEngine #474

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

davesu
Copy link
Contributor

@davesu davesu commented Jul 14, 2020

There are many use cases of HollowStateEngine's Primary Keys so instead of having many projects copy/paste code, it would be great to have it part of HollowStateEngine itself.

@davesu davesu requested review from a user, akhaku, dkoszewnik and Sunjeet July 14, 2020 21:00
default PrimaryKey getPrimaryKey(String typeName) {
PrimaryKey pk=null;
HollowSchema schema = getSchema(typeName);
if (schema.getSchemaType() == HollowSchema.SchemaType.OBJECT) {
Copy link
Contributor

@Sunjeet Sunjeet Jul 16, 2020

Choose a reason for hiding this comment

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

nit: null check here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants