Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Allow CommandBehavior.SingleResult and SingleRow #220

Closed
NickCraver opened this issue Jan 26, 2016 · 10 comments
Closed

Allow CommandBehavior.SingleResult and SingleRow #220

NickCraver opened this issue Jan 26, 2016 · 10 comments

Comments

@NickCraver
Copy link
Contributor

We're getting reports in Dapper of breaks after recent optimizations for single-result queries such as this: DapperLib/Dapper#441

While in this case it's CommandBehavior.SingleResult, all behaviors are fair game for ADO.Net Providers. But let's take it one at a time - can Sqlite either ignore this optimization or support it?

Related issue: #114

@divega
Copy link

divega commented Jan 26, 2016

We should already be ignoring SequentialAccess. I agree we should ignore more of these behaviors as long as they are just hints (and assuming we won't be actually taking advantage of them).

@NickCraver
Copy link
Contributor Author

PR #221 open to ignore the behavior for now - no harm in ignoring for now and adding actual optimizations later.

@mgravell
Copy link

after recent optimizations for single-row queries

SingleResult is actually "single grid"; IMO you should also ignore SingleRow, which is a similar hint that can be safely ignored if the library doesn't choose to exploit it.

@divega
Copy link

divega commented Jan 27, 2016

👍 SingleRow is a hint that providers are not required to look at. It is even clearly documented as such.

@mgravell
Copy link

Some .NET Framework data providers may, but are not required to, use this information to optimize the performance of the command.

Agreed and cited

NickCraver added a commit to NickCraver/Microsoft.Data.Sqlite that referenced this issue Jan 27, 2016
@NickCraver
Copy link
Contributor Author

+1 - PR Updated to ignore both behaviors.

@NickCraver
Copy link
Contributor Author

Any update on this? I'd really like for this simple change to be folded into the RC2 release.

@mgravell
Copy link

+another; pretty please with sprinkles on the top
On 13 Feb 2016 10:46 p.m., "Nick Craver" [email protected] wrote:

Any update on this? I'd really like for this simple change to be folded
into the RC2 release.


Reply to this email directly or view it on GitHub
#220 (comment)
.

@bricelam
Copy link
Contributor

Well, since you asked so nicely... 😉

Sorry for the delay. We were waiting to get the OK from one of our partner teams who is going to take a dependency on RC2. I'll go ahead and merge the PR.

@bricelam bricelam added this to the 1.0.0-rc2 milestone Feb 16, 2016
@bricelam bricelam self-assigned this Feb 16, 2016
@bricelam bricelam changed the title CommandBehavior.SingleResult support Allow CommandBehavior.SingleResult and SingleRow Feb 16, 2016
@johandanforth
Copy link

@bricelam any idea when there will be a 1.0.0-rc2 nuget package which includes this fix?

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

No branches or pull requests

5 participants