iopc::TypeMappingFeature Class Reference
[iopcdb]

Declares methods that are used to translate C++ data types to SQL data types. More...

#include <typeMappingFeature.h>

Inheritance diagram for iopc::TypeMappingFeature:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual const std::string & getNameInst ()
 Returns name of the database feature.
virtual std::string getTypeSql (const Type &type, const MetadataHolder &meta=MetadataHolder::emptyMeta)=0
 Returns a SQL column data type representation of the specified type.


Detailed Description

Declares methods that are used to translate C++ data types to SQL data types.

Member Function Documentation

virtual const std::string& iopc::TypeMappingFeature::getNameInst (  )  [inline, virtual]

Returns name of the database feature.

Database features must have unique names across the library

Implements iopc::DbFeature.

virtual std::string iopc::TypeMappingFeature::getTypeSql ( const Type type,
const MetadataHolder meta = MetadataHolder::emptyMeta 
) [pure virtual]

Returns a SQL column data type representation of the specified type.

Its format is equivalent to a column data type specification in a CREATE TABLE statement.

Implementation should understand the [db.type.length] metadata passed either in the type or in the meta paramter to render proper column size for string data types.

Parameters:
type The data type to be translated. Basic or enhanced data types can be used.
meta Additional parameters.


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

Generated on Tue Apr 14 16:46:40 2009 for IOPC 2 by  doxygen 1.5.6