def
func:instantiate
instantiate(spec, opts: null)
Create the default instance for a given spec. Raise exception if spec is abstract.
The default behavior for dict types is to return a single Dict. However, if the type has a constrainted query, then an entire graph can be instantiated via the {graph} option in which case a Dict[] is returned. In graph mode an id is generated for recs for cross-linking.
Also see LibNamespace.instantiate.
NOTE: this function forces the haystack option to force all non-Haystack scalars to be simple strings.
Options:
graph: marker tag to instantiate a graph of recsabstract: marker to supress error if spec is abstract
Examples:
// evaluates to 2000-01-01
instantiate(Date)
// evaluates to dict {equip, vav, hotWaterHeating, ...}
instantiate(G36ReheatVav)
// evaluates to dict[] of vav + points from constrained query
instantiate(G36ReheatVav, {graph})