#include <sql_service_command.h>
 | 
|   | Sql_service_command_interface () | 
|   | 
|   | ~Sql_service_command_interface () | 
|   | 
| int  | establish_session_connection (enum_plugin_con_isolation isolation_param, const char *user, void *plugin_pointer=nullptr) | 
|   | Establishes the connection to the server.  More...
  | 
|   | 
| int  | reestablish_connection (enum_plugin_con_isolation isolation_param, const char *user, void *plugin_pointer=nullptr) | 
|   | Terminates the old connection and creates a new one to the server.  More...
  | 
|   | 
| bool  | is_session_killed () | 
|   | Was this session killed?  More...
  | 
|   | 
| void  | terminate_connection_fields () | 
|   | Stops and deletes all connection related structures.  More...
  | 
|   | 
| Sql_service_interface *  | get_sql_service_interface () | 
|   | Returns the SQL service interface associated to this class.  More...
  | 
|   | 
| int  | set_interface_user (const char *user) | 
|   | Sets the SQL API user to be used on security checks.  More...
  | 
|   | 
| long  | kill_session (unsigned long session_id) | 
|   | Method to kill the session identified by the given session id in those cases where the server hangs while executing the sql query.  More...
  | 
|   | 
| bool  | is_session_valid () | 
|   | Checks if there is an existing session.  More...
  | 
|   | 
| long  | clone_server (std::string &host, std::string &port, std::string &username, std::string &password, bool use_ssl, std::string &error) | 
|   | Method to remotely clone a server.  More...
  | 
|   | 
| long  | execute_query (std::string &query) | 
|   | Execute a query passed as parameter.  More...
  | 
|   | 
| long  | execute_query (std::string &query, std::string &error) | 
|   | Execute a query passed as parameter.  More...
  | 
|   | 
| long  | execute_conditional_query (std::string &query, bool *result) | 
|   | Execute a conditional query passed as parameter.  More...
  | 
|   | 
| long  | execute_conditional_query (std::string &query, bool *result, std::string &error) | 
|   | Execute a conditional query passed as parameter.  More...
  | 
|   | 
◆ Sql_service_command_interface()
      
        
          | Sql_service_command_interface::Sql_service_command_interface  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ ~Sql_service_command_interface()
      
        
          | Sql_service_command_interface::~Sql_service_command_interface  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ clone_server()
      
        
          | long Sql_service_command_interface::clone_server  | 
          ( | 
          std::string &  | 
          host,  | 
        
        
           | 
           | 
          std::string &  | 
          port,  | 
        
        
           | 
           | 
          std::string &  | 
          username,  | 
        
        
           | 
           | 
          std::string &  | 
          password,  | 
        
        
           | 
           | 
          bool  | 
          use_ssl,  | 
        
        
           | 
           | 
          std::string &  | 
          error  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Method to remotely clone a server. 
- Parameters
 - 
  
    | [in] | host | The host to clone  | 
    | [in] | port | The host port  | 
    | [in] | username | The username to authenticate in the remote server  | 
    | [in] | password | The password to authenticate in the remote server  | 
    | [in] | use_ssl | Is ssl configured for the clone process  | 
    | [out] | error | The error message in case of error | 
  
   
- Returns
 - the error value returned 
 
- Return values
 - 
  
    | 0 | OK  | 
    | !=0 | Error on execution  | 
  
   
 
 
◆ establish_session_connection()
      
        
          | int Sql_service_command_interface::establish_session_connection  | 
          ( | 
          enum_plugin_con_isolation  | 
          isolation_param,  | 
        
        
           | 
           | 
          const char *  | 
          user,  | 
        
        
           | 
           | 
          void *  | 
          plugin_pointer = nullptr  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Establishes the connection to the server. 
- Parameters
 - 
  
    | isolation_param | session creation requirements: use current thread, use thread but initialize it or create it in a dedicated thread  | 
    | user | the user for the connection  | 
    | plugin_pointer | the plugin pointer for threaded connections | 
  
   
- Returns
 - the connection was successful 
 
- Return values
 - 
  
  
 
 
 
◆ execute_conditional_query() [1/2]
      
        
          | long Sql_service_command_interface::execute_conditional_query  | 
          ( | 
          std::string &  | 
          query,  | 
        
        
           | 
           | 
          bool *  | 
          result  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Execute a conditional query passed as parameter. 
- Parameters
 - 
  
    | [in] | query | The query to execute  | 
    | [in] | result | The result of the query | 
  
   
- Returns
 - the error value returned 
 
- Return values
 - 
  
    | 0 | OK  | 
    | !=0 | Error on execution  | 
  
   
 
 
◆ execute_conditional_query() [2/2]
      
        
          | long Sql_service_command_interface::execute_conditional_query  | 
          ( | 
          std::string &  | 
          query,  | 
        
        
           | 
           | 
          bool *  | 
          result,  | 
        
        
           | 
           | 
          std::string &  | 
          error  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Execute a conditional query passed as parameter. 
- Parameters
 - 
  
    | [in] | query | The query to execute  | 
    | [in] | result | The result of the query  | 
    | [out] | error | The error message in case of error | 
  
   
- Returns
 - the error value returned 
 
- Return values
 - 
  
    | 0 | OK  | 
    | !=0 | Error on execution  | 
  
   
 
 
◆ execute_query() [1/2]
      
        
          | long Sql_service_command_interface::execute_query  | 
          ( | 
          std::string &  | 
          query | ) | 
           | 
        
      
 
Execute a query passed as parameter. 
- Parameters
 - 
  
    | [in] | query | The query to execute | 
  
   
- Returns
 - the error value returned 
 
- Return values
 - 
  
    | 0 | OK  | 
    | !=0 | Error on execution  | 
  
   
 
 
◆ execute_query() [2/2]
      
        
          | long Sql_service_command_interface::execute_query  | 
          ( | 
          std::string &  | 
          query,  | 
        
        
           | 
           | 
          std::string &  | 
          error  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Execute a query passed as parameter. 
- Parameters
 - 
  
    | [in] | query | The query to execute  | 
    | [out] | error | The error message in case of error | 
  
   
- Returns
 - the error value returned 
 
- Return values
 - 
  
    | 0 | OK  | 
    | !=0 | Error on execution  | 
  
   
 
 
◆ get_sql_service_interface()
Returns the SQL service interface associated to this class. 
- Returns
 - the sql service interface field 
 
 
 
◆ is_session_killed()
      
        
          | bool Sql_service_command_interface::is_session_killed  | 
          ( | 
           | ) | 
           | 
        
      
 
Was this session killed? 
- Return values
 - 
  
    | true | session was killed  | 
    | false | session was not killed  | 
  
   
 
 
◆ is_session_valid()
      
        
          | bool Sql_service_command_interface::is_session_valid  | 
          ( | 
           | ) | 
           | 
        
      
 
Checks if there is an existing session. 
- Returns
 - the error value returned 
 
- Return values
 - 
  
    | true | valid  | 
    | false | some issue prob happened on connection  | 
  
   
 
 
◆ kill_session()
      
        
          | long Sql_service_command_interface::kill_session  | 
          ( | 
          unsigned long  | 
          session_id | ) | 
           | 
        
      
 
Method to kill the session identified by the given session id in those cases where the server hangs while executing the sql query. 
- Parameters
 - 
  
    | session_id | id of the session to be killed. | 
  
   
- Returns
 - the error value returned 
 
- Return values
 - 
  
  
 
 
 
◆ reestablish_connection()
Terminates the old connection and creates a new one to the server. 
- Parameters
 - 
  
    | isolation_param | session creation requirements: use current thread, use thread but initialize it or create it in a dedicated thread  | 
    | user | the user for the connection  | 
    | plugin_pointer | the plugin pointer for threaded connections | 
  
   
- Returns
 - the connection was successful 
 
- Return values
 - 
  
  
 
 
 
◆ set_interface_user()
      
        
          | int Sql_service_command_interface::set_interface_user  | 
          ( | 
          const char *  | 
          user | ) | 
           | 
        
      
 
Sets the SQL API user to be used on security checks. 
- Parameters
 - 
  
  
 
- Returns
 - the operation was successful 
 
- Return values
 - 
  
  
 
 
 
◆ terminate_connection_fields()
      
        
          | void Sql_service_command_interface::terminate_connection_fields  | 
          ( | 
           | ) | 
           | 
        
      
 
Stops and deletes all connection related structures. 
 
 
◆ connection_thread_isolation
◆ m_plugin_session_thread
◆ m_server_interface
The internal SQL session service interface to the server. 
 
 
◆ sql_service_commands
The documentation for this class was generated from the following files: