-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Dataset#get and #first without argument not create intermediate …
…datasets if receiver uses raw SQL There's no reason for a dataset clone in this case, as the limit and select settings will be ignored. This also fixes use of Dataset#get without argument when using the implicit_subquery extension. Previously, it would try to use a subquery in an unhelpful way: DB['SELECT a FROM b WHERE c = 1'].extension(:implicit_subquery).get # SELECT NULL AS v FROM (SELECT a FROM b WHERE c = 1) AS t1 LIMIT 1 Now, it runs the query directly and returns the first value.
- Loading branch information
1 parent
26a2243
commit 45b7f37
Showing
3 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters