SqlCDataTypeUtilities Class Reference

This class contains methods that provide information about SQL C types. More...

List of all members.

Public Member Functions

virtual AttributeType GetCustomMetadataFieldType (simba_int16 in_fieldIdent)
 Indicates what data type this field identifier represents. The data type for in_fieldIdent must be the same for all custom types that support it so there is no in_type parameter. Returns ATTR_UINT32 by default.
virtual simba_wstring GetStringForCType (simba_int16 in_cType)
 Returns the string representation of a C data type.
virtual bool IsApproximateNumericType (simba_int16 in_type)
 Indicates whether the given SQL C type is an approximate numeric type.
virtual bool IsCharacterOrBinaryType (simba_int16 in_type)
 Indicates whether the given SQL C type is a character or binary type.
virtual bool IsDatetimeType (simba_int16 in_type)
 Indicates whether the given SQL C type is a datetime type.
virtual bool IsExactNumericType (simba_int16 in_type)
 Indicates whether the given SQL C type is an exact numeric type.
virtual bool IsIntegerType (simba_int16 in_type)
 Indicates whether the given SQL C type is an integer type.
virtual bool IsIntervalType (simba_int16 in_type)
 Indicates whether the given SQL C type is an interval type. Will return false if the given type is not a valid SQL type.
virtual bool IsSupportedCustomMetadataField (simba_int16 in_type, simba_int16 in_fieldIdent)
 Indicates whether the given descriptor field identifier is valid for a given custom data type. Will return false if the given type is not a valid custom type or in_fieldIdent is not a valid field identifier for in_type. If this returns true, the SqlCTypeMetadataFactory must be overriden to create a custom SqlCTypeMetadata subclass that will accept getting and setting this field when creating metadata for the given type. This is not responsible for validating builtin descriptor fields.
virtual bool IsSupportedCustomType (simba_int16 in_type)
 Indicates whether the given SQL C type is a valid supported custom type. Will return false if the given type is not a valid custom type. This is not responsible for validating builtin C types.
virtual bool IsTimeType (simba_int16 in_type)
 Indicates whether the given SQL C type is a time type.
virtual bool RequiresPrecision (simba_int16 in_type)
 Indicates whether the given SQL C type requires precision.
 SqlCDataTypeUtilities ()
 Constructor.
virtual ~SqlCDataTypeUtilities ()
 Destructor.

Detailed Description

This class contains methods that provide information about SQL C types.

If you wish to support Custom C Data Types, subclass from this class and override the virtual methods that apply to your Custom C Data Types. There is no need to override a virtual method if it does not apply to your Custom C Data Type.

NOTE: If you do override a method, you must include a call to the SqlCDataTypeUtilities base method implementation to handle the standard SQL C data types. For example:

bool CustomSqlCDataTypeUtilities::IsCharacterOrBinaryType(simba_int16 in_type) { if (MY_CUSTOM_SQL_C_TYPE == in_type) { Return true/false if MY_CUSTOM_SQL_C_TYPE is a Character C Type } else { Delegate handling of Standard SQL C data types to base class implementation. return SqlCDataTypeUtilities::IsCharacterOrBinaryType(in_type); } }

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


Constructor & Destructor Documentation

Constructor.

virtual ~SqlCDataTypeUtilities (  )  [virtual]

Destructor.


Member Function Documentation

virtual AttributeType GetCustomMetadataFieldType ( simba_int16  in_fieldIdent  )  [virtual]

Indicates what data type this field identifier represents. The data type for in_fieldIdent must be the same for all custom types that support it so there is no in_type parameter. Returns ATTR_UINT32 by default.

Parameters:
in_fieldIdent Field identifier to get the type for.
Returns:
The data type of the descriptor field for in_fieldIdent.
virtual simba_wstring GetStringForCType ( simba_int16  in_cType  )  [virtual]

Returns the string representation of a C data type.

Parameters:
in_cType The C Data Type.
Exceptions:
SupportException if the given C data type is invalid.
Returns:
the simba_wstring name for the given C data type.
virtual bool IsApproximateNumericType ( simba_int16  in_type  )  [virtual]

Indicates whether the given SQL C type is an approximate numeric type.

Will return false if the given type is not a valid SQL C type.

Parameters:
in_type 
virtual bool IsCharacterOrBinaryType ( simba_int16  in_type  )  [virtual]

Indicates whether the given SQL C type is a character or binary type.

Will return false if the given type is not a valid SQL C type.

Parameters:
in_type 
virtual bool IsDatetimeType ( simba_int16  in_type  )  [virtual]

Indicates whether the given SQL C type is a datetime type.

Will return false if the given type is not a valid SQL C type.

Parameters:
in_type 
virtual bool IsExactNumericType ( simba_int16  in_type  )  [virtual]

Indicates whether the given SQL C type is an exact numeric type.

Will return false if the given type is not a valid SQL C type.

Parameters:
in_type 
virtual bool IsIntegerType ( simba_int16  in_type  )  [virtual]

Indicates whether the given SQL C type is an integer type.

Will return false if the given type is not a valid SQL C type.

Parameters:
in_type The SQL C type.
Returns:
True if the given type is one of the integer types, false otherwise.
virtual bool IsIntervalType ( simba_int16  in_type  )  [virtual]

Indicates whether the given SQL C type is an interval type. Will return false if the given type is not a valid SQL type.

Parameters:
in_type 
virtual bool IsSupportedCustomMetadataField ( simba_int16  in_type,
simba_int16  in_fieldIdent 
) [virtual]

Indicates whether the given descriptor field identifier is valid for a given custom data type. Will return false if the given type is not a valid custom type or in_fieldIdent is not a valid field identifier for in_type. If this returns true, the SqlCTypeMetadataFactory must be overriden to create a custom SqlCTypeMetadata subclass that will accept getting and setting this field when creating metadata for the given type. This is not responsible for validating builtin descriptor fields.

NOTE: 0x4001 is currently RESERVED by SimbaEngine SDK.

Parameters:
in_type 
Returns:
True if the given type is a descriptor field identifier.
virtual bool IsSupportedCustomType ( simba_int16  in_type  )  [virtual]

Indicates whether the given SQL C type is a valid supported custom type. Will return false if the given type is not a valid custom type. This is not responsible for validating builtin C types.

Parameters:
in_type The SQL C type.
Returns:
True if the given type is a valid custom type.
virtual bool IsTimeType ( simba_int16  in_type  )  [virtual]

Indicates whether the given SQL C type is a time type.

Time types are TIME, TYPE_TIME, TIMESTAMP, TYPE_TIMESTAMP.

Will return false if the given type is not a valid SQL C type.

Parameters:
in_type The type to check.
Returns:
True if the given type is a time type; false otherwise.
virtual bool RequiresPrecision ( simba_int16  in_type  )  [virtual]

Indicates whether the given SQL C type requires precision.

Types which require precision are approximate numerics, exact numerics time types, and interval types.

Parameters:
in_type The C Data Type.

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