src/wcmf/lib/model/mapper/impl/NodeUnifiedRDBMapper.php
protected function addColumns(SelectStatement $selectStmt, $tableName, $attributes=null) {
    // columns
    $attributeDescs = $this->getAttributes();
    $columns = [];
    foreach($attributeDescs as $curAttributeDesc) {
      $name = $curAttributeDesc->getName();
      if (($attributes == null || in_array($name, $attributes)) && $curAttributeDesc instanceof RDBAttributeDescription) {
        $columns[$curAttributeDesc->getName()] = $curAttributeDesc->getColumn();
      }
    }
    $selectStmt->columns($columns, true);

    // references
    $selectStmt = $this->addReferences($selectStmt, $tableName);
    return $selectStmt;
  }
protected function addColumns(SelectStatement $selectStmt, $tableName, $attributes=null) {
    // columns
    $attributeDescs = $this->getAttributes();
    $columns = [];
    foreach($attributeDescs as $curAttributeDesc) {
      $name = $curAttributeDesc->getName();
      if (($attributes == null || in_array($name, $attributes)) && $curAttributeDesc instanceof RDBAttributeDescription) {
        $columns[$curAttributeDesc->getName()] = $curAttributeDesc->getColumn();
      }
    }
    $selectStmt->columns($columns, true);

    // references
    $selectStmt = $this->addReferences($selectStmt, $tableName);
    return $selectStmt;
  }
protected function addColumns ( SelectStatement $ selectStmt , $ tableName , $ attributes = null ) { // columns $ attributeDescs = $ this -> getAttributes ( ) ; $ columns = [ ] ; foreach ( $ attributeDescs as $ curAttributeDesc ) { $ name = $ curAttributeDesc -> getName ( ) ; if ( ( $ attributes == null || in_array ( $ name , $ attributes ) ) && $ curAttributeDesc instanceof RDBAttributeDescription ) { $ columns [ $ curAttributeDesc -> getName ( ) ] = $ curAttributeDesc -> getColumn ( ) ; } } $ selectStmt -> columns ( $ columns , true ) ; // references $ selectStmt = $ this -> addReferences ( $ selectStmt , $ tableName ) ; return $ selectStmt ; }
Add the columns to a given select statement.
@param $selectStmt The select statement (instance of SelectStatement)
@param $tableName The table name
@param $attributes Array of attribute names (optional)
@return SelectStatement
Add the columns to a given select statement .