protected function getQuery($table, array $fields, $startIndex, $count, $sortBy, $sortOrder, Condition $condition = null)
    {
        $builder = $this->newQueryBuilder($table)
            ->select($fields)
            ->orderBy($sortBy, $sortOrder == Sql::SORT_ASC ? 'ASC' : 'DESC')
            ->setFirstResult($startIndex)
            ->setMaxResults($count);

        return $this->convertBuilder($builder, $condition);
    }
protected function getQuery($table, array $fields, $startIndex, $count, $sortBy, $sortOrder, Condition $condition = null)
    {
        $builder = $this->newQueryBuilder($table)
            ->select($fields)
            ->orderBy($sortBy, $sortOrder == Sql::SORT_ASC ? 'ASC' : 'DESC')
            ->setFirstResult($startIndex)
            ->setMaxResults($count);

        return $this->convertBuilder($builder, $condition);
    }
protected function getQuery ( $ table , array $ fields , $ startIndex , $ count , $ sortBy , $ sortOrder , Condition $ condition = null ) { $ builder = $ this -> newQueryBuilder ( $ table ) -> select ( $ fields ) -> orderBy ( $ sortBy , $ sortOrder == Sql :: SORT_ASC ? 'ASC' : 'DESC' ) -> setFirstResult ( $ startIndex ) -> setMaxResults ( $ count ) ; return $ this -> convertBuilder ( $ builder , $ condition ) ; }
Returns an array which contains as first value a SQL query and as second
an array of parameters. Uses by default the dbal query builder to create
the SQL query. The query is used for the default query methods

@param string $table
@param array $fields
@param integer $startIndex
@param integer $count
@param string $sortBy
@param string $sortOrder
@param \PSX\Sql\Condition|null $condition
@return array
Returns an array which contains as first value a SQL query and as second an array of parameters . Uses by default the dbal query builder to create the SQL query . The query is used for the default query methods