public function test_arbitrary_selects()
 {
     $qb = new QueryBuilder();
     $qb->addSelectStatement('a.b', 'C');
     $expectedSQL = 'SELECT a.b AS C FROM WHERE';
     list($actual_sql, $actual_opts) = $qb->getSQL();
     $this->assertEquals($this->cleanWS($expectedSQL), $this->cleanWS($actual_sql));
     $this->assertEquals(array(), $actual_opts);
 }
 /**
  * @param QueryBuilder $QB
  * @param string $tablealias
  * @param string $colname
  * @param string $alias
  */
 public function select(QueryBuilder $QB, $tablealias, $colname, $alias)
 {
     // when accessing the revision column we need to convert from Unix timestamp
     $col = "{$tablealias}.{$colname}";
     if ($colname == 'rev') {
         $col = "DATETIME({$col}, 'unixepoch', 'localtime')";
     }
     $QB->addSelectStatement($col, $alias);
 }