-
Notifications
You must be signed in to change notification settings - Fork 566
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
MsSQL SET for session params #1646
Conversation
Hi @yoavcloud -- it looks like this PR has some conflicts -- is there any chance you can resolve them? |
9e11da8
to
ecf5bed
Compare
@alamb done |
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.
Seems good to me -- thanks @yoavcloud -- it would be nice to avoid using Strings quite as much but that is something we could do as a follow on PR if anyone cares
src/parser/mod.rs
Outdated
if let Token::Word(w) = next_token.token { | ||
return Ok(w.to_string()); | ||
} | ||
self.expected("Session param name", next_token) |
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.
maybe it would be nice to list the expected keywords (IO/XML/PROFILE/TIME, etc) here
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.
There are dozens, and I wanted the code to not be dependent on new params being added
src/parser/mod.rs
Outdated
} | ||
|
||
pub fn parse_set_session_param_name(&mut self) -> Result<String, ParserError> { | ||
if self.parse_keywords(&[Keyword::STATISTICS, Keyword::IO]) { |
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.
Given these are hard coded it seems like it would be cleaner to eventually return an enum for what setting was set rather than arbitrary strings that the using library needs to parse / interpret
However, I also think we could do that as a follow on PR
fyi @iffyio |
ecf5bed
to
36b1a41
Compare
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! Thanks @yoavcloud!
36b1a41
to
3e1743e
Compare
3e1743e
to
d2351a9
Compare
No description provided.