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

[FEATURE]: between for arbitrary values #3624

Open
1 task done
acontreras89 opened this issue Nov 26, 2024 · 1 comment · May be fixed by #3829
Open
1 task done

[FEATURE]: between for arbitrary values #3624

acontreras89 opened this issue Nov 26, 2024 · 1 comment · May be fixed by #3829
Labels
enhancement New feature or request qb/crud

Comments

@acontreras89
Copy link

acontreras89 commented Nov 26, 2024

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

It would be good to be able to use between(someDate, table.from, table.to), which is perfectly valid SQL (at least with PostgreSQL). Actually, this could be applied to other conditions as well.

@acontreras89 acontreras89 added the enhancement New feature or request label Nov 26, 2024
@acontreras89
Copy link
Author

A simple fix is to wrap the first argument with sql:

between(sql`${from.toISOString()}`, reportTask.from, reportTask.to)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request qb/crud
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants