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

Support time math #1664

Open
rnett opened this issue Jan 5, 2023 · 0 comments
Open

Support time math #1664

rnett opened this issue Jan 5, 2023 · 0 comments

Comments

@rnett
Copy link

rnett commented Jan 5, 2023

There are a number of time math functions, that while supported in Kotlin and commonly in databases (I don't know exactly how prevalent they are, but I suspect very), aren't possible to express in Exposed without resorting to custom functions.

For example <timestamp> + <duration> * <int>.

Currently, arithmetic ops on time types require using the same type, which can get a bit non-sensical.

I think the two primary ops that would be good to have are <timestamp> +|- <duration> and <duration> *|/ <scalar>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant