type
Runtime
const mixin Runtime
Runtime manages a database, library namespace, and extensions. It is the base type for both Sys and Proj. In the Haxall daemon there is one runtime that is both the Sys and Proj. But in SkySpark there is one host level Sys for the VM and zero more separate Proj runtimes.
methods
| commit |
Convenience for |
|---|---|
| commitAll |
Apply a list of diffs to the database in batch. |
| db |
Folio database for this runtime |
| dir |
Runtime file directory. |
| dis |
Display name of the runtime. |
| ext |
Convenience for |
| exts |
Extension lookup and management |
| id |
Runtime id which is always formatted as "p:{name}" |
| isProj |
Return if this runtime is a project |
| isRunning |
Running flag. |
| isSteadyState |
Has the runtime has reached steady state. |
| isSys |
Return if this runtime is the system |
| libs |
Xeto library management |
| log |
Log for runtime level logging |
| meta |
Runtime level meta data stored in the |
| name |
Programatic name of the runtime. |
| newContext |
Construct new context with user |
| ns |
Xeto lib namespace for this runtime |
| obs |
Observables |
| read |
Find the first record which matches the given filter string. |
| readAll |
Match all the records against a filter string and return as grid. |
| readAllList |
Match all the records against a filter string and return as list. |
| readById |
Convenience for |
| readByIds |
Read a list of records by ids into a grid. |
| readByIdsList |
Read a list of records by id. |
| readCount |
Return the number of records which match the given filter string. |
| sync |
Block until currently queued background processing completes |
| sys |
Reference to system runtime |
| watch |
Watch subscriptions |
Slot Details
commit
commitAll
abstract Diff[] commitAll(Diff[] diffs)
Apply a list of diffs to the database in batch. Either all the changes are successfully applied, or else none of them are applied and an exception is raised. Return updated Diffs which encapsulate both the old and new version of each record.
If any of the records have been modified since they were read for the given change set then ConcurrentChangeErr is thrown unless Diff.force configured.
db
abstract Folio db()
Folio database for this runtime
dir
abstract File dir()
Runtime file directory. It the root directory of all runtime oriented operational files. The folio database is stored under this directory in a sub-directory named db/, and namespace support in ns/
dis
abstract Str dis()
Display name of the runtime.
ext
exts
abstract RuntimeExts exts()
Extension lookup and management
id
abstract Ref id()
Runtime id which is always formatted as "p:{name}"
isProj
abstract Bool isProj()
Return if this runtime is a project
isRunning
abstract Bool isRunning()
Running flag. On startup this flag transitions to true before calling ready and start on all the extensions. On shutdown this flag transitions to false before calling unready and stop on all the libraries.
isSteadyState
isSys
abstract Bool isSys()
Return if this runtime is the system
libs
abstract RuntimeLibs libs()
Xeto library management
log
abstract Log log()
Log for runtime level logging
meta
abstract RuntimeMeta meta()
Runtime level meta data stored in the rt:meta database record. This dict always includes a synthetic name tag
name
abstract Str name()
Programatic name of the runtime. This string is always a valid tag name.
newContext
ns
abstract Namespace ns()
Xeto lib namespace for this runtime
obs
abstract RuntimeObservables obs()
Observables
read
abstract Dict? read(Str filter, Bool checked := true)
Find the first record which matches the given filter string. Throw UnknownRecErr or return null based on checked flag. See Filter Chapter for filter format.
readAll
abstract Grid readAll(Str filter, Dict? opts := null)
Match all the records against a filter string and return as grid. See Filter Chapter for filter format.
readAllList
abstract Dict[] readAllList(Str filter, Dict? opts := null)
Match all the records against a filter string and return as list. See Filter Chapter for filter format. See readAll to return results as a grid.
readById
readByIds
abstract Grid readByIds(Ref[] ids, Bool checked := true)
Read a list of records by ids into a grid. The rows in the result correspond by index to the ids list. If checked is true, then every id must be found in the project or UnknownRecErr is thrown. If checked is false, then an unknown record is returned as a row with every column set to null (including the id tag).
readByIdsList
readCount
sync
sys
abstract Sys sys()
Reference to system runtime
watch
abstract RuntimeWatches watch()
Watch subscriptions