- Index
- »
- hx.haystack
- »
- Funcs
Funcs
Funcs : Funcs
Deprecated - use connPing()
Deprecated - use connLearn()
Deprecated - use connSyncCur()
Deprecated - use connSyncHis()
Perform Haystack HTTP API call to given Str op name and with given request grid (can be anything acceptable toGrid())
Perform Haystack HTTP API call to read a record by its unique identifier
Perform Haystack HTTP API call to read a list of records by their identifiers
Perform Haystack REST API call to read single entity with filter
Perform Haystack REST API call to read all entities with filter
Perform Haystack REST API "hisRead" call to read history data for the record identified by the id (must be Ref)
Invoke a remote action on the given Haystack connector and remote entity
Evaluate an Axon expression in a remote server over a haystack connector
(conn: Obj) => Future <admin, deprecated>
Deprecated - use connPing()
(conn: Obj, arg: Obj?) => Grid <admin, deprecated>
Deprecated - use connLearn()
(points: Obj) => List <admin, deprecated>
Deprecated - use connSyncCur()
(points: Obj, span: Obj?) => Obj? <admin, deprecated>
Deprecated - use connSyncHis()
(conn: Obj, op: Str, req: Obj?, checked: Bool) => Grid <admin>
Perform Haystack HTTP API call to given Str op name and with given request grid (can be anything acceptable toGrid()). If the checked flag is true and server returns an error grid, then raise CallErr, otherwise return the grid itself. Result is returned as Grid. Also see Client.call.
(conn: Obj, id: Obj, checked: Bool) => Dict? <admin>
Perform Haystack HTTP API call to read a record by its unique identifier. Return result as dict. If the record is not found, then return null or raise UnknownRecErr based on checked flag. Also see Client.readById.
(conn: Obj, ids: List, checked: Bool) => Grid <admin>
Perform Haystack HTTP API call to read a list of records by their identifiers. Return a grid where each row of the grid maps to the respective id list (indexes line up). If checked is true and any one of the ids cannot be resolved then raise UnknownRecErr for first id not resolved. If checked is false, then each id not found has a row where every cell is null. Also see Client.readByIds.
(conn: Obj, filter: Filter, checked: Bool) => Dict? <admin>
Perform Haystack REST API call to read single entity with filter. The filter is an expression like readAll(). Return result as dict. If the record is not found, then return null or raise UnknownRecErr based on checked flag. Also see Client.read.
(conn: Obj, filter: Filter) => Grid <admin>
Perform Haystack REST API call to read all entities with filter. The filter is an expression like readAll(). Return results as grid. Also see Client.readAll.
(conn: Obj, id: Obj, range: Obj?) => Grid <admin>
Perform Haystack REST API "hisRead" call to read history data for the record identified by the id (must be Ref). The range is any string encoding supported by the REST API or any value supported by toDateSpan(). Return results as grid with "ts" and "val" column.
(conn: Obj, id: Obj, action: Str, args: Dict?) => Obj? <admin>
Invoke a remote action on the given Haystack connector and remote entity. The id must be a Ref of the remote entity's identifier and action is a Str action name. If args are specified, then they should be a Dict keyed by parameter name.
(conn: Obj, expr: Obj?, opts: Dict?) => Obj? <admin>
Evaluate an Axon expression in a remote server over a haystack connector. The remote server must be a SkySpark server which supports the "eval" REST op with an Axon expression. This function blocks while the network request is made. The result is always returned as a Grid using the same rules as Etc.toGrid.
The expression to evaluate in the remote server may capture
variables from the local scope. If these variables are atomic types,
then they are captured as defined by local scope and serialized
to the remote server. Pass {debug} for opts to dump to stdout
the actual expr with serialized scope.
Options:
debug: dumps full expr with seralized scope to stdoutevalTimeout: duration number to override remote project's default evalTimeout
Examples:
read(haystackConn).haystackEval(3 + 4)
read(haystackConn).haystackEval(readAll(site))
read(haystackConn).haystackEval(readAll(kw).hisRead(yesterday))