Search code examples
javascriptsqldatabasesproutcore

What is the return type of a Sproutcore query to a database, in Javascript?


    queryNote = SC.Query.local('Tree.Note',
            "categoryId = {categoryId}", {
            categoryId: this.get('guid'),
            orderBy: "name ASC"
        });
   var arrayCategory = Tree.store.find(queryTree);

What is the type of arrayCategory? I thought it would be an array of objects. But no Javascript array functions seem to work on it.

NOTE : I had initially asked what the type of queryNote was, by mistake. I actually want to know what arrayCategory was because I would like to append the results of one query to another.


Solution

  • arrayCategory should be an SC.RecordArray: http://docs.sproutcore.com/symbols/SC.RecordArray.html