11 Commits

Author SHA1 Message Date
Joakim Uddholm de6f80e70b First changed so that it doesn't check that it is the only row. Old behaviour is now in the new method 'one()' instead. 'scalar' uses old behaviour still 2018-02-15 00:42:07 +01:00
Joakim Uddholm d1b76caaab Add scalar method to RecordCollection 2018-02-11 17:33:39 +01:00
Daniel Schep 01d0132c1f Raise an error if selecting column that exists more than once
This caused a pretty major bug for us

also, closes #108
2017-12-07 11:48:38 -05:00
Chad Whitacre 1217c9eea2 Fix regression in test name :o) 2016-11-21 19:46:42 -05:00
Chad Whitacre 7588c1ca2b Rename .one to .first 2016-11-21 19:41:22 -05:00
Chad Whitacre fafaca6a96 Fix tests for raising one(default) 2016-11-21 19:33:31 -05:00
Chad Whitacre 1d1d423245 Raise default if it's an exception 2016-11-21 19:33:30 -05:00
Chad Whitacre e7da94b249 Add a .one method to RecordCollections
It's a common use-case to want one and only one result from a query.
This adds a .one method to RecordCollections that is parallel to .all.
2016-11-21 19:33:00 -05:00
Brobin 5fe76db02a add test for Record __dir__ method 2016-02-23 15:54:40 -06:00
kennethreitz ab41e3ff51 RecordCollection 2016-02-13 01:57:16 -05:00
Harold Cooper fa3600df20 add regression tests for issues #13, #15, and the not-yet-fixed #34 2016-02-11 01:01:58 -05:00