Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add or_where_null and where_date #664

Closed
LordDeveloper opened this issue May 12, 2022 · 1 comment · Fixed by #710
Closed

Add or_where_null and where_date #664

LordDeveloper opened this issue May 12, 2022 · 1 comment · Fixed by #710
Labels
easy These issues are geared for people who have not yet contributed to this project yet feature request A feature that does not yet exist but will be a good addition to the library

Comments

@LordDeveloper
Copy link
Contributor

LordDeveloper commented May 12, 2022

Please add where_date and or_where_null in QueryBuilder.

User.where(
    lambda q: query.where_date('online_at', '>', now().subtract(hours=12)).or_where_null('online_at')
)
@LordDeveloper LordDeveloper added the bug An existing feature is not working as intended label May 12, 2022
@josephmancuso josephmancuso added feature request A feature that does not yet exist but will be a good addition to the library easy These issues are geared for people who have not yet contributed to this project yet and removed bug An existing feature is not working as intended labels May 14, 2022
@josephmancuso
Copy link
Member

where_date needs to create a query like:

User.where_date("created_at", pendulum.now())
select * from users where date(`created_at`) = '2022-06-01'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy These issues are geared for people who have not yet contributed to this project yet feature request A feature that does not yet exist but will be a good addition to the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants