Contains the ResultIterator class.
MIT-style license.
| GearsORM. ResultIterator.js | Contains the ResultIterator class. |
| GearsORM. ResultIterator | a iterator on a Google Gears ResultSet |
| Functions | |
| next | return the next row in the ResultSet as a model instance,if it is the last row it will return false. |
| each | a function to iterate the ResultSet like ruby each. |
| close | close the ResultSet,this will be done automaticlly if the ResultSet is iterated to the end. |
| getOne | return the first row of the ResultSet,will return false if the ResultSet is empty. |
| getOne | return the ResultSet as Array of model instances |
a iterator on a Google Gears ResultSet
| result | the ResultSet to iterate |
| modelClass | the model class used to map the results |
| Functions | |
| next | return the next row in the ResultSet as a model instance,if it is the last row it will return false. |
| each | a function to iterate the ResultSet like ruby each. |
| close | close the ResultSet,this will be done automaticlly if the ResultSet is iterated to the end. |
| getOne | return the first row of the ResultSet,will return false if the ResultSet is empty. |
| getOne | return the ResultSet as Array of model instances |
next:function()
return the next row in the ResultSet as a model instance,if it is the last row it will return false.
each:function( fn, bind )
a function to iterate the ResultSet like ruby each.
| fn | function to be called for each row in the ResultSet |
| bind | this will be used as this for the function,optional |
close:function()
close the ResultSet,this will be done automaticlly if the ResultSet is iterated to the end. if you don`t finish iterate the ResultSet this need to be called manually.
return the next row in the ResultSet as a model instance,if it is the last row it will return false.
next:function()
a function to iterate the ResultSet like ruby each.
each:function( fn, bind )
close the ResultSet,this will be done automaticlly if the ResultSet is iterated to the end.
close:function()
return the first row of the ResultSet,will return false if the ResultSet is empty.
getOne:function()