IStatement Class Reference

This class exposes an interface to interact with the DSII for statement details. More...

Inherits Simba::DSI::IWarningSource.

Inherited by DSIStatement.

List of all members.

Public Types

typedef DSIStmtPropertyKey PropertyKeyType
 Typedef for a common name for the Enum for property keys in DSI interface classes.

Public Member Functions

virtual void ClearCancel ()=0
 Clear any previous cancel notification requested by the application.
virtual void ClonePropertyMap (DSIStmtPropertyKeyValueMap &io_propertyMap)=0
 Retrieves a clone of the property map for the statement.
virtual Simba::DSI::IDataEngineCreateDataEngine ()=0
 Constructs a new data engine instance.
virtual AttributeDataGetCustomProperty (simba_int32 in_key)=0
 Retrieves a custom property value.
virtual AttributeType GetCustomPropertyType (simba_int32 in_key)=0
 Retrieves the type associated with the custom property with the given ODBC attribute key.
virtual ILoggerGetLog ()=0
 Gets the ILogger for the connection.
virtual SharedPtr< IMessageSourceGetMessageSource ()=0
 Retrieves the message source.
virtual AttributeDataGetNewSimilarValue (Simba::DSI::DSIStmtPropertyKey in_attribute, AttributeData *in_value)=0
 Tries to get a similar value to replace a non supported attribute value.
virtual Simba::DSI::IConnectionGetParentConnection ()=0
 Returns the parent IConnection instance.
virtual const AttributeDataGetProperty (Simba::DSI::DSIStmtPropertyKey in_key)=0
 Returns a statement property corresponding to the in_key.
virtual IWarningListenerGetWarningListener ()=0
 Retrieves the warning listener associated with the IStatement.
virtual bool IsCustomProperty (simba_int32 in_key)=0
 Should return true if the given ODBC attribute key is associated with a custom statement property recognized by the DSII.
virtual bool IsValueSupported (Simba::DSI::DSIStmtPropertyKey in_attribute, AttributeData *in_value)=0
 Checks to see if the given attribute value is supported and within limits.
virtual void NotifyCursorNameChange (const simba_wstring &in_cursorName)=0
 Notifies that the cursor name associated with this statement has been changed.
virtual void OnCancel ()=0
 Notify that a cancel of the current operation was requested by the application.
virtual void RegisterWarningListener (IWarningListener *in_warningListener)=0
 Registers an IWarningListener*, which may be retrieved using GetWarningListener().
virtual void SetCustomProperty (simba_int32 in_key, AttributeData *in_value)=0
 Sets the custom statement property with the given ODBC attribute key to the given value.
virtual void SetProperty (Simba::DSI::DSIStmtPropertyKey in_key, AttributeData *in_value)=0
 Sets the statement property with the given key to the given value.
virtual ~IStatement ()
 Destructor.

Protected Member Functions

 IStatement ()
 Constructor.

Detailed Description

This class exposes an interface to interact with the DSII for statement details.


Member Typedef Documentation

Typedef for a common name for the Enum for property keys in DSI interface classes.


Constructor & Destructor Documentation

virtual ~IStatement (  )  [inline, virtual]

Destructor.

IStatement (  )  [inline, protected]

Constructor.


Member Function Documentation

virtual void ClearCancel (  )  [pure virtual]

Clear any previous cancel notification requested by the application.

The SDK calls this function to reset a previous cancel notification. It allows the DSI to clear any pending cancel notification and avoid that the next operation is immediately canceled if the last cancel notification was for example too late to be processed.

Implemented in DSIStatement.

virtual void ClonePropertyMap ( DSIStmtPropertyKeyValueMap io_propertyMap  )  [pure virtual]

Retrieves a clone of the property map for the statement.

Parameters:
io_propertyMap Property map to clone all properties into. Any properties already in the map will be deleted. (OWN)

Implemented in DSIStatement.

virtual Simba::DSI::IDataEngine* CreateDataEngine (  )  [pure virtual]

Constructs a new data engine instance.

Returns:
A new IDataEngine instance. (OWN)

Implemented in DSIStatement.

virtual AttributeData* GetCustomProperty ( simba_int32  in_key  )  [pure virtual]

Retrieves a custom property value.

Parameters:
in_key ODBC attribute key.
Returns:
Custom property value. (NOT OWN)
Exceptions:
DSIException because custom properties are not supported by default.

Implemented in DSIStatement.

virtual AttributeType GetCustomPropertyType ( simba_int32  in_key  )  [pure virtual]

Retrieves the type associated with the custom property with the given ODBC attribute key.

Must throw an ErrorException if the given key does not correspond to a custom property. A value does not have to be available for this property in order to be able to retrieve the corresponding type.

Parameters:
in_key ODBC attribute key.
Returns:
Type associated with the custom property.
Exceptions:
DSIException because custom properties are not supported by default.

Implemented in DSIStatement.

virtual ILogger* GetLog (  )  [pure virtual]

Gets the ILogger for the connection.

Returns:
The log that logs messages about the IStatement. (NOT OWN)

Implemented in DSIStatement.

virtual SharedPtr<IMessageSource> GetMessageSource (  )  [pure virtual]

Retrieves the message source.

Returns:
The message source associated with the IStatement.

Implements IWarningSource.

Implemented in DSIStatement.

virtual AttributeData* GetNewSimilarValue ( Simba::DSI::DSIStmtPropertyKey  in_attribute,
AttributeData in_value 
) [pure virtual]

Tries to get a similar value to replace a non supported attribute value.

Returns a new AttributeData if a similar value is found as a substitute, returns NULL if a similar value cannot be obtained. A similar value may be returned according to the following rules: 1) If the max and min limits are the same (if any), then DSI only supports one value and no similar value will be given. 2) If the max and min limits are not the same (if any), then this method will give back the closest max/min limit value will be given as the similar value.

Parameters:
in_attribute DSI Statement property key.
in_value Non-supported attribute value. (NOT OWN)
Returns:
Similar attribute value to replace in_value. (OWN)

Implemented in DSIStatement.

virtual Simba::DSI::IConnection* GetParentConnection (  )  [pure virtual]

Returns the parent IConnection instance.

Returns:
The parent IConnection instance. (NOT OWN)

Implemented in DSIStatement.

virtual const AttributeData* GetProperty ( Simba::DSI::DSIStmtPropertyKey  in_key  )  [pure virtual]

Returns a statement property corresponding to the in_key.

Please refer to the DSI Design and Implementation Guide for detailed information on the supported properties.

Parameters:
in_key Statement property key supported by DSI.
Returns:
The statement property corresponding to the in_key. (NOT OWN)

Implemented in DSIStatement.

virtual IWarningListener* GetWarningListener (  )  [pure virtual]

Retrieves the warning listener associated with the IStatement.

Returns:
The warning listener associated with the IStatement. (NOT OWN)

Implements IWarningSource.

Implemented in DSIStatement.

virtual bool IsCustomProperty ( simba_int32  in_key  )  [pure virtual]

Should return true if the given ODBC attribute key is associated with a custom statement property recognized by the DSII.

Parameters:
in_key Statement property key supported by DSI.
Returns:
True if the in_key is associated with a custom statement property recognized by the DSII; false otherwise.

Implemented in DSIStatement.

virtual bool IsValueSupported ( Simba::DSI::DSIStmtPropertyKey  in_attribute,
AttributeData in_value 
) [pure virtual]

Checks to see if the given attribute value is supported and within limits.

Parameters:
in_attribute DSI statement property key
in_value Statement property value. (NOT OWN)
Returns:
True if the given attribute value is supported and within limits; false otherwise.

Implemented in DSIStatement.

virtual void NotifyCursorNameChange ( const simba_wstring in_cursorName  )  [pure virtual]

Notifies that the cursor name associated with this statement has been changed.

Will be called right after construction of the IStatement or when the name changes.

Parameters:
in_cursorName Cursor name generated by the driver or calling SQLSetCursorName.

Implemented in DSIStatement.

virtual void OnCancel (  )  [pure virtual]

Notify that a cancel of the current operation was requested by the application.

The SDK calls this function when the SQLCancelHandle or SQLCancel ODBC function is called on a statement handle corresponding to this statement object. The objective for the DSII is then to set flags or any other mean to notify the operation that it was canceled.

Implemented in DSIStatement.

virtual void RegisterWarningListener ( IWarningListener in_warningListener  )  [pure virtual]

Registers an IWarningListener*, which may be retrieved using GetWarningListener().

Will be called right after construction of the IStatement.

Parameters:
in_warningListener A listener which may be used to post warnings. (NOT OWN)

Implements IWarningSource.

Implemented in DSIStatement.

virtual void SetCustomProperty ( simba_int32  in_key,
AttributeData in_value 
) [pure virtual]

Sets the custom statement property with the given ODBC attribute key to the given value.

If the value is modified before saving it, an OPT_VAL_CHANGED warning should be posted. This method should post an OPT_VAL_CHANGED warning if a value is substituted with another value before storage. For properties which accept more than just a discrete set of values, this method should throw an INVALID_ATTR_VAL error if an illegal value is given which can't be substituted with another value. For values that cannot take effect immediately but will take effect at a later time, this method should also post an OPT_VAL_CHANGED warning.

Parameters:
in_key ODBC attribute key.
in_value Custom statement property value to be set for in_key. (OWN)
Exceptions:
DSIException because custom properties are not supported by default.

Implemented in DSIStatement.

virtual void SetProperty ( Simba::DSI::DSIStmtPropertyKey  in_key,
AttributeData in_value 
) [pure virtual]

Sets the statement property with the given key to the given value.

If the value is modified before saving it, an OPT_VAL_CHANGED warning should be posted. Please refer to the DSI Design and Implementation Guide for detailed information on the supported properties.

This method should post an OPT_VAL_CHANGED warning if a value is substituted with another value before storage (like substituting a timeout value for the maximum if it's too high). For properties which accept more than just a discrete set of values, this method should throw an INVALID_ATTR_VAL error if an illegal value is given which can't be substituted with another value. For values that cannot take effect immediately but will take effect at a later time, this method should also post an OPT_VAL_CHANGED warning.

Parameters:
in_key Statement property key supported by DSI.
in_value Statement property value to be set for in_key. (OWN)

Implemented in DSIStatement.


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

Generated on Wed May 17 14:21:16 2017 for SimbaEngine 10.1.3.1011 by simba