Commit 6b43b2dc authored by Peter Waher's avatar Peter Waher

Query feedback

parent 4c32e752
......@@ -945,10 +945,91 @@ elements, is sent in an `iq set` to the concentrator, which returns an empty res
| | `src` | `xs:string` | optional | | Source identity. |
| | `pt` | `xs:string` | optional | | Partition. |
Query feedback
-----------------
### queryProgress
During the execution of a query, the concentrator sends progress updates to the client by sending asynchronous messages containing the `queryProgress` element,
referencing the same `queryId` as defined by the client when requesting the query to be executed, and the node reporting the progress. The `queryProgress`
element contains a set of child elements that report the progress, and that can be used to build a report on the results of the query.
| Element | Attribute | Type | Use | Default | Description |
|:---------------------------|:------------------|:------------------------|:---------|:---------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `queryProgress` | `queryId` | `xs:string` | required | | Machine-readable identity of the query instance being executed. |
| | `id` | `xs:string` | required | | Node identity. |
| | `src` | `xs:string` | optional | | Source identity. |
| | `pt` | `xs:string` | optional | | Partition. |
| `queryStarted` | | | | | Query progress element, showing query execution has started. |
| `queryDone` | | | | | Query progress element, showing query execution has completed. |
| `queryAborted` | | | | | Query progress element, showing query execution has been aborted. |
| `newTable` | | | | | Query progress element that reports the creation of a new table, at the current position in the response. Contains a set of `column` child elements. |
| | `tableId` | `xs:string` | required | | Identity of the table. Will be used in progress updates adding records to the table. |
| | `tableName` | `xs:string` | required | | Human-readable, localized name of the table. |
| `column` | `columnId` | `xs:string` | required | | Identity of the column. |
| | `header` | `xs:string` | optional | | Human-readable, localized header for the column. |
| | `src` | `xs:string` | optional | | If provided, the values in the column are considered to be references to nodes in a data source, identified by this attribute. |
| | `pt` | `xs:string` | optional | | If provided, defines the partition in which the node identities referenced by the values of the column resides. |
| | `fgColor` | `Color` | optional | | Foreground color of column. |
| | `bgColor` | `Color` | optional | | Background color of column. |
| | `alignment` | `Alignment` | optional | | Alignment of column. |
| | `nrDecimals` | `xs:nonNegativeInteger` | optional | | Number of deciamals of values in the column. |
| `newRecords` | | | | | Query progress element that reports new records which have been added to a table. Contains a set of `record` child elements. |
| | `tableId` | `xs:string` | required | | Identity of the table. |
| `record` | | | | | Contains the cells of one row as individual child elements, based on the underlying type of data presented. |
| `boolean` | (value) | `xs:boolean` | | | A boolean-valued cell. |
| `color` | (value) | `Color` | | | A color-valued cell. |
| `date` | (value) | `xs:date` | | | A date-valued cell. |
| `dateTime` | (value) | `xs:dateTime` | | | A date and time-valued cell. |
| `double` | (value) | `xs:double` | | | A double precision floating point-valued cell. |
| `duration` | (value) | `xs:duration` | | | A duration-valued cell. |
| `int` | (value) | `xs:int` | | | A 32-bit integer-valued cell. |
| `long` | (value) | `xs:long` | | | A 64-bit integer-valued cell. |
| `string` | (value) | `xs:string` | | | A string-valued cell. |
| `time` | (value) | `xs:time` | | | A time-valued cell. |
| `base64` | (value) | `xs:base64Binary` | | | A cell containing encoded content. |
| | `contentType` | `xs:string` | required | | Internet Content Type of encoded data. |
| `void` | | | | | An empty cell. |
| `tableDone` | | | | | Query progress element that reports a table has been marked as completed. |
| | `tableId` | `xs:string` | required | | Identifies which table is complete. |
| `newObject` | | `xs:base64Binary` | | | Query progress element that reports the creation of a new object, at the current position in the response. |
| | `contentType` | `xs:string` | required | | Internet Content Type of encoded data. |
| `queryMessage` | | `xs:string` | | | Query progress element that reports a new message. Messages are not part of the visual report, rather they contain informative information about happen during the execution. |
| | `type` | `EventType` | optional | | Type of message being reported. |
| | `level` | `EventLevel` | optional | | Level of seriousness/importance of the message being reported. |
| `title` | | | | | Query progress element that reports a title for the resulting report. |
| | `name` | `xs:string` | required | | Human-readable title of table. |
| `status` | | | | | Query progress element that reports the current status of the query being executed. |
| | `message` | `xs:string` | required | | Human-readable, localized status message describing the current state of the query. |
| `beginSection` | | | | | Query progress element that reports a new section (or subsection) of the report. |
| | `header` | `xs:string` | required | | Human-readable, localized header for the new section. |
| `endSection` | | | | | Query progress element that reports the end of the current section of the report. |
Colors (type `Color`) are defined as 6-digit case-insensitive hexadecimal strings in the format `RRGGBB`.
Column alignment, as defined by the `Alignment` enumeration, can take one of the following values:
| Value | Description |
|:---------|:------------------|
| `Left` | Left alignment. |
| `Center` | Center alignment. |
| `Right` | Right alignment. |
Event message type, as defined by the `EventType` enumeration, can take one of the following values:
| Value | Description |
|:--------------|:-------------------------------------------------------------------------|
| `Exception` | An exception represents an unexpected/unhandled fault condition. |
| `Error` | Represents an error state. A process, device or algorithm failed. |
| `Warning` | Represents a warning state. An error could occur unless action is taken. |
| `Information` | Represents information about the node that is not a warning or an error. |
Represents a level of seriousness/importance of an event message, as defined by the `EventLevel` enumeration, can take one of the following values:
| Value | Description |
|:---------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Major` | Event is of major importance, and probably affect operations. Represents major changes instate, objects created, deleted or failed. |
| `Medium` | Events of more significance, but probability of affecting operations is small. Represents normal changes in state, audits, events that could become major if not properly managed, etc. |
| `Minor` | Event is of lesser importance, frequently occurring, expected or common. |
**Note**: Reporting records in a table can continue, even if the enclosing section of the report has been closed.
Events
------------
......
......@@ -1615,7 +1615,21 @@ purposes.
</xs:annotation>
</xs:attribute>
<!-- newRecords -->
<xs:simpleType name='Color'>
<xs:restriction base='xs:string'>
<xs:pattern value='^[0-9a-fA-F]{6}$'/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name='Alignment'>
<xs:restriction base='xs:string'>
<xs:enumeration value='Left'/>
<xs:enumeration value='Center'/>
<xs:enumeration value='Right'/>
</xs:restriction>
</xs:simpleType>
<!-- newRecords -->
<xs:element name='newRecords'>
<xs:annotation>
......@@ -1712,20 +1726,6 @@ purposes.
</xs:annotation>
</xs:attribute>
<xs:simpleType name='Color'>
<xs:restriction base='xs:string'>
<xs:pattern value='^[0-9a-fA-F]{6}$'/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name='Alignment'>
<xs:restriction base='xs:string'>
<xs:enumeration value='Left'/>
<xs:enumeration value='Center'/>
<xs:enumeration value='Right'/>
</xs:restriction>
</xs:simpleType>
<!-- tableDone -->
<xs:element name='tableDone'>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment