Loading...
Searching...
No Matches
NAF::Functions::Action Class Reference
Inheritance diagram for NAF::Functions::Action:
NAF::Functions::CacheAction

Public Types

using Ptr = std::shared_ptr<Action>
 

Public Member Functions

 Action (std::string identifier)
 
std::string get_identifier () const
 
std::string get_status () const
 
std::string get_message () const
 
std::string get_custom_error () const
 
int get_last_insert_id () const
 
bool get_final () const
 
bool get_error () const
 
std::vector< Query::Parameter::Ptr > & get_parameters ()
 
Query::Condition< Action & >::Ptr get_condition ()
 
Query::Results::Ptr get_results ()
 
JSON::Object::Ptr get_json_result ()
 
std::vector< Ptr > & get_actions_container ()
 
std::string get_sql_code () const
 
std::string get_final_query () const
 
int get_affected_rows_ () const
 
std::shared_ptr< Data::Session > & get_session ()
 
std::shared_ptr< Data::Statement > & get_query ()
 
Query::DatabaseManager::Credentialsget_credentials ()
 
void set_identifier (std::string identifier)
 
void set_status (std::string status)
 
void set_message (std::string message)
 
void set_custom_error (std::string custom_error)
 
void set_final (bool final)
 
void set_error (bool error)
 
void set_sql_code (std::string sql_code)
 
void set_final_query (std::string final_query)
 
void ReplaceParamater_ (Query::Parameter::Ptr parameter)
 
std::vector< Query::Parameter::Ptr >::iterator GetParameter (std::string name)
 
Query::Parameter::Ptr AddParameter_ (std::string name, std::string value_string, bool editable)
 
Query::Parameter::Ptr AddParameter_ (std::string name, const char *value_string, bool editable)
 
Query::Parameter::Ptr AddParameter_ (std::string name, int value_int, bool editable)
 
Query::Parameter::Ptr AddParameter_ (std::string name, float value_float, bool editable)
 
Query::Parameter::Ptr AddParameter_ (std::string name, bool value_bool, bool editable)
 
Query::Parameter::Ptr AddParameter_ (std::string name, Tools::DValue::Ptr value, bool editable)
 
Query::Parameter::Ptr AddParameter_ (std::string name, Query::Field::Position field_position, std::string related_action, bool editable)
 
void SetupCondition_ (std::string identifier, Query::ConditionType type, Query::Condition< Action & >::Functor functor)
 
bool ComposeQuery_ ()
 
void ExecuteQuery_ ()
 
void ExecuteAsyncQuery_ ()
 
void MakeResults_ ()
 
JSON::Object::Ptr CreateJSONResult_ ()
 
virtual bool Work_ ()
 

Protected Member Functions

void GetLastInsertID_ ()
 
void NotifyError_ (std::string message)
 
void SetupPositionParameter_ (Query::Parameter::Ptr parameter)
 
bool VerifyParameterCondition_ (Query::Parameter::Ptr parameter)
 
bool VerifyCondition_ ()