MetriVis Overview | Download | User Manual | Development
Reference Overview | Design Documentation | Reference Backend | Reference Frontend

metrivis::SQL2JsonConverter Class Reference

Converts the SQL reply to JSON format. More...

#include <SQL2JsonConverter.h>

Inheritance diagram for metrivis::SQL2JsonConverter:

metrivis::PipelineProcess

Public Member Functions

 SQL2JsonConverter ()
 Default constructor.
virtual ~SQL2JsonConverter ()
 Deconstructor.
virtual void Execute ()
 Executes the SQL2JsonConverter. Produces ouput data from input.
void set_target (const std::string &target)
 Interface function to member variable target.
void set_type (const std::string &type)
 Interface function to member variable type.
void set_action (const std::string &action)
 Interface function to member variable action.
void set_callback (const std::string &callback)
 Interface function to member variable callback.

Protected Member Functions

void ExecuteSelect ()
 Separate execution function for SQL SELECT commands.
void ExecuteDelete ()
 Separate execution function for SQL DELETE commands.
void ExecuteInsert ()
 Separate execution function for SQL INSERT commands.

Private Attributes

std::string target_
 The SQL column names to retrieve.
std::string type_
 The type of the return value.
std::string action_
 The SQL action to execute.
std::string callback_
 Callback function to be called.

Detailed Description

Converts the SQL reply to JSON format.

Constructor & Destructor Documentation

metrivis::SQL2JsonConverter::SQL2JsonConverter (  ) 

Default constructor.

Constructor.


Member Function Documentation

void metrivis::SQL2JsonConverter::Execute (  )  [virtual]

Executes the SQL2JsonConverter. Produces ouput data from input.

Executes this process and evaluates this input data and creates output from it. Abstract function needs to be overloaded.

See header file for more information.

Implements metrivis::PipelineProcess.

void metrivis::SQL2JsonConverter::set_target ( const std::string &  target  )  [inline]

Interface function to member variable target.

Parameters:
target,: The name of the columns to retrieve.

void metrivis::SQL2JsonConverter::set_type ( const std::string &  type  )  [inline]

Interface function to member variable type.

Parameters:
target,: The type of the data to retrieve {"string", "double"}.

void metrivis::SQL2JsonConverter::set_action ( const std::string &  action  )  [inline]

Interface function to member variable action.

Parameters:
action,: The SQL action to be executed.
The action may be one of the following SQL commands:

void metrivis::SQL2JsonConverter::set_callback ( const std::string &  callback  )  [inline]

Interface function to member variable callback.

Parameters:
target,: The callback function to be called client side (JavaScript).
This function will be called on the client side once the data is been delivered to the client.

void metrivis::SQL2JsonConverter::ExecuteSelect (  )  [protected]

Separate execution function for SQL SELECT commands.

See header file for more information.

void metrivis::SQL2JsonConverter::ExecuteDelete (  )  [protected]

Separate execution function for SQL DELETE commands.

See header file for more information.

void metrivis::SQL2JsonConverter::ExecuteInsert (  )  [protected]

Separate execution function for SQL INSERT commands.

See header file for more information.


The documentation for this class was generated from the following files:
Generated on Fri Feb 29 16:47:20 2008 for MetriVis by  doxygen 1.5.3