DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::oks::QueryPath Class Reference

#include <query.hpp>

Collaboration diagram for dunedaq::oks::QueryPath:
[legend]

Public Member Functions

 QueryPath (const OksObject *o, QueryPathExpression *qpe)
 
 QueryPath (const std::string &query, const OksKernel &)
 
 ~QueryPath ()
 
const QueryPathExpressionget_start_expression () const
 
const OksObjectget_goal_object () const
 

Private Attributes

const OksObjectp_goal
 
QueryPathExpressionp_start
 

Detailed Description

Class QueryPath describes special type of query to calculate path (i.e list of objects) between two given objects. The use case is to get a path in several trees using the same leave objects. Note for composite objects and exclusive relationships, the usage of reverse composite relationships is more effective. In such case there is the only tree built on top of given leaves.

Example

The example of query is shown below: "(path-to "my-id@my-class" (direct "A" "B" (nested "N" (direct "X" "Y" "Z"))))"

The destination object is "my-id@my-class". The search can be started from any object of any class. In our example the start object has to have two relationships named "A" and "B". An object referenced via "A" and "B" should have relationship "N". In our example it is possible to lookup for path via nested objects linked via relationship "N". Finally all objects referenced via "N" should have relationships "X", "Y" and "Z". If the destination object is referenced by them, the path is found. The result of path query execution is list of objects between the start and the destination object.

Definition at line 382 of file query.hpp.

Constructor & Destructor Documentation

◆ QueryPath() [1/2]

dunedaq::oks::QueryPath::QueryPath ( const OksObject * o,
QueryPathExpression * qpe )
inline

Definition at line 387 of file query.hpp.

387: p_goal(o), p_start(qpe) { }
const OksObject * p_goal
Definition query.hpp:396
QueryPathExpression * p_start
Definition query.hpp:397

◆ QueryPath() [2/2]

dunedaq::oks::QueryPath::QueryPath ( const std::string & query,
const OksKernel &  )

◆ ~QueryPath()

dunedaq::oks::QueryPath::~QueryPath ( )
inline

Definition at line 389 of file query.hpp.

389{delete p_start;}

Member Function Documentation

◆ get_goal_object()

const OksObject * dunedaq::oks::QueryPath::get_goal_object ( ) const
inline

Definition at line 392 of file query.hpp.

392{ return p_goal; }

◆ get_start_expression()

const QueryPathExpression * dunedaq::oks::QueryPath::get_start_expression ( ) const
inline

Definition at line 391 of file query.hpp.

391{ return p_start; }

Member Data Documentation

◆ p_goal

const OksObject* dunedaq::oks::QueryPath::p_goal
private

Definition at line 396 of file query.hpp.

◆ p_start

QueryPathExpression* dunedaq::oks::QueryPath::p_start
private

Definition at line 397 of file query.hpp.


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