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

Use OUTPUT INTO for generated values in SqlServer to support tables with triggers #3869

Merged
merged 1 commit into from
Nov 25, 2015

Conversation

AndriySvyryd
Copy link
Member

Add commandPosition argument to methods on IUpdateSqlGenerator to provide a unique id for a modification command in a batch

Fixes #1441

commandStringBuilder
.Append($"DECLARE @generated{commandPosition} TABLE (")
.AppendJoin(readOperations.Select(c =>
$"{SqlGenerator.DelimitIdentifier(c.ColumnName)} {GetTypeNameForCopy(c.Property)}"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beware that @bricelam hates this 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I do. Concatenation is cheaper.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everywhere in this file or just this instance?

@divega
Copy link
Contributor

divega commented Nov 24, 2015

Did you think about adding actual triggers to some tables in the functional tests?

@divega
Copy link
Contributor

divega commented Nov 24, 2015

I had a few questions but this looks :shipit: provided that you give me satisfactory answers 😄

Not removing the "needs-review" tag in case you want to get another pair of eyes on it.

@AndriySvyryd
Copy link
Member Author

I'll try to add FTs with triggers, but it might take some time.

@divega
Copy link
Contributor

divega commented Nov 24, 2015

I'll try to add FTs with triggers, but it might take some time.

Ok, can you file a bug on that and then :shipit:?

…ith triggers

Add commandPosition argument to methods on IUpdateSqlGenerator to provide a unique id for a modification command in a batch

Fixes #1441
@AndriySvyryd
Copy link
Member Author

Added FTs

@divega
Copy link
Contributor

divega commented Nov 25, 2015

Neat! :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants