Skip to content

Instantly share code, notes, and snippets.

@andijakl
Created October 11, 2018 08:30
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 andijakl/f8b51d379c1bd12a7d6e1344373b4055 to your computer and use it in GitHub Desktop.
Save andijakl/f8b51d379c1bd12a7d6e1344373b4055 to your computer and use it in GitHub Desktop.
Create a new item in a Document DB through an SQL query (warning: unsafe!)
const queryResponse = await container.items.query(
"SELECT * FROM c WHERE c.id='" + newItemId + "'").toArray();
console.log(queryResponse.result[0].name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment