Get the latest tech news
Show HN: SQLite JavaScript - extend your database with JavaScript
Create custom SQLite functions in JavaScript. Extend your database with scalars, aggregates, window functions, and collations directly in JavaScript. - sqliteai/sqlite-js
Function TypeDescriptionScalar FunctionsProcess individual rows and return a single valueAggregate FunctionsProcess multiple rows and return a single aggregated resultWindow FunctionsSimilar to aggregates but can access the full datasetCollation SequencesDefine custom sort orders for text valuesJavaScript EvaluationDirectly evaluate JavaScript code within SQLiteScalar functions process one row at a time and return a single value. When used with sqlite-sync, user-defined functions created via sqlite-js are automatically replicated across the SQLite Cloud cluster, ensuring that all connected peers share the same logic and behavior — even offline. Due to a constraint in SQLite, it is not possible to update or redefine a user-defined function using the same database connection that was used to initially register it.
Or read this on Hacker News