Commit a274090a authored by Carsten  Rose's avatar Carsten Rose
Browse files

Store: Added new store STORE_TABLE_COLUMN_TYPES

parent ee4422a8
......@@ -131,7 +131,8 @@ class Store {
STORE_SIP => false,
STORE_RECORD => false,
STORE_PARENT_RECORD => false,
STORE_TABLE_DEFINITION => false,
STORE_TABLE_DEFAULT => false,
STORE_TABLE_COLUMN_TYPES => false,
STORE_CLIENT => true,
STORE_TYPO3 => false,
STORE_ZERO => false,
......@@ -345,14 +346,15 @@ class Store {
* @param $tableName
* @throws CodeException
*/
public function fillStoreTableDefinition($tableName) {
public function fillStoreTableDefaultColumnType($tableName) {
$db = new qfq\Database();
$tableDefinition = $db->getTableDefinition($tableName);
self::setVarArray(array_column($tableDefinition, 'Default', 'Field'), STORE_TABLE_DEFINITION);
}
self::setVarArray(array_column($tableDefinition, 'Default', 'Field'), STORE_TABLE_DEFAULT);
self::setVarArray(array_column($tableDefinition, 'Type', 'Field'), STORE_TABLE_COLUMN_TYPES);
}
}
......
......@@ -126,7 +126,7 @@ return;
public function testStorePriority() {
//default prio FSRD
$this->store->fillStoreTableDefinition('Person');
$this->store->fillStoreTableDefaultColumnType('Person');
$this->assertEquals('male', $this->store->getVar('gender'), "Get default definition from table person.gender");
$this->store->setVar('gender', 'female', STORE_RECORD);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment