Repository navigation
feat: add native SQLite function mode and deprecate legacy overrides - #647
Merged
Merged
Conversation
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SQLite's native math functions are now available in sql.js, while existing legacy functions remain enabled by default. Calling a legacy function prints a deprecation warning; functions called for many rows can produce many warnings. A future major release will disable these functions by default.
To try the future behavior now:
Before opting in:
log(x)changes from the natural logarithm to base 10 logarithm (log(100)=2now); useln()for the natural logarithm.NULLinstead of 0, and nativesign()returns an integer. Nativesign()also works in expression indexes and generated columns.reverse,charindex,median, andstdevare unavailable, including in saved views and triggers. You can use sql.js to register your own implementation of the functions.The first initialization chooses the mode for the module. In a worker, pass
config: { useOldExtensionFunctions: false }on the first message. Both modes gain native functions includingln,log2,mod,trunc,pow,ceiling, and two-argumentlog.Related
sign()override breaks schemas using expression indexes or generated columns.sign().