-
Notifications
You must be signed in to change notification settings - Fork 877
Some test simplifications #4989
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
Conversation
| public async Task Ranges_not_supported_with_slim_builder_without_EnableRanges() | ||
| { | ||
| await using var slimDataSource = new NpgsqlSlimDataSourceBuilder(ConnectionString).Build(); | ||
| await AssertTypeUnsupportedRead<NpgsqlRange<int>, InvalidCastException>(@"[1,2)", "int4range", slimDataSource); |
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.
#4971 is going to make it so we throw NotSupportedException if we attempt to read a record without EnableRecords. We probably should align them (return unsupported handler for ranges?)
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.
Absolutely, that would be great. This way the user also gets the informative message when they attempt to read a range.
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.
Probably in a separate pr. Also, might be a good idea to make a separate resolver with all of the unsupported types (instead of adding them to BuiltInTypeResolver)
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.
👍 for separate PR. Any particular reason for the separate resolver?
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.
- It will make BuiltInTypeResolver a bit faster (for example switch over dataTypes might be a bit more optimized since there will be less values)
- Just having all of them bundled in a separate file is nice, BuiltInTypeResolver only handles things it supports, UnsupportedTypeResolver only handles things it doesn't support

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.
OK, I doubt there will be a noticeable perf improvement, but why not.
2db3f5a to
7a28f86
Compare
|
This was already merged in a while ago via #5279 |
No description provided.