]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add overload for ColumnCollection.get(col, default)
authorMark Elliot <123787712+mark-thm@users.noreply.github.com>
Mon, 29 Apr 2024 21:50:10 +0000 (17:50 -0400)
committerFederico Caselli <cfederico87@gmail.com>
Sat, 4 May 2024 09:33:23 +0000 (11:33 +0200)
commitab6df37dad5cccbd0328e83ed55c7cfed91344cb
tree0b366f12c20c657eee6a0579bf49e4af1bf50adf
parent60498e9185651870871aca040e223dd4f2184a0a
Add overload for ColumnCollection.get(col, default)

### Description
Fixes #11328 by adding an overload to ColumnCollection when a non-None default is provided.

### Checklist
This pull request is:

- [ ] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

Closes: #11329
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11329
Pull-request-sha: 32db849e0df1db357df79df3a0dc2263a755d04e

Change-Id: I8bef91c423fb7048ec8d4a7c99f70f0b1588c37a
lib/sqlalchemy/orm/properties.py
lib/sqlalchemy/sql/base.py
test/sql/test_utils.py
test/typing/plain_files/sql/misc.py [new file with mode: 0644]
test/typing/plain_files/sql/selectables.py [deleted file]