OXID eShop CE
6.1.5
|
Public Member Functions | |
getFields ($tableName) | |
tableExists ($tableName) | |
fieldExists ($fieldName, $tableName) | |
getIndices ($tableName) | |
hasIndex ($indexName, $tableName) | |
getIndexByName ($indexName, $tableName) | |
getAllTables () | |
getAllMultiTables ($table) | |
getAddFieldSql ($table, $field, $newField, $prevField, $tableSet=null) | |
getAddFieldIndexSql ($table, $field, $newField, $tableSet=null) | |
getCurrentMaxLangId () | |
getNextLangId () | |
getMultilangFields ($table) | |
getSinglelangFields ($table, $lang) | |
addNewMultilangField ($table) | |
ensureAllMultiLanguageFields ($table) | |
resetMultilangFields ($langId, $tableName) | |
addNewLangToDb () | |
resetLanguage ($langId) | |
executeSql ($queries) | |
updateViews ($tables=null) | |
Protected Member Functions | |
_getCreateTableSetSql ($table, $lang) | |
filterCoreFields ($fields) | |
safeGuardAdditionalMultiLanguageTables () | |
ensureMultiLanguageFields ($table, $languageId) | |
validateTableName ($tableName) | |
Protected Attributes | |
$_aDbTablesFields = null | |
$_aTables = null | |
$_iCurrentMaxLangId | |
$_aSkipTablesOnReset = ["oxcountry"] | |
$forceOriginalFields = ['OXID'] | |
Private Member Functions | |
setConfigToDoNotUseViews (Config $config) | |
Class for handling database related operations
|
protected |
Get sql for new multi-language table set creation
string | $table | core table name |
string | $lang | language id |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::addNewLangToDb | ( | ) |
Add new language to database. Scans all tables and adds new multi-language fields
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::addNewMultilangField | ( | $table | ) |
Add new multi-languages fields to table. Duplicates all multi-language fields and fields indexes with next available language ID
string | $table | table name |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::ensureAllMultiLanguageFields | ( | $table | ) |
Ensure, that all multi language fields of the given table are present.
string | $table | The table we want to assure, that the multi language fields are present. |
|
protected |
Make sure that all *_set* tables with all required multilanguage fields are created.
string | $table | |
int | $languageId |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::executeSql | ( | $queries | ) |
Executes array of sql strings
array | $queries | SQL query array |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::fieldExists | ( | $fieldName, | |
$tableName | |||
) |
Check if field exists in table
string | $fieldName | field name |
string | $tableName | table name |
|
protected |
Make sure that e.g. OXID is always used from core table when creating views. Otherwise we might have unwanted side effects from rows with OXIDs null in view tables.
array | $fields | Language fields array we need to filter for core fields. |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getAddFieldIndexSql | ( | $table, | |
$field, | |||
$newField, | |||
$tableSet = null |
|||
) |
Get sql for new multi-language field index creation
string | $table | core table name |
string | $field | field name |
string | $newField | new field name |
string | $tableSet | table to change (if not set take core table) |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getAddFieldSql | ( | $table, | |
$field, | |||
$newField, | |||
$prevField, | |||
$tableSet = null |
|||
) |
Get sql for new multi-language field creation
string | $table | core table name |
string | $field | field name |
string | $newField | new field name |
string | $prevField | previous field in table |
string | $tableSet | table to change (if not set take core table) |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getAllMultiTables | ( | $table | ) |
return all DB tables for the language sets
string | $table | table name to check |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getAllTables | ( | ) |
Get all tables names from db. Views tables are not included in this list.
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getCurrentMaxLangId | ( | ) |
Get max language ID used in shop. For checking is used table "oxarticle" field "oxtitle"
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getFields | ( | $tableName | ) |
Get table fields
string | $tableName | table name |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getIndexByName | ( | $indexName, | |
$tableName | |||
) |
Get the index of a given table by its name
string | $indexName | The name of the index |
string | $tableName | The name of the table from which we want the index |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getIndices | ( | $tableName | ) |
Get the indices of a table
string | $tableName | The name of the table for which we want the |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getMultilangFields | ( | $table | ) |
Get table multi-language fields
string | $table | table name |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getNextLangId | ( | ) |
Get next available language ID
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::getSinglelangFields | ( | $table, | |
$lang | |||
) |
Get single language fields
string | $table | table name |
int | $lang | language id |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::hasIndex | ( | $indexName, | |
$tableName | |||
) |
Check, if the table has an index with the given name
string | $indexName | The name of the index we want to check |
string | $tableName | The table to check for the index |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::resetLanguage | ( | $langId | ) |
Resetting all multi-language fields with specific language id to default value in all tables. Only if language ID > 0.
int | $langId | Language id |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::resetMultilangFields | ( | $langId, | |
$tableName | |||
) |
Resetting all multi-language fields with specific language id to default value in selected table
int | $langId | Language id |
string | $tableName | Table name |
|
protected |
Ensure that all *_set* tables for all tables in config parameter 'aMultiLangTables' are created.
|
private |
Forces shop to do not use views.
Config | $config |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::tableExists | ( | $tableName | ) |
Check if table exists
string | $tableName | table name |
OxidEsales\EshopCommunity\Core\DbMetaDataHandler::updateViews | ( | $tables = null | ) |
Updates all views
array | $tables | array of DB table name that can store different data per shop like oxArticle |
|
protected |
Adds possibility to validate table names.
string | $tableName |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |