-
Notifications
You must be signed in to change notification settings - Fork 130
feat: support client-side hints for tags and priority #3005
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
Conversation
Supports including a hint in the SQL string to set a statement tag or an RPC priority for a single SQL statement in the Connection API. This makes it easier to use these features from frameworks and tools that only support SQL statements.
* started by a prefix with the given length (e.g. either '#' or '--'). | ||
*/ | ||
@VisibleForTesting | ||
boolean skipSingleLineComment(int prefixLength) { |
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.
Would it be possible to somehow refactor and re-use skipSingleLineComment
and skipMultiLineComment
defined in AbstractStatementParser
?
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.
Good point. But I've modified it to be the other way around; AbstractStatementParser
now uses the implementation in SimpleParser
. The long-term goal is to replace AbstractStatementParser
(which is largely regex based) with SimpleParser
(which is token based).
* Returns true if the given character is valid as the first character of an identifier. That | ||
* means that it can be used as the first character of an unquoted identifier. | ||
*/ | ||
private boolean isValidIdentifierFirstChar(char c) { |
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.
The methods isValidIdentifierFirstChar
and isValidIdentifierChar
already exist in AbstractStatementParser
. Is there a way to re-use?
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.
Yes. Same here; the implementation in SimpleParser
is preferred.
🤖 I have created a release *beep* *boop* --- ## [6.65.0](https://togithub.com/googleapis/java-spanner/compare/v6.64.0...v6.65.0) (2024-04-20) ### Features * Remove grpclb ([#2760](https://togithub.com/googleapis/java-spanner/issues/2760)) ([1df09d9](https://togithub.com/googleapis/java-spanner/commit/1df09d9b9189c5527de91189a063ecc15779ac77)) * Support client-side hints for tags and priority ([#3005](https://togithub.com/googleapis/java-spanner/issues/3005)) ([48828df](https://togithub.com/googleapis/java-spanner/commit/48828df3489465bb53a18be50808fbd435f3e896)), closes [#2978](https://togithub.com/googleapis/java-spanner/issues/2978) ### Bug Fixes * **deps:** Update the Java code generator (gapic-generator-java) to 2.39.0 ([#3001](https://togithub.com/googleapis/java-spanner/issues/3001)) ([6cec1bf](https://togithub.com/googleapis/java-spanner/commit/6cec1bf1bb44a52c62c2310447c6a068a88209ea)) * NullPointerException on AbstractReadContext.span ([#3036](https://togithub.com/googleapis/java-spanner/issues/3036)) ([55732fd](https://togithub.com/googleapis/java-spanner/commit/55732fd107ac1d3b8c16eee198c904d54d98b2b4)) ### Dependencies * Update dependency com.google.cloud:sdk-platform-java-config to v3.29.0 ([#3045](https://togithub.com/googleapis/java-spanner/issues/3045)) ([67a6534](https://togithub.com/googleapis/java-spanner/commit/67a65346d5a01d118d5220230e3bed6db7e79a33)) * Update dependency commons-cli:commons-cli to v1.7.0 ([#3043](https://togithub.com/googleapis/java-spanner/issues/3043)) ([9fea7a3](https://togithub.com/googleapis/java-spanner/commit/9fea7a30e90227e735ad3595f4ca58dfb1ca1b93)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Supports including a hint in the SQL string to set a statement tag or an RPC priority for a single SQL statement in the Connection API. This makes it easier to use these features from frameworks and tools that only support SQL statements.
Replaces #2978