Aral Balkan · @aral
39718 followers · 28525 posts · Server mastodon.ar.al

Kitten¹ now keeps two JSDB² databases per project: an internal one ('kitten._db`) that holds data Kitten manages (sessions, uploads, etc.) and the default one (`kitten.db`) that holds your own tables.

You’ll mostly only care about the latter.

I also took the opportunity to create a Database App Module example and document it in the readme:

codeberg.org/kitten/app#databa

¹ codeberg.org/kitten/app
² codeberg.org/small-tech/jsdb

#kitten #SmallWeb #web #dev #database #JavaScriptDatabase #jsdb

Last updated 1 year ago

Aral Balkan · @aral
35295 followers · 25455 posts · Server mastodon.ar.al

Just published Kitten’s¹ new database² commands:

- kitten db [table name] to see info the database/a specific table
- kitten db delete [table name] to delete the database/a specific table
- kitten db tail <table name> to follow a specific table

Full docs: codeberg.org/kitten/app#databa

¹ codeberg.org/kitten/app
² codeberg.org/small-tech/jsdb

#kitten #SmallWeb #smalltech #JavaScriptDatabase #javascript #database #jsdb #web #dev #js #nodejs #commandlineinterface #cli

Last updated 1 year ago

Aral Balkan · @aral
34612 followers · 24930 posts · Server mastodon.ar.al

An interesting JavaScript Database (JSDB) edge case I just encountered:

If you’re persisting custom objects, please do NOT use setter methods (`set something () {…}`).

Use regular methods instead (`setSomething () {…}`) for predictable behaviour that likely matches your conceptual model of how things should work.

(This is due to how setters interact with proxies.)

Details: codeberg.org/small-tech/jsdb#c

#JavaScriptDatabase #javascript #database #jsdb #accessors #smalltech #SmallWeb #web #dev

Last updated 1 year ago

ar.al🌻 · @aral
25013 followers · 19524 posts · Server mastodon.ar.al

JavaScript Database (JSDB) version 2.0.6 (ESM) and 1.2.3 (CJS) released.

Fixed:

- Crash when key contains single quote
- npm warnings

Install:

ESM: npm i @small-tech/jsdb
CJS: npm i @small-tech/jsdb@cjs

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

Learn more: codeberg.org/small-tech/jsdb#j

#javascript #nodejs #js #web #dev #database #SmallWeb #smalltech #jsdb #JavaScriptDatabase

Last updated 2 years ago

ar.al🌻 · @aral
21222 followers · 19353 posts · Server mastodon.ar.al

JSDB version 1.1.5 released

• Attempt to create a query on a non-array object now throws TypeError.

To install: npm i @small-tech/jsdb

Introductory blog post/tutorial: ar.al/2020/10/20/introducing-j

Source code: github.com/small-tech/jsdb

#database #javascript #SmallWeb #smalltech #JavaScriptDatabase #jsdb

Last updated 4 years ago

ar.al🌻 · @aral
21222 followers · 19353 posts · Server mastodon.ar.al

JSDB version 1.1.4 released

This is a bugfix release: Object keys containing non-alphanumeric characters are now properly supported.

(Thanks to @djsundog for the bug report.)

To install: npm i @small-tech/jsdb

Introductory blog post/tutorial: ar.al/2020/10/20/introducing-j

Source code: github.com/small-tech/jsdb

#database #javascript #SmallWeb #smalltech #JavaScriptDatabase #jsdb

Last updated 4 years ago

ar.al🌻 · @aral
21222 followers · 19353 posts · Server mastodon.ar.al

JSDB version 1.1.3 released

This release improves query security by failing faster during sanitisation of disallowed characters and on syntax errors (the latter by using the function constructor instead of eval.)

To install: npm i @small-tech/jsdb

Introductory blog post/tutorial: ar.al/2020/10/20/introducing-j

Source code: github.com/small-tech/jsdb

#security #database #javascript #SmallWeb #smalltech #JSQL #JavaScriptQueryLanguage #JavaScriptDatabase #jsdb

Last updated 4 years ago