Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Waher.Things.Queries.CompoundQuery Class Reference

Class handling the reception of data from a query on multiple nodes. More...

Inheritance diagram for Waher.Things.Queries.CompoundQuery:
Waher.Things.Queries.Query Waher.Events.IObservableLayer

Public Member Functions

 CompoundQuery (string CommandId, string QueryId, object State, Language Language, IEnumerable< Query > Queries, RequestOrigin Origin)
 Class handling the reception of data from a query on multiple nodes. More...
 
override async Task Abort ()
 Aborts the query. More...
 
int NextSequenceNumber ()
 Gets the next sequence number. More...
 
Task Start ()
 Starts query execution. More...
 
async Task Done ()
 Query execution completed. More...
 
Task NewTable (string TableId, string TableName, params Column[] Columns)
 Defines a new table in the query output. More...
 
Task NewRecords (string TableId, params Record[] Records)
 Reports a new set of records in a table. More...
 
Task TableDone (string TableId)
 Reports a table as being complete. More...
 
Task NewObject (object Object)
 Reports a new object. More...
 
Task LogMessage (Exception Exception)
 Logs an Exception as a query message. More...
 
Task LogMessage (QueryEventLevel Level, Exception Exception)
 Logs an Exception as a query message. More...
 
Task LogMessage (QueryEventType Type, QueryEventLevel Level, string Body)
 Logs a query message. More...
 
Task SetTitle (string Title)
 Sets the title of the report. More...
 
Task SetStatus (string Status)
 Sets the current status of the query execution. More...
 
Task BeginSection (string Header)
 Begins a new section. Sections can be nested. Each call to BeginSection(string) must be followed by a call to EndSection(). More...
 
Task EndSection ()
 Ends a section. Each call to BeginSection(string) must be followed by a call to EndSection(). More...
 
void Information (string Comment)
 Called to inform the viewer of something. More...
 
void Information (DateTime Timestamp, string Comment)
 Called to inform the viewer of something. More...
 
void Warning (string Warning)
 Called to inform the viewer of a warning state. More...
 
void Warning (DateTime Timestamp, string Warning)
 Called to inform the viewer of a warning state. More...
 
void Error (string Error)
 Called to inform the viewer of an error state. More...
 
void Error (DateTime Timestamp, string Error)
 Called to inform the viewer of an error state. More...
 
void Exception (Exception Exception)
 Called to inform the viewer of an exception state. More...
 
void Exception (string Exception)
 Called to inform the viewer of an exception state. More...
 
void Exception (DateTime Timestamp, string Exception)
 Called to inform the viewer of an exception state. More...
 
void Exception (DateTime Timestamp, Exception Exception)
 Called to inform the viewer of an exception state. More...
 

Properties

IEnumerable< Query > Queries [get]
 Queries More...
 
string CommandID [get]
 Command ID More...
 
string QueryID [get]
 Query ID More...
 
object State [get]
 State object. More...
 
Language Language [get]
 Language of query. More...
 
INode NodeReference [get]
 Node reference. More...
 
RequestOrigin Origin [get]
 Origin of request to execute the query. More...
 
bool IsStarted [get]
 If the query has been started. More...
 
bool IsAborted [get]
 If the query is aborted. More...
 
bool IsDone [get]
 If the query is done. More...
 
int SequenceNumber [get]
 Curernt sequence number counter. More...
 
int NrSectionsBegun [get]
 Number of sectios begun. More...
 
int NrSectionsEnded [get]
 Number of sectios ended. More...
 
int NrTablesStarted [get]
 Number of tables started. More...
 
int NrTablesCompleted [get]
 Number of tables compeleted. More...
 
int NrObjectsReported [get]
 Number of objects reported. More...
 
int NrMessagesReported [get]
 Number of messages reported. More...
 
int NrRecordsReported [get]
 Number of records reported. More...
 
int NrTotalItemsReported [get]
 Number of items (total) reported. More...
 
bool HasTitle [get]
 If a title has been set More...
 
bool HasReported [get]
 If anything has been reported. More...
 
bool DecoupledEvents [get]
 If events raised from the communication layer are decoupled, i.e. executed in parallel with the source that raised them. More...
 

Events

EventHandlerAsync< QueryEventArgs > OnAborted = null
 Event raised when the query has been aborted. More...
 
EventHandlerAsync< QueryEventArgs > OnStarted = null
 Event raised when the query has been aborted. More...
 
EventHandlerAsync< QueryEventArgs > OnDone = null
 Event raised when query has been completed. More...
 
EventHandlerAsync< QueryNewTableEventArgs > OnNewTable = null
 Event raised when a new table has been created. More...
 
EventHandlerAsync< QueryNewRecordsEventArgs > OnNewRecords = null
 Event raised when new records are reported for a table. More...
 
EventHandlerAsync< QueryTableEventArgs > OnTableDone = null
 Event raised when a table is completed. More...
 
EventHandlerAsync< QueryObjectEventArgs > OnNewObject = null
 Event raised when new records are reported for a table. More...
 
EventHandlerAsync< QueryMessageEventArgs > OnMessage = null
 Event raised when a new message has been received. More...
 
EventHandlerAsync< QueryTitleEventArgs > OnTitle = null
 Event raised when the report title has been set. More...
 
EventHandlerAsync< QueryStatusEventArgs > OnStatus = null
 Event raised when the current status changes. More...
 
EventHandlerAsync< QueryTitleEventArgs > OnBeginSection = null
 Event raised when a new section is created. More...
 
EventHandlerAsync< QueryEventArgs > OnEndSection = null
 Event raised when a section is closed. More...
 

Detailed Description

Class handling the reception of data from a query on multiple nodes.

Definition at line 10 of file CompoundQuery.cs.

Constructor & Destructor Documentation

◆ CompoundQuery()

Waher.Things.Queries.CompoundQuery.CompoundQuery ( string  CommandId,
string  QueryId,
object  State,
Language  Language,
IEnumerable< Query >  Queries,
RequestOrigin  Origin 
)

Class handling the reception of data from a query on multiple nodes.

Parameters
CommandIdCommand ID
QueryIdQuery ID
StateState object.
LanguageLanguage of query.
QueriesQueries
OriginOrigin of request to execute the query.

Definition at line 23 of file CompoundQuery.cs.

Member Function Documentation

◆ Abort()

override async Task Waher.Things.Queries.CompoundQuery.Abort ( )
virtual

Aborts the query.

Reimplemented from Waher.Things.Queries.Query.

Definition at line 114 of file CompoundQuery.cs.

◆ BeginSection()

Task Waher.Things.Queries.Query.BeginSection ( string  Header)
inherited

Begins a new section. Sections can be nested. Each call to BeginSection(string) must be followed by a call to EndSection().

Parameters
HeaderSection Title.

Definition at line 483 of file Query.cs.

◆ Done()

async Task Waher.Things.Queries.Query.Done ( )
inherited

Query execution completed.

Definition at line 241 of file Query.cs.

◆ EndSection()

Task Waher.Things.Queries.Query.EndSection ( )
inherited

Ends a section. Each call to BeginSection(string) must be followed by a call to EndSection().

Definition at line 504 of file Query.cs.

◆ Error() [1/2]

void Waher.Things.Queries.Query.Error ( DateTime  Timestamp,
string  Error 
)
inherited

Called to inform the viewer of an error state.

Parameters
TimestampTimestamp of event.
ErrorError.

Implements Waher.Events.IObservableLayer.

◆ Error() [2/2]

void Waher.Things.Queries.Query.Error ( string  Error)
inherited

Called to inform the viewer of an error state.

Parameters
ErrorError.

Implements Waher.Events.IObservableLayer.

◆ Exception() [1/4]

void Waher.Things.Queries.Query.Exception ( DateTime  Timestamp,
Exception  Exception 
)
inherited

Called to inform the viewer of an exception state.

Parameters
TimestampTimestamp of event.
ExceptionException.

Implements Waher.Events.IObservableLayer.

◆ Exception() [2/4]

void Waher.Things.Queries.Query.Exception ( DateTime  Timestamp,
string  Exception 
)
inherited

Called to inform the viewer of an exception state.

Parameters
TimestampTimestamp of event.
ExceptionException.

Implements Waher.Events.IObservableLayer.

◆ Exception() [3/4]

void Waher.Things.Queries.Query.Exception ( Exception  Exception)
inherited

Called to inform the viewer of an exception state.

Parameters
ExceptionException.

Implements Waher.Events.IObservableLayer.

◆ Exception() [4/4]

void Waher.Things.Queries.Query.Exception ( string  Exception)
inherited

Called to inform the viewer of an exception state.

Parameters
ExceptionException.

Implements Waher.Events.IObservableLayer.

◆ Information() [1/2]

void Waher.Things.Queries.Query.Information ( DateTime  Timestamp,
string  Comment 
)
inherited

Called to inform the viewer of something.

Parameters
TimestampTimestamp of event.
CommentComment.

Implements Waher.Events.IObservableLayer.

◆ Information() [2/2]

void Waher.Things.Queries.Query.Information ( string  Comment)
inherited

Called to inform the viewer of something.

Parameters
CommentComment.

Implements Waher.Events.IObservableLayer.

◆ LogMessage() [1/3]

Task Waher.Things.Queries.Query.LogMessage ( Exception  Exception)
inherited

Logs an Exception as a query message.

Parameters
ExceptionException being logged.

Definition at line 381 of file Query.cs.

◆ LogMessage() [2/3]

Task Waher.Things.Queries.Query.LogMessage ( QueryEventLevel  Level,
Exception  Exception 
)
inherited

Logs an Exception as a query message.

Parameters
LevelEvent level.
ExceptionException being logged.

Definition at line 391 of file Query.cs.

◆ LogMessage() [3/3]

Task Waher.Things.Queries.Query.LogMessage ( QueryEventType  Type,
QueryEventLevel  Level,
string  Body 
)
inherited

Logs a query message.

Parameters
TypeEvent type.
LevelEvent level.
BodyEvent message body.

Definition at line 403 of file Query.cs.

◆ NewObject()

Task Waher.Things.Queries.Query.NewObject ( object  Object)
inherited

Reports a new object.

Parameters
ObjectObject

Definition at line 354 of file Query.cs.

◆ NewRecords()

Task Waher.Things.Queries.Query.NewRecords ( string  TableId,
params Record[]  Records 
)
inherited

Reports a new set of records in a table.

Parameters
TableIdTable ID
RecordsNew records.

Definition at line 300 of file Query.cs.

◆ NewTable()

Task Waher.Things.Queries.Query.NewTable ( string  TableId,
string  TableName,
params Column[]  Columns 
)
inherited

Defines a new table in the query output.

Parameters
TableIdID of table.
TableNameLocalized name of table.
ColumnsColumns.

Definition at line 272 of file Query.cs.

◆ NextSequenceNumber()

int Waher.Things.Queries.Query.NextSequenceNumber ( )
inherited

Gets the next sequence number.

Returns
Next sequence number.

Definition at line 169 of file Query.cs.

◆ SetStatus()

Task Waher.Things.Queries.Query.SetStatus ( string  Status)
inherited

Sets the current status of the query execution.

Parameters
StatusStatus message.

Definition at line 457 of file Query.cs.

◆ SetTitle()

Task Waher.Things.Queries.Query.SetTitle ( string  Title)
inherited

Sets the title of the report.

Parameters
TitleTitle.

Definition at line 430 of file Query.cs.

◆ Start()

Task Waher.Things.Queries.Query.Start ( )
inherited

Starts query execution.

Definition at line 213 of file Query.cs.

◆ TableDone()

Task Waher.Things.Queries.Query.TableDone ( string  TableId)
inherited

Reports a table as being complete.

Parameters
TableIdID of table.

Definition at line 327 of file Query.cs.

◆ Warning() [1/2]

void Waher.Things.Queries.Query.Warning ( DateTime  Timestamp,
string  Warning 
)
inherited

Called to inform the viewer of a warning state.

Parameters
TimestampTimestamp of event.
WarningWarning.

Implements Waher.Events.IObservableLayer.

◆ Warning() [2/2]

void Waher.Things.Queries.Query.Warning ( string  Warning)
inherited

Called to inform the viewer of a warning state.

Parameters
WarningWarning.

Implements Waher.Events.IObservableLayer.

Property Documentation

◆ CommandID

string Waher.Things.Queries.Query.CommandID
getinherited

Command ID

Definition at line 55 of file Query.cs.

◆ DecoupledEvents

bool Waher.Things.Queries.Query.DecoupledEvents
getinherited

If events raised from the communication layer are decoupled, i.e. executed in parallel with the source that raised them.

Implements Waher.Events.IObservableLayer.

Definition at line 527 of file Query.cs.

◆ HasReported

bool Waher.Things.Queries.Query.HasReported
getinherited

If anything has been reported.

Definition at line 163 of file Query.cs.

◆ HasTitle

bool Waher.Things.Queries.Query.HasTitle
getinherited

If a title has been set

Definition at line 158 of file Query.cs.

◆ IsAborted

bool Waher.Things.Queries.Query.IsAborted
getinherited

If the query is aborted.

Definition at line 90 of file Query.cs.

◆ IsDone

bool Waher.Things.Queries.Query.IsDone
getinherited

If the query is done.

Definition at line 95 of file Query.cs.

◆ IsStarted

bool Waher.Things.Queries.Query.IsStarted
getinherited

If the query has been started.

Definition at line 85 of file Query.cs.

◆ Language

Language Waher.Things.Queries.Query.Language
getinherited

Language of query.

Definition at line 70 of file Query.cs.

◆ NodeReference

INode Waher.Things.Queries.Query.NodeReference
getinherited

Node reference.

Definition at line 75 of file Query.cs.

◆ NrMessagesReported

int Waher.Things.Queries.Query.NrMessagesReported
getinherited

Number of messages reported.

Definition at line 130 of file Query.cs.

◆ NrObjectsReported

int Waher.Things.Queries.Query.NrObjectsReported
getinherited

Number of objects reported.

Definition at line 125 of file Query.cs.

◆ NrRecordsReported

int Waher.Things.Queries.Query.NrRecordsReported
getinherited

Number of records reported.

Definition at line 135 of file Query.cs.

◆ NrSectionsBegun

int Waher.Things.Queries.Query.NrSectionsBegun
getinherited

Number of sectios begun.

Definition at line 105 of file Query.cs.

◆ NrSectionsEnded

int Waher.Things.Queries.Query.NrSectionsEnded
getinherited

Number of sectios ended.

Definition at line 110 of file Query.cs.

◆ NrTablesCompleted

int Waher.Things.Queries.Query.NrTablesCompleted
getinherited

Number of tables compeleted.

Definition at line 120 of file Query.cs.

◆ NrTablesStarted

int Waher.Things.Queries.Query.NrTablesStarted
getinherited

Number of tables started.

Definition at line 115 of file Query.cs.

◆ NrTotalItemsReported

int Waher.Things.Queries.Query.NrTotalItemsReported
getinherited

Number of items (total) reported.

Definition at line 140 of file Query.cs.

◆ Origin

RequestOrigin Waher.Things.Queries.Query.Origin
getinherited

Origin of request to execute the query.

Definition at line 80 of file Query.cs.

◆ Queries

IEnumerable<Query> Waher.Things.Queries.CompoundQuery.Queries
get

Queries

Definition at line 109 of file CompoundQuery.cs.

◆ QueryID

string Waher.Things.Queries.Query.QueryID
getinherited

Query ID

Definition at line 60 of file Query.cs.

◆ SequenceNumber

int Waher.Things.Queries.Query.SequenceNumber
getinherited

Curernt sequence number counter.

Definition at line 100 of file Query.cs.

◆ State

object Waher.Things.Queries.Query.State
getinherited

State object.

Definition at line 65 of file Query.cs.

Event Documentation

◆ OnAborted

EventHandlerAsync<QueryEventArgs> Waher.Things.Queries.Query.OnAborted = null
inherited

Event raised when the query has been aborted.

Definition at line 208 of file Query.cs.

◆ OnBeginSection

EventHandlerAsync<QueryTitleEventArgs> Waher.Things.Queries.Query.OnBeginSection = null
inherited

Event raised when a new section is created.

Definition at line 498 of file Query.cs.

◆ OnDone

EventHandlerAsync<QueryEventArgs> Waher.Things.Queries.Query.OnDone = null
inherited

Event raised when query has been completed.

Definition at line 264 of file Query.cs.

◆ OnEndSection

EventHandlerAsync<QueryEventArgs> Waher.Things.Queries.Query.OnEndSection = null
inherited

Event raised when a section is closed.

Definition at line 519 of file Query.cs.

◆ OnMessage

EventHandlerAsync<QueryMessageEventArgs> Waher.Things.Queries.Query.OnMessage = null
inherited

Event raised when a new message has been received.

Definition at line 424 of file Query.cs.

◆ OnNewObject

EventHandlerAsync<QueryObjectEventArgs> Waher.Things.Queries.Query.OnNewObject = null
inherited

Event raised when new records are reported for a table.

Definition at line 375 of file Query.cs.

◆ OnNewRecords

EventHandlerAsync<QueryNewRecordsEventArgs> Waher.Things.Queries.Query.OnNewRecords = null
inherited

Event raised when new records are reported for a table.

Definition at line 321 of file Query.cs.

◆ OnNewTable

EventHandlerAsync<QueryNewTableEventArgs> Waher.Things.Queries.Query.OnNewTable = null
inherited

Event raised when a new table has been created.

Definition at line 293 of file Query.cs.

◆ OnStarted

EventHandlerAsync<QueryEventArgs> Waher.Things.Queries.Query.OnStarted = null
inherited

Event raised when the query has been aborted.

Definition at line 236 of file Query.cs.

◆ OnStatus

EventHandlerAsync<QueryStatusEventArgs> Waher.Things.Queries.Query.OnStatus = null
inherited

Event raised when the current status changes.

Definition at line 476 of file Query.cs.

◆ OnTableDone

EventHandlerAsync<QueryTableEventArgs> Waher.Things.Queries.Query.OnTableDone = null
inherited

Event raised when a table is completed.

Definition at line 348 of file Query.cs.

◆ OnTitle

EventHandlerAsync<QueryTitleEventArgs> Waher.Things.Queries.Query.OnTitle = null
inherited

Event raised when the report title has been set.

Definition at line 451 of file Query.cs.


The documentation for this class was generated from the following file: