#include <orStatementsFeature.h>
Public Member Functions | |
virtual const std::string & | getNameInst () |
Returns name of the database feature. | |
virtual std::string | getSelectFromClassViewStatement (ORMappingStrategy ¤tStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0 |
Returns a statement that selects from a Simple view associated with the type the currentStrategy represents. | |
virtual std::string | getSelectFromClassTableStatement (ORMappingStrategy ¤tStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0 |
Returns a statement that selects from a database table associated with the type the currentStrategy represents. | |
virtual std::string | getInsertStatement (ORMappingStrategy ¤tStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0 |
Returns a statement that insert data to a database table associated with the type the currentStrategy represents. | |
virtual std::string | getUpdateStatement (ORMappingStrategy ¤tStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0 |
Returns a statement that updates data in a database table associated with the type the currentStrategy represents. | |
virtual std::string | getUpdateStatement (ORMappingStrategy ¤tStrategy, const ORMappingStrategy::MappedAttributesList &updateCols, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0 |
Returns a statement that updates data in a database table associated with the type the currentStrategy represents. | |
virtual std::string | getDeleteStatement (ORMappingStrategy ¤tStrategy, const MetadataHolder &attributes=MetadataHolder::emptyMeta, bool useCache=true)=0 |
Returns a statement that deletes data from a database table associated with the type the currentStrategy represents. | |
virtual bool | validate (ORMappingStrategy ¤tStrategy, std::string &msg)=0 |
Performs a driver-side validation of the persistent object model and metadata. |
virtual const std::string& iopc::ORStatementsFeature::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::ORStatementsFeature::getSelectFromClassViewStatement | ( | ORMappingStrategy & | currentStrategy, | |
const MetadataHolder & | attributes = MetadataHolder::emptyMeta , |
|||
bool | useCache = true | |||
) | [pure virtual] |
Returns a statement that selects from a Simple view associated with the type the currentStrategy represents.
Selected columns are specified by DbType::getAllPersistentAttributes() (currentStrategy.getDbType().getAllPersistentAttributes()) The order of the columns selected must correspond to the order of attributes in the list. WHERE part of the select statement must be restricted by input parameters generated from the DbType::getKeyAttributes() list. (currentStrag.getDbType().getKeyAttributes()). Again in the corresponding order.
virtual std::string iopc::ORStatementsFeature::getSelectFromClassTableStatement | ( | ORMappingStrategy & | currentStrategy, | |
const MetadataHolder & | attributes = MetadataHolder::emptyMeta , |
|||
bool | useCache = true | |||
) | [pure virtual] |
Returns a statement that selects from a database table associated with the type the currentStrategy represents.
Selected columns are specified by DbType::getMappedAttributes() (currentStrategy.getDbType.getMappedAttributes()) The order of the columns selected must correspond to the order of attributes in the list. WHERE part of the select statement must be restricted by input parameters generated from the DbType::getKeyAttributes() list. (currentStrag.getDbType().getKeyAttributes()). Again in the corresponding order.
virtual std::string iopc::ORStatementsFeature::getInsertStatement | ( | ORMappingStrategy & | currentStrategy, | |
const MetadataHolder & | attributes = MetadataHolder::emptyMeta , |
|||
bool | useCache = true | |||
) | [pure virtual] |
Returns a statement that insert data to a database table associated with the type the currentStrategy represents.
The insert must define input parameters that will correspond with attributes stored in the DbType::getMappedAttributes() list.
virtual std::string iopc::ORStatementsFeature::getUpdateStatement | ( | ORMappingStrategy & | currentStrategy, | |
const MetadataHolder & | attributes = MetadataHolder::emptyMeta , |
|||
bool | useCache = true | |||
) | [pure virtual] |
Returns a statement that updates data in a database table associated with the type the currentStrategy represents.
The update must define input parameters that will correspond with attributes stored in the DbType::getMappedAttributes() list. Followed by the WHERE clause generated from the DbType::getKeyAttributes() list.
virtual std::string iopc::ORStatementsFeature::getUpdateStatement | ( | ORMappingStrategy & | currentStrategy, | |
const ORMappingStrategy::MappedAttributesList & | updateCols, | |||
const MetadataHolder & | attributes = MetadataHolder::emptyMeta , |
|||
bool | useCache = true | |||
) | [pure virtual] |
Returns a statement that updates data in a database table associated with the type the currentStrategy represents.
The update must define input parameters that will correspond with attributes stored in the updateCols list. Followed by the WHERE clause generated from the DbType::getKeyAttributes() list.
virtual std::string iopc::ORStatementsFeature::getDeleteStatement | ( | ORMappingStrategy & | currentStrategy, | |
const MetadataHolder & | attributes = MetadataHolder::emptyMeta , |
|||
bool | useCache = true | |||
) | [pure virtual] |
Returns a statement that deletes data from a database table associated with the type the currentStrategy represents.
WHERE part of the delete statement must be restricted by input parameters generated from the DbType::getKeyAttributes() list.
virtual bool iopc::ORStatementsFeature::validate | ( | ORMappingStrategy & | currentStrategy, | |
std::string & | msg | |||
) | [pure virtual] |
Performs a driver-side validation of the persistent object model and metadata.
[in] | currentStrategy | A mapping strategy object representing a type being mapped. |
[out] | msg | Error messages generated by the database driver. |