/**
  * {@inheritdoc}
  *
  * @param Column $column
  *
  * @return string
  */
 public function writeColumnName(Column $column)
 {
     if ($column->isAll()) {
         return '*';
     }
     if (false !== strpos($column->getName(), "(")) {
         return parent::writeColumnName($column);
     }
     return $this->wrapper(parent::writeColumnName($column));
 }
Esempio n. 2
0
 /**
  * Returns the column name.
  *
  * @param Column $column
  *
  * @return string
  */
 public function writeColumnName(Column $column)
 {
     $name = $column->getName();
     if ($name === Column::ALL) {
         return $this->writeColumnAll();
     }
     return $name;
 }
Esempio n. 3
0
 /**
  * @test
  */
 public function itShouldSetColumnName()
 {
     $column = new Column("id", "user");
     $column->setName("user_id");
     $this->assertEquals("user_id", $column->getName());
 }
 /**
  * @test
  */
 public function itShouldSetColumnName()
 {
     $column = new Column('id', 'user');
     $column->setName('user_id');
     $this->assertEquals('user_id', $column->getName());
 }