Closed landergate closed 6 years ago
@kennethreitz can you release a new version please?
I'm currently monkeypatching until next release:
import records
def rc_first(self, default=None):
# Try to get a record, or return default.
try:
return self[0]
except IndexError:
return default
records.RecordCollection.first = rc_first
records 0.5.2 is now on pypi, and supports the .first() method.
thanks @eightyeighteyes!
hard to keep up with all these libraries :)
If anyone wants to help with records releases, let me know.
Thank YOU @kennethreitz ... as someone testing a database migration from mssql to postgres, I really appreciate your work here. records has proved to be invaluable.
@eightyeighteyes that's wonderful news!
Curious, are you using the bulk loader?
I don't understand how it works very well, but it's intended for such use cases, from what I understand.
Not yet, just noticed it. I'm in the thick of things right now so no time to change anything, but when I refactor my tests, I'll give it a whirl. I could definitely see how it would be useful for creating a test database before application tests run.
As @eightyeighteyes noted in his comment, first
is already available since 0.5.2
Hey there, It looks like .first() method is not yet exist in 0.5.0 release.
No big deal, but kinda misleading, as it was mentioned on README.