-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove RoutineName, fix and test rowcount #30
Conversation
grant create type to [sqlcode-deploy-role]; | ||
|
||
|
||
alter user |
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 alter user
by itself is not valid SQL. I'm not sure why it was here in the first place. My feeling is that this file was never properly tested/migrated before.
procNameToken := Unparsed{ | ||
Type: OtherToken, | ||
RawValue: fmt.Sprintf(templateRoutineName, strings.Trim(result.QuotedName.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.
Leaving as a comment because the idea of having RoutineName
is good. But we need to figure out what is going on with rowcount
first.
sqltest/sqlcode_test.go
Outdated
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.
Note that to run this (or any test in sqlcode
), you need to add SQLSERVER_DSN
as environment variable.
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.
Not sure I understand the context of this whole sqlcode repo but looks good to me 🤷♂️
RoutineName was something I added as a convenience, so we could, for example, do:
select _log=info, routine=@RoutineName, ...
and not have to copy paste the routine name.But somehow the RoutineName feature changed the number of
@@rowcount
. So I'm commenting out the RoutineName change (which was not used anyway). Fixing the rowcount and we can revisit RoutineName in the future.