CFScript query loop

This is not exactly a coldbox related question, but I am using the
cfscript query stuff,

// Get Entries List
result function getEntries()
{
  var query = new Query(datasource="mps", sql="SELECT title,contents
FROM blogs");
  var oResults = query.execute();

  return oResults;
}

And was wondering what the best way to do loops of queries is now.
Cleary, the object passed back now from query.execute() is a result. I
have tried

<cfloop query="rc.entries.getResult()">
</cfloop>

With no success...

This works here:

var oResults = query.execute();
var numRes = oResults.getPrefix().recordcount;
var qResults = oResults.getResult();

for(var i = 1; i <= numRes; i++)
{
     WriteOutput(query["title"][i]);
     WriteOutput(query["contents"][i]);
}

But is that the best way of doing things now?

Recommend modifying your code to the following:

  Var oResults = query.execute().getResult();

You can then perform the following:

  for( i=1; I LTE oResults.recordCount; i++ ) {
    writeOutput(oResults.field[i]);
  }

The query.execute() method returns an object that has the result set
buried inside of it, whereas using the getResult() method give you a
standard query result recordset.

Kevin