The result of using the find! macro is ambiguous, not indicating under which conditions it will return an Error and silently discarding values
My proposal is to follow a combination of SQLAlchemy 1.4-[^1] and 2.0-style[^2] Query API, renaming find! with find_first!, keeping the prefix but appending the explicit method name that implies the return expectation and creating a few new macros for common operations:
The result of using the
find!
macro is ambiguous, not indicating under which conditions it will return an Error and silently discarding valuesMy proposal is to follow a combination of SQLAlchemy 1.4-[^1] and 2.0-style[^2] Query API, renaming
find!
withfind_first!
, keeping the prefix but appending the explicit method name that implies the return expectation and creating a few new macros for common operations:find_first!
find_one!
find_all!
find_one_or_none!
[^1]: SQLAlchemy legacy Query API. [^2]: SQLAlchemy 2.0-style Query API