First Check
Commit to Help
Example Code
statement = select(Event).where(Event.user_public_id == user.public_id)
if suggested_by:
statement.filter(Event.suggested_by.contains(suggested_by))
Description
using SQLAlchemy I would do this
if suggested_by:
query.filter(Event.suggested_by.contains(suggested_by))
assuming I have a statement like this:
statement = select(Event).where(Event.user_public_id == user.public_id)
if suggested_by:
statement.filter(Event.suggested_by.contains(suggested_by))
As seen above I still use the SQLAlchemy logic in the above because I couldn't figure out any way to do this with SQLModel. Is there any way to perform a where/like query with this library?
Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.4
Python Version
3.9.7
Additional Context
No response
First Check
Commit to Help
Example Code
Description
using SQLAlchemy I would do this
assuming I have a statement like this:
As seen above I still use the SQLAlchemy logic in the above because I couldn't figure out any way to do this with SQLModel. Is there any way to perform a
where/likequery with this library?Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.4
Python Version
3.9.7
Additional Context
No response