Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@johndowns
Created January 15, 2018 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johndowns/cab0600d49365389aa7ddc0e8262c082 to your computer and use it in GitHub Desktop.
Save johndowns/cab0600d49365389aa7ddc0e8262c082 to your computer and use it in GitHub Desktop.
var collection = getContext().getCollection();
var total = 0;
var query: IParameterizedQuery = {
query: "SELECT * FROM c WHERE c.total = @total",
parameters: [
{ name: "@total", value: total }
]
};
collection.queryDocuments(collection.getSelfLink(), query, function (error: IFeedCallbackError, resources: Array<Object>, options: IFeedCallbackOptions) {
// process results of query here
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment