Skip to content

Commit

Permalink
Merge pull request #22 from silvolu/master
Browse files Browse the repository at this point in the history
Fixes for queries examples in README.
  • Loading branch information
Burcu Dogan committed Jul 20, 2014
2 parents 8614669 + 08d2055 commit afbea60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ You can sort the results by a property name ascendingly or descendingly.

~~~~ js
// sorts by size ascendingly.
var q = ds.createQuery('Company').sort('+size');
var q = ds.createQuery('Company').order('+size');

// sorts by size descendingly.
var q = ds.createQuery('Company').sort('-size');
var q = ds.createQuery('Company').order('-size');
~~~~

##### Selection (or Projection)
Expand All @@ -205,7 +205,7 @@ Pagination allows you to set an offset, limit and starting cursor to a query.

~~~~ js
var q = ds.createQuery('Company')
.offset(100) // start from 100th result
.offset(100) // start from 101th result
.limit(10) // return only 10 results
.start(cursorToken); // continue to retrieve results from the given cursor.
~~~~
Expand Down
2 changes: 1 addition & 1 deletion lib/datastore/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ var keyToKeyProto = function(datasetId, key) {
}
var namespace = null, start = 0;
if (key.length % 2 == 1) {
// the first item is the namepsace
// the first item is the namespace
namespace = key[0];
start = 1;
}
Expand Down

0 comments on commit afbea60

Please sign in to comment.