-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
SQL: Fix JDBC url pattern in docs and error message #56612
Conversation
The docs pattern url was using `*` which means zero or many instead of `?` which means zero or one. The pattern url returned in error messages was not in sync with the one in the docs. Fixes: elastic#56476
Pinging @elastic/es-ql (:Query Languages/SQL) |
@@ -51,7 +51,7 @@ Once registered, the driver understands the following syntax as an URL: | |||
|
|||
["source","text",subs="attributes"] | |||
---- | |||
jdbc:es://[[http|https]://]*[host[:port]]*/[prefix]*<[?[option=value]&]* | |||
jdbc:es://[[http|https]://]?[host[:port]]?/[prefix]?[?[option=value]&]* |
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.
?
means zero ore one in regex, which is what we want, but how can we differentiate from the [?[option...]
which is the actual char ?
? In the error message I used \?
, but not sure. Any suggestions?
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.
For 0 or 1 (or ?
) there is also the {0,1}
more explicit notation, but I am not sure if we want to complicate things...
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
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
The docs pattern url was using
*
which means zero or many insteadof
?
which means zero or one. The pattern url returned in errormessages was not in sync with the one in the docs.
Fixes: #56476