Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
InformationScripting::ScriptQuery Class Reference
Inheritance diagram for InformationScripting::ScriptQuery:
InformationScripting::LinearQuery InformationScripting::Query

Public Member Functions

 ScriptQuery (const QString &scriptPath, Model::Node *target, const QStringList &args, QueryExecutor *executor)
 
virtual Optional< TupleSetexecuteLinear (TupleSet input) override
 
- Public Member Functions inherited from InformationScripting::LinearQuery
 LinearQuery (Model::Node *target=nullptr)
 
virtual QList< Optional< TupleSet > > execute (QList< TupleSet > input) override
 
- Public Member Functions inherited from InformationScripting::Query
 Query (Model::Node *target=nullptr)
 
virtual ~Query ()=default
 
bool hasInput () const
 
virtual void setHasInput ()
 
Model::Nodetarget () const
 

Static Public Member Functions

static void unloadPythonEnvironment ()
 

Private Member Functions

QList< TupleSetbuildAndExecuteQueryFromPython (QString queryString, boost::python::list input)
 
QList< TupleSetconvertInput (boost::python::list input)
 Requires input to be a list of TupleSet. More...
 
QList< TupleSetexecuteQueryFromPython (QString name, boost::python::list args, boost::python::list input)
 
QList< TupleSetextractResult (QList< Optional< TupleSet >> result, const QString &name)
 Extracts the values in result. More...
 
void importStar (boost::python::dict &main_namespace, boost::python::object apiObject)
 

Private Attributes

QList< QString > arguments_
 
QueryExecutorexecutor_ {}
 
QString scriptPath_
 

Constructor & Destructor Documentation

◆ ScriptQuery()

InformationScripting::ScriptQuery::ScriptQuery ( const QString &  scriptPath,
Model::Node target,
const QStringList &  args,
QueryExecutor executor 
)

Member Function Documentation

◆ buildAndExecuteQueryFromPython()

QList< TupleSet > InformationScripting::ScriptQuery::buildAndExecuteQueryFromPython ( QString  queryString,
boost::python::list  input 
)
private

◆ convertInput()

QList< TupleSet > InformationScripting::ScriptQuery::convertInput ( boost::python::list  input)
private

Requires input to be a list of TupleSet.

◆ executeLinear()

Optional< TupleSet > InformationScripting::ScriptQuery::executeLinear ( TupleSet  input)
overridevirtual

◆ executeQueryFromPython()

QList< TupleSet > InformationScripting::ScriptQuery::executeQueryFromPython ( QString  name,
boost::python::list  args,
boost::python::list  input 
)
private

◆ extractResult()

QList< TupleSet > InformationScripting::ScriptQuery::extractResult ( QList< Optional< TupleSet >>  result,
const QString &  name 
)
private

Extracts the values in result.

In case a value in result has an error the function throws a QueryRuntimeException.

◆ importStar()

void InformationScripting::ScriptQuery::importStar ( boost::python::dict &  main_namespace,
boost::python::object  apiObject 
)
private

◆ unloadPythonEnvironment()

void InformationScripting::ScriptQuery::unloadPythonEnvironment ( )
static

Member Data Documentation

◆ arguments_

QList<QString> InformationScripting::ScriptQuery::arguments_
private

◆ executor_

QueryExecutor* InformationScripting::ScriptQuery::executor_ {}
private

◆ scriptPath_

QString InformationScripting::ScriptQuery::scriptPath_
private