zordfsdb templates
Created: 2025-07-11 Copyright: CC-BY-SA 4.0 Language: en
I wrote about my new file system based datebase earlier:
Update
Once upon a time ago I created client for my database. It is simple shell app with very simple interface. It is not perfect but it works.
The interesting part was all execution of commands. Now I decided that it is better to move all execution to main lib.
This gave me new possibilities - template for list. It is simple reserved filename `.template` in list object with commands to be executed on AddObject.
Syntax of commands
- KEYS [path] - get list of existing properties/objects/lists
- GET [path] - get value of property
- INC [path] - increase abcex value in property
- DEC [path] - decrease abcex value in property
- NOW [path] - set value to datetime string in property
- DEL [path] - remove property/object/list (no confirmation)
- SAVE [path] [value] - set value to property
- CREATE [path] - create list/object in path (parent path should exist)
- ADD [path] - add abcex indexed object to list. Will return index
- INFO [path] - get all info about property/object/list
- TREE [path] - draw db part in path with values
- TEMPLATE [path] [template] - set template to list for object creation
- HELP - will print this help
- QUIT - exit the shell
Last used path can be accessed by \_
Last returned index (after ADD command) can be accessed by $
Short commands can be as:
KEYS(\\K), GET(\\G), INC(\\I), DEC(\\D), NOW(\\N), DEL(\\R), SAVE(\\S), CREATE(\\C), ADD(\\A), HELP(\\H), QUIT(\\Q)
Example of `.template`
NOW _.$.created; SAVE _.$.auto 1;
This will add properties to newly created object: `created` with datetime and `auto` with value 1
Future plans
- sorted lists of nodes by property
- validation for property values
- binary type
- db in zip archive
- db in encrypted zip archive
Page counter: 2b