SqlDataFactory Class Reference

SqlDataFactory provides a facility to create a new SqlData* wrapper for a given SqlTypeMetadata*. More...

List of all members.

Public Member Functions

SqlDataCreateNewSqlData (SqlTypeMetadata *in_metadata)
 Creates a new SqlData* wrapper for the given SqlTypeMetadata*.
 SqlDataFactory ()
 Constructor.
virtual ~SqlDataFactory ()
 Destructor.

Protected Member Functions

virtual SqlDataCreateNewCustomSqlData (SqlTypeMetadata *in_metadata)
 Creates a custom SqlData*.

Detailed Description

SqlDataFactory provides a facility to create a new SqlData* wrapper for a given SqlTypeMetadata*.

Override the protected virtual function if you wish to support custom SqlData*s.

There is only one instance of this class. Access this instance via SqlDataFactorySingleton::GetInstance().


Constructor & Destructor Documentation

SqlDataFactory (  ) 

Constructor.

virtual ~SqlDataFactory (  )  [virtual]

Destructor.


Member Function Documentation

virtual SqlData* CreateNewCustomSqlData ( SqlTypeMetadata in_metadata  )  [protected, virtual]

Creates a custom SqlData*.

This is a virtual protected function, that is meant to be over-ridden in the DSII subclass of this class.

This default implementation simply returns NULL. Override the implementation if you wish to support custom SqlData*s.

If a custom data type maps to a standard SQL type, you can choose to not implement a custom SqlData for it, but rather return NULL. This means SimbaEngine's SqlData for the standard SQL type, which your custom data type maps to, will be utilized. An example of this would be the data type CLOB, which maps to a SQL_LONGVARCHAR.

Parameters:
in_metadata The metadata to use to create a SqlData. (NOT OWN)
Returns:
The SqlData for the given SqlTypeMetadata; NULL if the given type is not supported by the DSII. (OWN)
SqlData* CreateNewSqlData ( SqlTypeMetadata in_metadata  ) 

Creates a new SqlData* wrapper for the given SqlTypeMetadata*.

This function delegates to MakeNewCustomSqlData() first. If it returns NULL, then this default implementation will be used.

Note that the SqlData* should be deleted before the SqlTypeMetadata* it points to. SqlDatas do NOT take ownership of SqlTypeMetadatas.

DO NOT override this function. Override CreateNewCustomSqlData().

Parameters:
in_metadata The metadata to use to create a SqlData. (NOT OWN)
Returns:
A newly created SqlData* wrapper for the given metadata. (OWN)

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

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