We have two APIs and you mix them up. First we have JSQL which is similar to LINQ and you can use callback or promise, like:
database.remove(entity);
database.saveChanges(function() {
});
or
database.remove(entity);
database.saveChanges()
.then(function() {
});
and we have a second API called itemstore api, which is limited in functionality but simpler, no need to use context, saveChanges and you can only use promises
database.remove(entity)
.then(function() {
});