private function getCustomDimensionColumnNames()
 {
     $tableMetadataAccess = new TableMetadata();
     $columns = $tableMetadataAccess->getColumns($this->table);
     $dimensionColumns = array_filter($columns, function ($column) {
         return LogTable::isCustomDimensionColumn($column);
     });
     return $dimensionColumns;
 }
 private function getIdActionTableColumnsFromMetadata()
 {
     if ($this->idactionColumns === null) {
         $this->idactionColumns = array();
         foreach (self::$tablesWithIdActionColumns as $table) {
             $columns = $this->tableMetadataAccess->getIdActionColumnNames(Common::prefixTable($table));
             $this->logger->debug("Found following idactions in {table}: {columns}", array('table' => $table, 'columns' => implode(',', $columns)));
             $this->idactionColumns[$table] = $columns;
         }
     }
     return $this->idactionColumns;
 }
示例#3
0
 /**
  * Get columns information from table
  *
  * @param string|array $table The name of the table you want to get the columns definition for.
  * @return \Zend_Db_Statement
  * @deprecated since 2.11.0
  */
 public static function getColumnNamesFromTable($table)
 {
     $tableMetadataAccess = new TableMetadata();
     return $tableMetadataAccess->getColumns($table);
 }
示例#4
0
 /**
  * @dataProvider getTablesWithIdActionColumnsToTest
  */
 public function test_getIdActionColumnNames_CorrectlyReturnsColumnsWithIdActionName($table, $expectedColumns)
 {
     $columns = $this->tableMetadataAccess->getIdActionColumnNames(Common::prefixTable($table));
     $this->assertEquals($expectedColumns, $columns);
 }