Closed shivan-eyespace closed 6 months ago
I feel this is kind of feature creep
I feel this is kind of feature creep
The equivalent for one_or_none()
would be too much burden. I'm wondering if the .one()
would be popular.
I feel this is kind of feature creep
Agreed.
I have had a look through closed issues and wasn't able to find something like this.
So far we have
execute()
,executeTakeFirst()
andexecuteTakeFirstOrThrow()
.We are wondering if there is a take one and one only else throw if you SQL gets more than one row result.
This would be simliar to sqlalchemy's
.one()
(https://docs.sqlalchemy.org/en/20/core/connections.html#sqlalchemy.engine.Result.one) as opposed the.first()
(and alsoone_or_none()
- at most one result or no result else throw an error) methods.