Query API
Methods for locally accessing and iterating the token tree.
You access each of the query methods over:
sdtfEngine.query.[method]getTokenState
getTokenStateGet a tokenState instance from the tokens token tree.
function getTokenState(
path: Array<string>
):
| { status: "resolved"; tokenState: TokenState<Type> }
| { status: "unresolvable"; reason: "DOES_NOT_EXIST" };getGroupState
getGroupStateGet a groupState instance from the tokens token tree.
function getGroupState(
path: Array<string>
):
| { status: "resolved"; groupState: GroupState }
| { status: "unresolvable"; reason: "DOES_NOT_EXIST" };getCollectionState
getCollectionStateGet a collectionState instance from the tokens token tree.
getNearestCollectionState
getNearestCollectionStateGet the collectionState instance enclosing the given path.
getAllTokenStates
getAllTokenStatesGet all tokenState instances from the tokens token tree.
getAllGroupStates
getAllGroupStatesGet all groupState instances from the tokens token tree.
getAllCollectionStates
getAllCollectionStatesGet all collectionState instances from the tokens token tree.
getAllNodeStates
getAllNodeStatesGet all tokenState, groupState and collectionState instances from the tokens token tree.
getTokenChildrenOf
getTokenChildrenOfGet the tokenState instances that are children of the given path.
getGroupChildrenOf
getGroupChildrenOfGet the groupState instances that are children of the given path.
getCollectionChildrenOf
getCollectionChildrenOfGet the collectionState instances that are children of the given path.
getChildrenOf
getChildrenOfGet the tokenState, groupState and collectionState instances that are children of the given path.
getParentsOf
getParentsOfGet the groupState and collectionState instances that are parents of the given path.
getGroupChildren
getGroupChildrenGet groupState instances that are direct children of the given path.
getTokenChildren
getTokenChildrenGet tokenState instances that are direct children of the given path.
getCollectionChildren
getCollectionChildrenGet collectionState instances that are direct children of the given path.
renderJSONTree
renderJSONTreeGet the JSON representation of the tokens token tree.
getAliasReference
getAliasReferenceGet the aliasReference instance from given coordinates.
getAllAliasReferences
getAllAliasReferencesGet all aliasReference instances from the tokens token tree.
getAliasReferencesTo
getAliasReferencesToGet all aliasReference instances that reference the given "to" coordinates.
getAliasReferencesFrom
getAliasReferencesFromGet all aliasReference instances that reference the given "from" coordinates.
getStatefulAliasReference
getStatefulAliasReferenceGet the statefulAliasReference instance of the given "from" coordinates.
getStatefulAliasReferencesTo
getStatefulAliasReferencesToGet the statefulAliasReference instances that reference the given "to" coordinates.
getStatefulAliasReferencesFrom
getStatefulAliasReferencesFromGet the statefulAliasReference instances that reference the given "from" coordinates.
Last updated
Was this helpful?