diff --git a/README.md b/README.md index b5eee7a2efd..85687e074a9 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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. ~~~~ diff --git a/lib/datastore/entity.js b/lib/datastore/entity.js index dab99c9ad7f..0e2b12910ac 100644 --- a/lib/datastore/entity.js +++ b/lib/datastore/entity.js @@ -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; }