Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Spanner struct pojo query arg #826

Merged
merged 3 commits into from
Jul 9, 2018
Merged

Spanner struct pojo query arg #826

merged 3 commits into from
Jul 9, 2018

Conversation

ChengyuanZhao
Copy link
Contributor

fixes #787

@ChengyuanZhao ChengyuanZhao added this to the 1.1.0.M1 milestone Jul 2, 2018
@ChengyuanZhao ChengyuanZhao self-assigned this Jul 2, 2018
@ChengyuanZhao ChengyuanZhao requested a review from meltsufin July 2, 2018 21:10
@ChengyuanZhao
Copy link
Contributor Author

@meltsufin added doc update, supports STRUCTs in queries (including in WHERE clauses with the limitations mentioned earlier https://cloud.google.com/spanner/docs/data-types#limited-comparisons-for-struct). PTAL

@ChengyuanZhao ChengyuanZhao requested a review from dmitry-s July 3, 2018 15:02
@ChengyuanZhao
Copy link
Contributor Author

@meltsufin @dmitry-s PTAL

throw new IllegalArgumentException("Param: " + param.toString()
+ " is not a supported type: " + param.getClass());
// try to convert the param object into a Struct
String errorMessage = "Param: " + param.toString()
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to create this String object only if it will be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@dmitry-s dmitry-s left a comment

Choose a reason for hiding this comment

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

LGTM

@ChengyuanZhao ChengyuanZhao merged commit 5a9ea9b into master Jul 9, 2018
@ChengyuanZhao ChengyuanZhao deleted the spanner-struct-where branch July 9, 2018 20:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

Struct args in Spanner queries
3 participants