Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getColumns()
 {
     $columns = array();
     $i = 0;
     while ($i < $this->stmt->columnCount()) {
         $meta = $this->stmt->getColumnMeta($i++);
         $columns[] = Column::createNew()->setName((string) $meta['name'])->setLength((string) $meta['len'])->setType((string) $meta['native_type'])->setPrecision((string) $meta['precision']);
     }
     return Column::reassignAliases($columns);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function getColumns()
 {
     return Column::reassignAliases(array(Column::createNew()->setType('integer')->setName('date')->setLength(8)));
 }
Exemplo n.º 3
0
 /**
  * Data provider for testUnserialize
  */
 public function testUnserializeDataProvider()
 {
     return array(array('test:string(64)', 'test', Column::createNew()->setName('test')->setType('string')->setLength(64)), array('test/test_alias:decimal(10;2)', 'test_alias', Column::createNew()->setName('test')->setAlias('test_alias')->setType('decimal')->setLength(10)->setPrecision(2)), array('test', 'test', Column::createNew()->setName('test')->setType('text')));
 }
Exemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function getColumns()
 {
     return Column::reassignAliases(array(Column::createNew()->setName('year')->setType('integer')->setLength(4), Column::createNew()->setName('month')->setType('integer')->setLength(2), Column::createNew()->setName('weeknumber')->setType('integer')->setLength(3), Column::createNew()->setName('yearmonth')->setType('integer')->setLength(6), Column::createNew()->setName('quarter')->setType('integer')->setLength(1), Column::createNew()->setName('yearquarter')->setType('integer')->setLength(5), Column::createNew()->setName('yearquartermonth')->setType('integer')->setLength(7), Column::createNew()->setName('weekday')->setType('integer')->setLength(1), Column::createNew()->setName('weekdayname')->setType('string')->setLength(16), Column::createNew()->setName('weekdayflag')->setType('string')->setLength(1)));
 }