From 7123153a7bccec5020058f2d5b95793294072dd1 Mon Sep 17 00:00:00 2001 From: Joseph Schilz Date: Tue, 6 Sep 2016 08:30:54 -0700 Subject: [PATCH] Continue documentation. --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 5b6b96f..410cc2a 100644 --- a/README.md +++ b/README.md @@ -466,6 +466,29 @@ myAuthor2.save() ); ``` +Retrieving an instance from the database: +``` +// Retrieve the author with id 4, then log their name +db.authors(4) + .get + .then( + function(author) { + console.log(author.getFirstName()); + } + ); +``` + +Deleting an instance from the database: +``` +db.authors(4) + .delete + .then( + function() { + console.log("Deleted an author." + } + ); +``` + Compatibility =============