1 #ifndef OpenTestSystem_Otx_Runtime_Api_Custom_ISqlImplementation_H
2 #define OpenTestSystem_Otx_Runtime_Api_Custom_ISqlImplementation_H
10 namespace OpenTestSystem {
namespace Otx {
namespace Runtime {
namespace Api {
namespace Custom {
namespace SqlImplementation {
15 namespace OpenTestSystem {
namespace Otx {
namespace Runtime {
namespace Api {
namespace DataTypes {
20 namespace OpenTestSystem {
namespace Otx {
namespace Runtime {
namespace Api {
21 class IRuntimeContext;
45 virtual void CreateConnection(std::shared_ptr<IRuntimeContext> runtimeContext, std::shared_ptr<SqlImplementation::IConnection> connection, std::string connectionString) = 0;
51 virtual void CloseConnection(std::shared_ptr<SqlImplementation::IConnection> connection) = 0;
59 virtual void ExecuteQuery(std::shared_ptr<SqlImplementation::IConnection> connection, std::shared_ptr<SqlImplementation::IResultSet> resultSet, std::string statement) = 0;
70 virtual int ExecuteUpdate(std::shared_ptr<SqlImplementation::IConnection> connection, std::string statement) = 0;
80 virtual bool GetResultValueAsBoolean(std::shared_ptr<SqlImplementation::IResultSet> resultSet, std::shared_ptr<DataTypes::Object> column) = 0;
90 virtual std::shared_ptr<DataTypes::ByteField>
GetResultValueAsByteField(std::shared_ptr<SqlImplementation::IResultSet> resultSet, std::shared_ptr<DataTypes::Object> column) = 0;
100 virtual double GetResultValueAsFloat(std::shared_ptr<SqlImplementation::IResultSet> resultSet, std::shared_ptr<DataTypes::Object> column) = 0;
110 virtual int GetResultValueAsInteger(std::shared_ptr<SqlImplementation::IResultSet> resultSet, std::shared_ptr<DataTypes::Object> column) = 0;
120 virtual std::string
GetResultValueAsString(std::shared_ptr<SqlImplementation::IResultSet> resultSet, std::shared_ptr<DataTypes::Object> column) = 0;
127 virtual bool NextResult(std::shared_ptr<SqlImplementation::IResultSet> resultSet) = 0;
Allows users to implement their own Sql extension.
Definition: ISqlImplementation.h:32
virtual void ExecuteQuery(std::shared_ptr< SqlImplementation::IConnection > connection, std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::string statement)=0
Executes the given SQL statement
virtual std::shared_ptr< DataTypes::ByteField > GetResultValueAsByteField(std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::shared_ptr< DataTypes::Object > column)=0
Get the value form ResultSet as ByteField type
virtual bool NextResult(std::shared_ptr< SqlImplementation::IResultSet > resultSet)=0
Move the cursor forward one row
virtual void CreateConnection(std::shared_ptr< IRuntimeContext > runtimeContext, std::shared_ptr< SqlImplementation::IConnection > connection, std::string connectionString)=0
Open a connection
virtual std::string GetResultValueAsString(std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::shared_ptr< DataTypes::Object > column)=0
Get the value form ResultSet as String type
virtual void CloseConnection(std::shared_ptr< SqlImplementation::IConnection > connection)=0
Closes the current connection
virtual bool GetResultValueAsBoolean(std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::shared_ptr< DataTypes::Object > column)=0
Get the value form ResultSet as Boolean type
virtual int ExecuteUpdate(std::shared_ptr< SqlImplementation::IConnection > connection, std::string statement)=0
Executes the given SQL statement
virtual double GetResultValueAsFloat(std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::shared_ptr< DataTypes::Object > column)=0
Get the value form ResultSet as Float type
virtual int GetResultValueAsInteger(std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::shared_ptr< DataTypes::Object > column)=0
Get the value form ResultSet as Integer type
Represents an OTX Connection.
Definition: IConnection.h:17
Represents an OTX ResultSet.
Definition: IResultSet.h:11
Namespace containing all objects related to testing inside automotive industry