This post describes the MicroDB shell, which is a Unix-like shell for interacting with MicroDB.
show [-t] OID [TAG] --- show all tags or OID or the chosen tag tag [-f] OID TAG VALUE [TYPE] --- set tag TAG to VALUE on OID (opt. type) rm OID [TAG] --- remove all or nominated tag(s) from OID ls [-l] OID --- list tags on an object help --- show the help pwd --- print working database information whoami --- print username . [-f] FILE --- execute commands from FILE exec [-f] FILE --- execute commands from FILE
OIDis an object identifier. Object identifiers are unicode strings. The empty string is not a valid OID. All other strings are, in principle, valid object identifiers, as long as they do not include the slash character (
/). It is recommended that tag names follow the MicroDB tag conventions, but this is not required.
TAGis the name of a tag (a string).
VALUEis a tag value, appropriately formatted (see BELOW1).
TYPEis a type specifier (see BELOW2).
FILEis an absolute or relative path to a file,.
Tags in MicroDB can contain values, and those values have types.
One of the values a tag can have is the null value
null. There is no
distinction between a tag whose value is null and a tag without a value.
MicroDB uses both base types, MIME types and special types.
The base types stored in MicroDB are:
n): the null value
b): a boolean value,
i): an integer value (synonym
r): a floating point value (synonym:
s): a floating point value (synonym:
D): a date with no time component, always formatted using ISO 8601.
d): date with a time component, always formatted using ISO 8601, with optional time zones information.
MicroDB currently understands a subset of MIME types in addition to base types. This set is likely to expand over time, and it is possible that MicroDB will eventually understand arbitrary MIME types.
Currently supported MIME types are:
L) — a hyperlink
a) — an automatic hyperlink
c) — a compound type
t) — a template
unknown) — a value of unknown type.
When using the
tag command, the type of values will be inferred,
if not specified explicitly, using common-sense rules.
If tag names are chosen that look like file names with extensions, the extension will be used to infer the type when this is possible. The following tag extensions are used for this inference.
.html: tag value will be interpreted as
.xml: tag value will be interpreted as
.rss: tag value will be interpreted as
.txt: tag value will be interpreted as
.json: tag value will be interpreted as
.D: tag value will be interpreted as a
.d: tag value will be interpreted as a
.c: tag value will be interpreted as