The Delightql Runtime¶
The delightql runtime is a set of stateful data and contracts that anyone running a query or script may depend upon.
The delightql runtime guarantees
- the existence of certain namespaces
- special namespaces for CLI, REPL and library usages
- special rules for namespace removal and addition
- special namespaces deemed auto-enlisted
- the existence of certain entities: rules, functions, sigma predicates, etc.
- the existence of certain directives
The runtime namespacing mechanism is introspectable as tables by delightql itself. It also doubles as a code module system and data import mechanism.
This blend of introspection and user-driven namespacing has a precedent in images, a style of always-on programming promulgated by Smalltalk.
Namespace Contracts¶
Built-in Namespaces¶
Delightql provides the following namespaces:
main– where data is mounted when a database is provided at start of processhome– where the REPL’s definitions (.ddlinput, inline ddl) are writtenstd– no entities, just a container for other namespacesstd::prelude– auto-enlisted; the directives and core pseudo-predicatesstd::string– string functionsstd::constants– named constants such asnlandtabstd::predicates– forlikeandbetweenstd::help–operators(*), the operator sigils as a relationstd::info–tables(*), the tables visible in the sessionstd::json,std::math,std::reshape– JSON, aggregate and reshaping (pivot) helpers
std::(*) lists the std namespaces.
While introspectable system tables may be seen and used ( located at all namespaces with a
sysprefix) they are not to be depended upon.
This is a hard choice to allow the slow adoption of guranteed introspection and metadata predicates into std while their lower-level and version-based siblings at sys may be churned as dictated by functionality and refactoring.
Delightql is already exceptionally well introspectable, but has not yet decided its public facing contract.
To repeat: all namespaces and entities prefixed by sys do not guarantee stability to a programmer over version changes.
Namespace metadata¶
Namespace catalog functor¶
Every namespace may be called directly:
namespace::subnamespace::(*)
Auto-enlist namespaces¶
Special Protected Namespaces¶
A programmer has wide latitude to create their own tree of namespaces anywhere in the image inclusive of entities within those namespaces.
Delightql sets aside the following namespaces as protected classes:
std-prefixed namespaces may not receive new entities nor add or drop namespacessys-prefixed namespaces may not receive new entities nor add or drop namespaces
REPL vs CLI vs CORE¶
System Tables – A Tour¶
All namespaces and entities prefixed by sys do not guarantee stability to a programmer over version changes.
Nevertheless, the current version of delightql has many candidates for promotion to std that there might come a time when
Information Schema Namespaces¶
The following namespaces contain entities that allow introspection of what entities are knowable at runtime. These namespaces contain multiple table or view entities that are created, modified or deleted whenever a programmer runs consult!, mount!, etc.
sys::nssys::cartridgessys::entitiessys::entities::hosys::entities::interior