Skip to content
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

Merged
merged 4 commits into from
Dec 18, 2024
Merged

Remove RoutineName, fix and test rowcount #30

merged 4 commits into from
Dec 18, 2024

Conversation

dfava
Copy link
Contributor

@dfava dfava commented Dec 18, 2024

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.

grant create type to [sqlcode-deploy-role];


alter user
Copy link
Contributor Author

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, "[]")),
/*
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@dfava dfava changed the title Test for rowcount Fix and test for rowcount Dec 18, 2024
@dfava dfava changed the title Fix and test for rowcount Remove RoutineName, fix and test rowcount Dec 18, 2024
@dfava dfava enabled auto-merge (squash) December 18, 2024 12:14
Copy link

@theophanemayaud theophanemayaud left a 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 🤷‍♂️

@dfava dfava merged commit f19bcdb into main Dec 18, 2024
1 check passed
@dfava dfava deleted the tests branch December 18, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants