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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of database

database

Photo of javascript

javascript

Photo of SQLite JavaScript

SQLite JavaScript

Related news:

News photo

JavaScript's New Superpower: Explicit Resource Management

News photo

Polycompiler: Merge Python and JavaScript code into one file that runs in both

News photo

WebMonkeys: parallel GPU programming in JavaScript (2016)