Discussion
Loading...

#Tag

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  路  activity timestamp 8 hours ago

馃コ JavaScript Database (JSDB)鹿 version 7.0.0 released

- *Breaking change* JSTable.PERSIST event now uses a parameter object with properties for `type`, `keypath`, `value`, `change`, and `table`. This should make listening for events on your databases much nicer to author. e.g., a snippet from Catalyst虏 I鈥檓 working on:

```js
const settingsTable = db.settings['__table__']
const JSTable = settingsTable.constructor

settingsTable.addListener(JSTable.PERSIST, ({ keypath, value }) => {
switch (keypath) {
case 'servers.serverPoolSize':
console.info('New server pool size requested', value)
this.updateServerPool()
break
// etc.
}
})
```

This new version of JSDB is not in the latest Kitten鲁 yet as it is a breaking change and I want to make sure I update my sites/apps first if needed. I should have it integrated tomorrow.

To see the simple use case for JSDB in Kitten (the default untyped database that鈥檚 easy to get started with and perfect for quick experiments, little sites, etc.), see: https://kitten.small-web.org/tutorials/persistence/

For a more advanced tutorial for creating your own typed databases in Kitten, see the Database App Modules tutorial: https://kitten.small-web.org/tutorials/database-app-modules/

For another example, see: https://codeberg.org/small-tech/jsdb/#table-events

Full change log: https://codeberg.org/small-tech/jsdb/src/branch/main/CHANGELOG.md#7-0-0-2026-02-10

Enjoy!

馃挄

鹿 https://codeberg.org/small-tech/jsdb#readme
虏 https://catalyst.small-web.org
鲁 https://kitten.small-web.org

#JavaScriptDatabase #JavaScript #appendOnlyLog #JS #JSDB #JSDBUpdates #SmallTech #SmallWeb #Kitten #Catalyst

Codeberg.org

jsdb

A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to a JavaScript transaction log.
Codeberg.org

jsdb/CHANGELOG.md at main

jsdb - A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to a JavaScript transaction log.
Codeberg.org

jsdb

A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to a JavaScript transaction log.

Kitten: Tutorials

Kitten: Tutorials

  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.2-alpha.7 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct