-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix #240: surround String-valued DocumentId in single quotes #241
Conversation
@@ -64,7 +64,7 @@ public static Map<QueryOuterClass.Value, QueryOuterClass.Value> getDoubleMapValu | |||
public static List<QueryOuterClass.Value> getDocumentIdValue(DocumentId documentId) { | |||
// Temporary implementation until we convert it to Tuple in DB | |||
List<QueryOuterClass.Value> tupleValues = | |||
List.of(Values.of(documentId.typeId()), Values.of(documentId.toString())); | |||
List.of(Values.of(documentId.typeId()), Values.of(documentId.asDBKey())); |
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.
Necessary to avoid single-quotes from being added wrt DocumentId.toString()
change: also semantically good to have separate method for use case.
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
LGTM |
What this PR does:
Enclose
String
-valuedDocumentId
in single quotes, for use in Exception messages -- avoids confusion wrt id type, contents.Also adds a separate method to use for constructing DB primary keys, instead of
Document.toString()
.Which issue(s) this PR fixes:
Fixes #240
Checklist