-
Notifications
You must be signed in to change notification settings - Fork 696
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
Window functions in Exposed DSL #623
Comments
Hi @dsdolzhenko, there are no plans right now to implement window functions, so it would be great if you could provide a PR. |
Ok. I'll try to keep you posted. |
I'm interested in window functions too and they are part of SQL2003 standard. Anybody tried to use them in Exposed, maybe with some custom extension? |
I dont know if anyone can find this useful, but this is how I was able to reproduce a window function: Original query:
basic
I also created an
In action:
|
Any updates on this? |
@H4kt This is what Ive used Edit: The comment above yours is mine as well, from a different account. custom function:
usage:
Epoch would look like
|
-Support of partition by and order by clauses -Support of window frame clause (without EXCLUDE) -Factories for common window functions -Support for using aggregate functions as window functions
-Support of partition by and order by clauses -Support of window frame clause (without EXCLUDE) -Factories for common window functions -Support for using aggregate functions as window functions
Window function definitions moved from top-level to ISqlExpressionBuilder to eliminate their irrelevant appearance in code completion.
-Support of partition by and order by clauses -Support of window frame clause (without EXCLUDE) -Factories for common window functions -Support for using aggregate functions as window functions
Window function definitions moved from top-level to ISqlExpressionBuilder to eliminate their irrelevant appearance in code completion.
…with null-safe call
This flag was used only in tests. Its value was false only for MySql < 8 which is covered by DatabaseTestsBase.kt Transaction.isOldMySql
This flag was used only in tests. Its value was false only for MySql < 8 which is covered by DatabaseTestsBase.kt Transaction.isOldMySql
* #623 Add support of window functions in Exposed DSL -Support of partition by and order by clauses -Support of window frame clause (without EXCLUDE) -Factories for common window functions -Support for using aggregate functions as window functions * #623 Fix linter warnings * Better name for NthValue class 'index' argument Change argument to 'n' to conform with the most DB docs Co-authored-by: Jocelyne <38375996+joc-a@users.noreply.github.com> * Better name for nthValue function 'index' argument Change argument to 'n' to conform with the most DB docs Co-authored-by: Jocelyne <38375996+joc-a@users.noreply.github.com> * #623 Refactor window function definition Window function definitions moved from top-level to ISqlExpressionBuilder to eliminate their irrelevant appearance in code completion. * #623 Dump window functions related API changes * #623 Fix smart cast warning by replacing not-null assertion with null-safe call * #623 remove redundant DatabaseDialect.supportsWindowFunctions This flag was used only in tests. Its value was false only for MySql < 8 which is covered by DatabaseTestsBase.kt Transaction.isOldMySql --------- Co-authored-by: Dmitry Levin <dlevin@anylogic.com> Co-authored-by: Jocelyne <38375996+joc-a@users.noreply.github.com>
…ns#1651) * JetBrains#623 Add support of window functions in Exposed DSL -Support of partition by and order by clauses -Support of window frame clause (without EXCLUDE) -Factories for common window functions -Support for using aggregate functions as window functions * JetBrains#623 Fix linter warnings * Better name for NthValue class 'index' argument Change argument to 'n' to conform with the most DB docs Co-authored-by: Jocelyne <38375996+joc-a@users.noreply.github.com> * Better name for nthValue function 'index' argument Change argument to 'n' to conform with the most DB docs Co-authored-by: Jocelyne <38375996+joc-a@users.noreply.github.com> * JetBrains#623 Refactor window function definition Window function definitions moved from top-level to ISqlExpressionBuilder to eliminate their irrelevant appearance in code completion. * JetBrains#623 Dump window functions related API changes * JetBrains#623 Fix smart cast warning by replacing not-null assertion with null-safe call * JetBrains#623 remove redundant DatabaseDialect.supportsWindowFunctions This flag was used only in tests. Its value was false only for MySql < 8 which is covered by DatabaseTestsBase.kt Transaction.isOldMySql --------- Co-authored-by: Dmitry Levin <dlevin@anylogic.com> Co-authored-by: Jocelyne <38375996+joc-a@users.noreply.github.com>
I couldn't find a way to express a query containing a window function via Exposed DSL. Are there any plans to support window functions in Exposed DSL?
I could try to implement it if there are no objections.
The text was updated successfully, but these errors were encountered: