#include <mappingStatementsFeature.h>
Public Member Functions | |
virtual const std::string & | getNameInst () |
Returns name of the database feature. | |
virtual std::string | getSelectTypeStatement (const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0 |
Returns a statement that selects a qualified Type name from the OID - Classname catalogue by an OID value. | |
virtual std::string | getSelectSerialIdStatement (const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0 |
Returns a statement that selects a timestamp (serialId) from the OID - Classname catalogue by an OID value. | |
virtual std::string | getNextOidStatement (const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0 |
Returns a statement that allocates and retrieves a new OID value. | |
virtual std::string | getNextSerialIdStatement (const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0 |
Returns a statement that allocates and retrieves a new timestamp (SerialId) value. | |
virtual std::vector< std::string > | dbCreateScriptStart (const MetadataHolder &attributes=MetadataHolder::emptyMeta)=0 |
Returns a list of statements that are generated to the beginning of a DB CREATE script. | |
virtual std::vector< std::string > | dbCreateScriptEnd (const MetadataHolder &attributes=MetadataHolder::emptyMeta)=0 |
Returns a list of statements that are generated to the end of a DB CREATE script. | |
virtual std::vector< std::string > | dbDropScriptStart (const MetadataHolder &attributes=MetadataHolder::emptyMeta)=0 |
Returns a list of statements that are generated to the beginning of a DB DROP script. | |
virtual std::vector< std::string > | dbDropScriptEnd (const MetadataHolder &attributes=MetadataHolder::emptyMeta)=0 |
Returns a list of statements that are generated to the end of a DB DROP script. | |
virtual std::vector< std::string > | getCreateClassTableScript (const DbType &dbType, const MetadataHolder &attributes=MetadataHolder::emptyMeta)=0 |
Returns a list of statements that create required structures to store instances of specified type to a database. | |
virtual std::vector< std::string > | getCreateUpDownViewsScript (const DbType &dbType, const MetadataHolder &attributes=MetadataHolder::emptyMeta)=0 |
Returns a list of statements that create a simple view for the specified type. | |
virtual std::vector< std::string > | getCreateDownUpViewsScript (const DbType &dbType, const MetadataHolder &attributes=MetadataHolder::emptyMeta)=0 |
Returns a list of statements that create a plymorphic view for the specified type. | |
virtual std::vector< std::string > | getDropClassTableScript (const DbType &dbType, const MetadataHolder &attributes=MetadataHolder::emptyMeta)=0 |
Returns a list of statements that drop the structure created by getCreateClassTableScript. | |
virtual std::vector< std::string > | getDropUpDownViewsScript (const DbType &dbType, const MetadataHolder &attributes=MetadataHolder::emptyMeta)=0 |
Returns a list of statements that drop the structures created by getCreateUpDownViewsScript. | |
virtual std::vector< std::string > | getDropDownUpViewsScript (const DbType &dbType, const MetadataHolder &attributes=MetadataHolder::emptyMeta)=0 |
Returns a list of statements that drop the structures created by getCreateDownUpViewsScript. | |
virtual std::string | getQueryStatement (const DbType &dbType, const MetadataHolder &attributes)=0 |
Returns a statement that is used to execute a query. |
virtual const std::string& iopc::MappingStatementsFeature::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::MappingStatementsFeature::getSelectTypeStatement | ( | const MetadataHolder & | attributes = MetadataHolder::emptyMeta , |
|
bool | useCache = true | |||
) | [pure virtual] |
virtual std::string iopc::MappingStatementsFeature::getSelectSerialIdStatement | ( | const MetadataHolder & | attributes = MetadataHolder::emptyMeta , |
|
bool | useCache = true | |||
) | [pure virtual] |
Returns a statement that selects a timestamp (serialId) from the OID - Classname catalogue by an OID value.
OidObject metadata [db.table] and [db.column] should be used
virtual std::vector<std::string> iopc::MappingStatementsFeature::getCreateClassTableScript | ( | const DbType & | dbType, | |
const MetadataHolder & | attributes = MetadataHolder::emptyMeta | |||
) | [pure virtual] |
Returns a list of statements that create required structures to store instances of specified type to a database.
Following metadata should be taken into account: Type-level metadata:
virtual std::vector<std::string> iopc::MappingStatementsFeature::getCreateUpDownViewsScript | ( | const DbType & | dbType, | |
const MetadataHolder & | attributes = MetadataHolder::emptyMeta | |||
) | [pure virtual] |
Returns a list of statements that create a simple view for the specified type.
Simple view is a view that selects persistent objects only of the type they are associated to.
Following metadata should be taken into account: Type-level metadata:
virtual std::vector<std::string> iopc::MappingStatementsFeature::getCreateDownUpViewsScript | ( | const DbType & | dbType, | |
const MetadataHolder & | attributes = MetadataHolder::emptyMeta | |||
) | [pure virtual] |
Returns a list of statements that create a plymorphic view for the specified type.
Polymorphic view is a view that selects persistent objects of the type they are associated to and of its descendants.
Following metadata should be taken into account: Type-level metadata:
virtual std::string iopc::MappingStatementsFeature::getQueryStatement | ( | const DbType & | dbType, | |
const MetadataHolder & | attributes | |||
) | [pure virtual] |
Returns a statement that is used to execute a query.
Following metadata should be taken into account: Query metadata (from the attributes parameter):