title: Using "query" function for SQL-like access to the assets
body: <p>I've seen this function in the "Animal Network" example of the "Composer UI Playground". It seems that the 'findAnimalsByOwnerIdWithDetails' function is never called and thus the 'query' function is never executed in that example.</p>
  
  <pre><code>function findAnimalsByOwnerIdWithDetails(farmerId) 
  {
      return query('select resolve(a, a.location, a.owner) from Animal a where a.owner == :farmerId');
  }
  </code></pre>
  
  <p>I've tried to incorporate the 'query' function into my own code but the run-time execution engine complains about an "unknown function". The API description also doesn't tell anything about it.</p>
  
  <p>Can it be used in some way to query/manipulate the assets (and thus the ledger) or if not, then do such plans exist? -- Thx.</p>