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:
https://codeberg.org/kitten/app#database-app-module
¹ https://codeberg.org/kitten/app
² https://codeberg.org/small-tech/jsdb
#Kitten #SmallWeb #web #dev #database #JavaScriptDatabase #jsdb
#kitten #SmallWeb #web #dev #database #JavaScriptDatabase #jsdb
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: https://codeberg.org/kitten/app#database-commands
¹ https://codeberg.org/kitten/app
² https://codeberg.org/small-tech/jsdb
#Kitten #SmallWeb #SmallTech #JavaScriptDatabase #javascript #database #JSDB #web #dev #js #NodeJS #commandLineInterface #CLI
#kitten #SmallWeb #smalltech #JavaScriptDatabase #javascript #database #jsdb #web #dev #js #nodejs #commandlineinterface #cli
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: https://codeberg.org/small-tech/jsdb#custom-data-types
#JavaScriptDatabase #javascript #database #jsdb #accessors #SmallTech #SmallWeb #web #dev
#JavaScriptDatabase #javascript #database #jsdb #accessors #smalltech #SmallWeb #web #dev
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: https://codeberg.org/small-tech/jsdb#javascript-database-jsdb
#JavaScriptDatabase #JSDB #SmallTech #SmallWeb #database #dev #web #js #NodeJS #JavaScript
#javascript #nodejs #js #web #dev #database #SmallWeb #smalltech #jsdb #JavaScriptDatabase
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: https://ar.al/2020/10/20/introducing-jsdb/
Source code: https://github.com/small-tech/jsdb
#JSDB #JavaScriptDatabase #SmallTech #SmallWeb #JavaScript #database
#database #javascript #SmallWeb #smalltech #JavaScriptDatabase #jsdb
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: https://ar.al/2020/10/20/introducing-jsdb/
Source code: https://github.com/small-tech/jsdb
#JSDB #JavaScriptDatabase #SmallTech #SmallWeb #JavaScript #database
#database #javascript #SmallWeb #smalltech #JavaScriptDatabase #jsdb
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: https://ar.al/2020/10/20/introducing-jsdb/
Source code: https://github.com/small-tech/jsdb
#JSDB #JavaScriptDatabase #JavaScriptQueryLanguage #JSQL #SmallTech #SmallWeb #JavaScript #database #security
#security #database #javascript #SmallWeb #smalltech #JSQL #JavaScriptQueryLanguage #JavaScriptDatabase #jsdb