Module Simantics/Query

This module is undocumented. This is a list of its definitions.

createSCLQuery :: Resource -> Resource -> String -> <WriteGraph> Resource

createSCLQuery library queryType name creates a new SCL query of the given queryType under library with the given name and returns it. The query gets a spreadsheet named Sheet with an expression range Range1 that shows the values the query produces. An undo point is marked before the change.

createSCLQueryAction :: Resource -> <Proc> ()
createSCLQueryDefault :: Resource -> Resource -> <WriteGraph> Resource

As createSCLQuery but names the new query with a fresh name derived from Query.

createSCLQueryType :: Resource -> String -> <WriteGraph> Resource

createSCLQueryType library name creates a new SCL query type under library with the given name and returns it. The query type inherits MOD.SCLQuery and asserts a values property whose SCL expression is initially []. Instances of the returned type can be created with createSCLQuery. An undo point is marked before the change.

createSCLQueryTypeAction :: Resource -> <Proc> ()

Creates a new SCL query type with a generated name under the given library in a write transaction of its own. Intended to be used as a user interface action.

createSCLQueryTypeDefault :: Resource -> <WriteGraph> Resource

As createSCLQueryType but names the new query type with a fresh name derived from QueryType.

inputVariable :: Variable -> <ReadGraph> Variable

Returns the variable that the SCL query enclosing the given variable is being evaluated against. The name input in an SCL query expression is compiled into a call of this function. If that context variable has an inputURI property, the variable named by that URI is returned instead.

makeProxyVariable :: Variable -> Variable -> <ReadGraph> Variable

makeProxyVariable base input returns the proxy variable base/>>>/<path of input>/<<<, in which base is attached to the context input. Values read under the returned variable are computed with input as the input, which is what inputVariable returns for them.

proxyVariableBase :: Variable -> <ReadGraph> Variable

Returns the base variable of the innermost proxy that the given variable is part of, that is, the variable that was given to makeProxyVariable as its first argument.

queryValue :: Variable -> Variable -> <ReadGraph> a

queryValue query input evaluates the given SCL query against the variable input and returns the value of the query's values property.

sessionVariable :: Variable -> <ReadGraph> Variable

Returns the context variable that the SCL query enclosing the given variable is being evaluated against. The name session in an SCL query expression is compiled into a call of this function. Unlike inputVariable it does not follow the inputURI property of the context variable.

sheetQueryValue :: Variable -> Variable -> <ReadGraph> a
sheetQueryVariable :: Variable -> Variable -> <ReadGraph> Variable