Skip to content

Conversation

SergeiPavlov
Copy link
Collaborator

@SergeiPavlov SergeiPavlov commented Aug 26, 2025

We have TVP support of IEnumerable<long> & IEnumerable<string> in .In() expressions.

This change adds IEnumerable<Guid> support, as filtering by GUID list is used in a few places in the App

Copy link

@snaumenko-st snaumenko-st left a comment

Choose a reason for hiding this comment

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

Could you please also consider implementing support for int separately from long?

#endregion


public static readonly FrozenSet<Type> TypesWithTvpSupport = [typeof(int), typeof(long), typeof(Guid), typeof(string)];

Choose a reason for hiding this comment

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

we should probably also add support for int type separately from long. Otherwise there is conversion operation involved in SQL runtime to convert from one to another, and performance of such queries can be much worse.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For general purposes, yes
But in practice, the app almost never uses int lists.

@SergeiPavlov SergeiPavlov merged commit 1cba370 into master-servicetitan Aug 27, 2025
4 checks passed
@SergeiPavlov SergeiPavlov deleted the GuidTvp branch August 27, 2025 16:44
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