Skip to content

Conversation

@neozest
Copy link
Contributor

@neozest neozest commented Mar 15, 2021

Math functions are introduced from sqlite 3.35.
Refer https://www.sqlite.org/lang_mathfunc.html
FYI, it need to be compiled with -DSQLITE_ENABLE_MATH_FUNCTIONS.

Math functions are introduced from sqlite 3.35.
Refer https://www.sqlite.org/lang_mathfunc.html
FYI, it need to compile sqlite with -DSQLITE_ENABLE_MATH_FUNCTIONS
<< "first_value" + tr("(expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row.")
<< "last_value" + tr("(expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row.")
<< "nth_value" + tr("(expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned.")
// Math functions introduced from SQLite 3.3.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.3.53.35

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo. good catch :)

@justinclift
Copy link
Member

Seems like a good idea in concept. Am kind of wondering if there should be a check for the running SQLite version though, before enabling them?

Math function can be used when sqlite is equal or higher than 3.35 and
compiled with SQLITE_ENABLE_MATH_FUNCTIONS. When sqlite is compiled with
SQLITE_OMIT_COMPILEOPTION_DIAGS, there is no way to check the compile
options. In this case, we'll check only the sqlite version. Otherwise,
it will check whether sqlite was built with SQLITE_ENABLE_MATH_FUNCTIONS.
@justinclift
Copy link
Member

@lucydodo @MKleusberg @mgrojo This seems like a good idea to me. Hopefully someone has time to review it. 😄

@MKleusberg MKleusberg merged commit fb80d3b into sqlitebrowser:master Mar 16, 2021
@MKleusberg
Copy link
Member

Awesome! Thank you very much, @neozest! This is very much appreciated 😄

@justinclift justinclift added this to the 3.13.0 - Future release milestone Mar 17, 2021
@mgrojo mgrojo added enhancement Feature requests. sqlite labels Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature requests. sqlite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants