SkyPHP / skyphp

PHP5 Framework
http://switchbreak.com/skyphp
17 stars 38 forks source link

nested object clause arrays #20

Open will123195 opened 12 years ago

will123195 commented 12 years ago

Is it possible to specify an 'order by' for the albums?

artist{
    name,
    [album]s as albums,
    where id = 10
}

For instance with a clause array like this

<?
$clause_array = [
    'albums' => ['order by' => "release_date asc"]
];
stanistan commented 12 years ago

Right now the order by for sub objects is the order by defined in the respective aql statement.

album {
    artist_id,
    name
    order by release_date asc
}

A nested clause array would only apply to nested AQL, this shouldn't be too difficult to add.