Public Member Functions | |
getFields ($sTableName) | |
fieldExists ($sFieldName, $sTableName) | |
getAllTables () | |
getCurrentMaxLangId () | |
getNextLangId () | |
getMultilangFields ($sTableName) | |
addNewMultilangField ($sTableName) | |
resetMultilangFields ($iLangId, $sTableName) | |
addNewLangToDb () | |
resetLanguage ($iLangId) | |
Protected Member Functions | |
_getDublicatedFieldSql ($sOldFieldName, $sNewFieldName, $sTableName, $sInsertAfterField=null) | |
_getDublicatedFieldIndexesSql ($sOldFieldName, $sNewFieldName, $sTableName) | |
_executeSql ($aSql) | |
Protected Attributes | |
$_aDbTablesFields = null | |
$_aTables = null | |
$_iCurrentMaxLangId | |
$_aSkipTablesOnReset = array( "oxcountry" ) |
Class for handling database related operations
Definition at line 7 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler._executeSql | ( | $ | aSql | ) | [protected] |
Executes arrary of sql strings
array | $aSql SQL query array |
Definition at line 379 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler._getDublicatedFieldIndexesSql | ( | $ | sOldFieldName, | |
$ | sNewFieldName, | |||
$ | sTableName | |||
) | [protected] |
Get sql string for dublicating indexes for new multilang field
string | $sOldFieldName old field name, which index will be copied | |
string | $sNewFieldName new field name | |
string | $sTableName table name in which new index will be added |
Definition at line 148 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler._getDublicatedFieldSql | ( | $ | sOldFieldName, | |
$ | sNewFieldName, | |||
$ | sTableName, | |||
$ | sInsertAfterField = null | |||
) | [protected] |
Get sql string for dublicating multilang field
string | $sOldFieldName old field name, which will be copied | |
string | $sNewFieldName new field name | |
string | $sTableName table name in which new field will be added | |
string | $sInsertAfterField insert after field name |
Definition at line 112 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.addNewLangToDb | ( | ) |
Add new language to database. Scans all tables and adds new multilanguage fields
Definition at line 333 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.addNewMultilangField | ( | $ | sTableName | ) |
Add new multilanguages fields to table. Dublicates all multilanguage fields and fields indexes with next available language ID
string | $sTableName table name |
Definition at line 255 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.fieldExists | ( | $ | sFieldName, | |
$ | sTableName | |||
) |
Check if field exists in table
string | $sFieldName field name | |
string | $sTableName table name |
Definition at line 64 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getAllTables | ( | ) |
Get all tables names from db. Views tables are not incuded in this list.
Definition at line 85 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getCurrentMaxLangId | ( | ) |
Get max language ID used in shop. For checking is used table "oxarticle" field "oxtitle"
Definition at line 191 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getFields | ( | $ | sTableName | ) |
Get table fields
string | $sTableName table name |
Definition at line 40 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getMultilangFields | ( | $ | sTableName | ) |
Get table multilanguge fields
string | $sTableName table name |
Definition at line 233 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.getNextLangId | ( | ) |
oxDbMetaDataHandler.resetLanguage | ( | $ | iLangId | ) |
Reseting all multilanguage fields with specific language id to default value in all tables. Only if language ID > 0.
int | $iLangId Language id |
Definition at line 351 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.resetMultilangFields | ( | $ | iLangId, | |
$ | sTableName | |||
) |
Reseting all multilanguage fields with specific language id to default value in selected table
int | $iLangId Language id | |
string | $sTableName Table name |
Definition at line 300 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.$_aDbTablesFields = null [protected] |
Definition at line 13 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.$_aSkipTablesOnReset = array( "oxcountry" ) [protected] |
Definition at line 31 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.$_aTables = null [protected] |
Definition at line 19 of file oxdbmetadatahandler.php.
oxDbMetaDataHandler.$_iCurrentMaxLangId [protected] |
Definition at line 25 of file oxdbmetadatahandler.php.