OTX-Runtime for C++  
OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation Class Referenceabstract

Allows users to implement their own Sql extension. More...

#include <ISqlImplementation.h>

Public Member Functions

virtual void CloseConnection (std::shared_ptr< SqlImplementation::IConnection > connection)=0
 Closes the current connection More...
 
virtual void CreateConnection (std::shared_ptr< IRuntimeContext > runtimeContext, std::shared_ptr< SqlImplementation::IConnection > connection, std::string connectionString)=0
 Open a connection More...
 
virtual void ExecuteQuery (std::shared_ptr< SqlImplementation::IConnection > connection, std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::string statement)=0
 Executes the given SQL statement More...
 
virtual int ExecuteUpdate (std::shared_ptr< SqlImplementation::IConnection > connection, std::string statement)=0
 Executes the given SQL statement More...
 
virtual bool GetResultValueAsBoolean (std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::shared_ptr< DataTypes::Object > column)=0
 Get the value form ResultSet as Boolean type More...
 
virtual std::shared_ptr< DataTypes::ByteFieldGetResultValueAsByteField (std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::shared_ptr< DataTypes::Object > column)=0
 Get the value form ResultSet as ByteField type More...
 
virtual double GetResultValueAsFloat (std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::shared_ptr< DataTypes::Object > column)=0
 Get the value form ResultSet as Float type More...
 
virtual int GetResultValueAsInteger (std::shared_ptr< SqlImplementation::IResultSet > resultSet, std::shared_ptr< DataTypes::Object > column)=0
 Get the value form ResultSet as Integer type More...
 
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 More...
 
virtual bool NextResult (std::shared_ptr< SqlImplementation::IResultSet > resultSet)=0
 Move the cursor forward one row More...
 

Detailed Description

Allows users to implement their own Sql extension.

Member Function Documentation

◆ CloseConnection()

virtual void OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation::CloseConnection ( std::shared_ptr< SqlImplementation::IConnection connection)
pure virtual

Closes the current connection

Parameters
connectionRepresents a connection instance.

◆ CreateConnection()

virtual void OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation::CreateConnection ( std::shared_ptr< IRuntimeContext runtimeContext,
std::shared_ptr< SqlImplementation::IConnection connection,
std::string  connectionString 
)
pure virtual

Open a connection

Parameters
runtimeContextThe related runtime context.
connectionRepresents a connection instance.
connectionStringSpecifies the location of the data source that is required for the connection. Connection string used to create the connection that pass for creation of command variable.The connection string includes the source database nameand other parameters needed to establish the initial connection.

◆ ExecuteQuery()

virtual void OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation::ExecuteQuery ( std::shared_ptr< SqlImplementation::IConnection connection,
std::shared_ptr< SqlImplementation::IResultSet resultSet,
std::string  statement 
)
pure virtual

Executes the given SQL statement

Parameters
connectionRepresents a connection instance.
resultSetRepresents a ResultSet instance.
statementSQL statement

◆ ExecuteUpdate()

virtual int OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation::ExecuteUpdate ( std::shared_ptr< SqlImplementation::IConnection connection,
std::string  statement 
)
pure virtual

Executes the given SQL statement

Parameters
connectionRepresents a connection instance.
statementSQL statement, which may be an INSERT, UPDATE or DELETE statement or an statement that returns nothing, such as an OTX SQL Extension DDL statement.
Returns
Returns the row count for OTX SQL Extension Data Manipulation statements or 0 for OTX SQL Extension statements that return nothing

◆ GetResultValueAsBoolean()

virtual bool OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation::GetResultValueAsBoolean ( std::shared_ptr< SqlImplementation::IResultSet resultSet,
std::shared_ptr< DataTypes::Object column 
)
pure virtual

Get the value form ResultSet as Boolean type

Parameters
resultSetThis element represents the ResultSet from which the value of the current row shall be read
columnThis element represents the column from which the value shall be read. A column can be accessed via name or via index.Therefore the data type of the column property shall be String (name) or Integer (index)
Returns
Boolean value

◆ GetResultValueAsByteField()

virtual std::shared_ptr<DataTypes::ByteField> OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation::GetResultValueAsByteField ( std::shared_ptr< SqlImplementation::IResultSet resultSet,
std::shared_ptr< DataTypes::Object column 
)
pure virtual

Get the value form ResultSet as ByteField type

Parameters
resultSetThis element represents the ResultSet from which the value of the current row shall be read
columnThis element represents the column from which the value shall be read. A column can be accessed via name or via index.Therefore the data type of the column property shall be String (name) or Integer (index)
Returns
Bytefield value

◆ GetResultValueAsFloat()

virtual double OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation::GetResultValueAsFloat ( std::shared_ptr< SqlImplementation::IResultSet resultSet,
std::shared_ptr< DataTypes::Object column 
)
pure virtual

Get the value form ResultSet as Float type

Parameters
resultSetThis element represents the ResultSet from which the value of the current row shall be read
columnThis element represents the column from which the value shall be read. A column can be accessed via name or via index.Therefore the data type of the column property shall be String (name) or Integer (index)
Returns
Float value

◆ GetResultValueAsInteger()

virtual int OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation::GetResultValueAsInteger ( std::shared_ptr< SqlImplementation::IResultSet resultSet,
std::shared_ptr< DataTypes::Object column 
)
pure virtual

Get the value form ResultSet as Integer type

Parameters
resultSetThis element represents the ResultSet from which the value of the current row shall be read
columnThis element represents the column from which the value shall be read. A column can be accessed via name or via index.Therefore the data type of the column property shall be String (name) or Integer (index)
Returns
Integer value

◆ GetResultValueAsString()

virtual std::string OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation::GetResultValueAsString ( std::shared_ptr< SqlImplementation::IResultSet resultSet,
std::shared_ptr< DataTypes::Object column 
)
pure virtual

Get the value form ResultSet as String type

Parameters
resultSetThis element represents the ResultSet from which the value of the current row shall be read
columnThis element represents the column from which the value shall be read. A column can be accessed via name or via index.Therefore the data type of the column property shall be String (name) or Integer (index)
Returns
String value

◆ NextResult()

virtual bool OpenTestSystem::Otx::Runtime::Api::Custom::ISqlImplementation::NextResult ( std::shared_ptr< SqlImplementation::IResultSet resultSet)
pure virtual

Move the cursor forward one row

Parameters
resultSetThis element represents the result set from which the next row shall be selected.
Returns
Can next result

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