JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Member Functions | Protected Member Functions | Protected Attributes
joda::query::IProjector Class Referenceabstract

#include <IProjector.h>

Inheritance diagram for joda::query::IProjector:
[legend]
Collaboration diagram for joda::query::IProjector:
[legend]

Public Member Functions

 IProjector (const std::string &to)
 
virtual ~IProjector ()=default
 
virtual void project (const RapidJsonDocument &json, RJDocument &newDoc, bool view=false)
 
std::string getToPointer () const
 
const RJPointergetRawToPointer () const
 
virtual std::string getType ()=0
 
virtual std::string toString ()
 
virtual std::vector< std::string > getMaterializeAttributes () const =0
 

Protected Member Functions

virtual RJValue getVal (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc)=0
 

Protected Attributes

RJPointer ptr
 
std::string ptr_str
 

Detailed Description

Interface representing a single transformation used by the AS statement This interface only represents 1:1 transformations

Constructor & Destructor Documentation

◆ IProjector()

joda::query::IProjector::IProjector ( const std::string &  to)
inline

Initializes one IProjector with a given destination pointer-string

Parameters
tothe pointer-string where the transformation result should be stored

◆ ~IProjector()

virtual joda::query::IProjector::~IProjector ( )
virtualdefault

Member Function Documentation

◆ getMaterializeAttributes()

virtual std::vector<std::string> joda::query::IProjector::getMaterializeAttributes ( ) const
pure virtual

Returns a list of attributes that have to be materialized for this projection to work

Returns

Implemented in joda::query::ValueProviderProjector, joda::query::PointerCopyProject, and joda::query::DeletePointerProjector.

◆ getRawToPointer()

const RJPointer& joda::query::IProjector::getRawToPointer ( ) const
inline

Returns the destination pointer

Returns

◆ getToPointer()

std::string joda::query::IProjector::getToPointer ( ) const
inline

Returns the destination pointer string

Returns

◆ getType()

virtual std::string joda::query::IProjector::getType ( )
pure virtual

Returns a string representing the transformation function

Returns

Implemented in joda::query::ValueProviderProjector, joda::query::PointerCopyProject, and joda::query::DeletePointerProjector.

◆ getVal()

virtual RJValue joda::query::IProjector::getVal ( const RapidJsonDocument json,
RJMemoryPoolAlloc alloc 
)
protectedpure virtual

Implemented in joda::query::ValueProviderProjector, joda::query::PointerCopyProject, and joda::query::DeletePointerProjector.

Here is the caller graph for this function:

◆ project()

virtual void joda::query::IProjector::project ( const RapidJsonDocument json,
RJDocument newDoc,
bool  view = false 
)
inlinevirtual

Projects a value from a source document into the destination document. This function uses the (overwritten) getVal function to retrieve the value and stores the result at the to-pointer in the new document

Parameters
jsonthe source document, used to retrieve values from
newDocthe destination document, used to store transformed values in
flagindicating if projecting from a view

Reimplemented in joda::query::DeletePointerProjector.

Here is the call graph for this function:

◆ toString()

virtual std::string joda::query::IProjector::toString ( )
inlinevirtual

Returns a string representing the whole transformation as it would be specified in a query

Returns

Reimplemented in joda::query::ValueProviderProjector, joda::query::PointerCopyProject, and joda::query::DeletePointerProjector.

Here is the caller graph for this function:

Field Documentation

◆ ptr

RJPointer joda::query::IProjector::ptr
protected

◆ ptr_str

std::string joda::query::IProjector::ptr_str
protected

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