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

#include <ISetProjector.h>

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

Public Member Functions

 ISetProjector (const std::string &to)
 
virtual ~ISetProjector ()=default
 
virtual void project (const RapidJsonDocument &json, std::vector< std::unique_ptr< RJDocument >> &newDocs, bool view=false)=0
 
virtual std::string getToPointer () const final
 
RJPointer getRawToPointer () const
 
virtual std::string getType ()=0
 
virtual std::string toString ()
 
virtual std::vector< std::string > getAttributes () const =0
 

Protected Member Functions

unsigned long multiplicate (std::vector< std::unique_ptr< RJDocument >> &newDocs, int times)
 
void fillArrayRangeWithVal (std::vector< std::unique_ptr< RJDocument >> &newDocs, unsigned long origDocs, int i, RJValue &val)
 

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:N transformations

Constructor & Destructor Documentation

◆ ISetProjector()

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

Initializes one ISetProjector with a given destination pointer-string

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

◆ ~ISetProjector()

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

Member Function Documentation

◆ fillArrayRangeWithVal()

void joda::query::ISetProjector::fillArrayRangeWithVal ( std::vector< std::unique_ptr< RJDocument >> &  newDocs,
unsigned long  origDocs,
int  i,
RJValue val 
)
inlineprotected
Here is the caller graph for this function:

◆ getAttributes()

virtual std::vector<std::string> joda::query::ISetProjector::getAttributes ( ) const
pure virtual

Returns a list of attributes used by this projection

Returns

Implemented in joda::query::FlattenProjector.

◆ getRawToPointer()

RJPointer joda::query::ISetProjector::getRawToPointer ( ) const
inline

Returns the destination pointer

Returns

◆ getToPointer()

virtual std::string joda::query::ISetProjector::getToPointer ( ) const
inlinefinalvirtual

Returns the destination pointer string

Returns

◆ getType()

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

Returns a string representing the transformation function

Returns

Implemented in joda::query::FlattenProjector.

◆ multiplicate()

unsigned long joda::query::ISetProjector::multiplicate ( std::vector< std::unique_ptr< RJDocument >> &  newDocs,
int  times 
)
inlineprotected
Here is the caller graph for this function:

◆ project()

virtual void joda::query::ISetProjector::project ( const RapidJsonDocument json,
std::vector< std::unique_ptr< RJDocument >> &  newDocs,
bool  view = false 
)
pure virtual

Projects a value from a source document into the destination document.

Parameters
jsonthe source document, used to retrieve values from
newDocsthe destination documents, used to store transformed values in

Implemented in joda::query::FlattenProjector.

◆ toString()

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

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

Returns

Reimplemented in joda::query::FlattenProjector.

Here is the caller graph for this function:

Field Documentation

◆ ptr

RJPointer joda::query::ISetProjector::ptr
protected

◆ ptr_str

std::string joda::query::ISetProjector::ptr_str
protected

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