{"action":"created","comment":{"url":"https://api.github.com/repos/SitePen/dstore/pulls/comments/77737799","id":77737799,"diff_hunk":"@@ -17,15 +17,26 @@ Property | Description\n Method | Description\n ------ | -------------\n `get(id)` | This retrieves an object by its identity. This returns a promise for the object. If no object was found, the resolved value should be `undefined`.\n-`getIdentity(object)` | This returns an object's identity (note, this should always execute synchronously).\n+`getIdentity(object)` | This returns an object's identity (note: this should always execute synchronously).\n `put(object, [directives])` | This stores an object. It can be used to update or create an object. This returns a promise that may resolve to the object after it has been saved.\n `add(object, [directives])` | This creates an object, and throws an error if the object already exists. This should return a promise for the newly created object.\n-`remove(id)` | This deletes an object, using the identity to indicate which object to delete. This returns a promise that resolves to a boolean value indicating whether the object was succcessfully removed.\n+`remove(id)` | This deletes an object, using the identity to indicate which object to delete. This returns a promise that resolves to a boolean value indicating whether the object was successfully removed.\n `transaction()` | Starts a transaction and returns a transaction object. The transaction object should include a `commit()` and `abort()` to commit and abort transactions, respectively. Note, that a store user might not call `transaction()` prior to using put, delete, etc. in which case these operations effectively could be thought of as “auto-commit” style actions.\n `create(properties)` | Creates and returns a new instance of the data model. The returned object will not be stored in the object store until it its save() method is called, or the store's add() is called with this object. This should always execute synchronously.\n `getChildren(parent)` | This retrieves the children of the provided parent object. This should return a new collection representing the children.\n `mayHaveChildren(parent)` | This should return true or false indicating whether or not a parent might have children. This should always return synchronously, as a way of checking if children might exist before actually retrieving all the children.\n `getRootCollection()` | This should return a collection of the top level objects in a hierarchical store.\n-`emit(type, event)` | This can be used to dispatch event notifications, indicating changes to the objects in the collection. This should be called by `put`, `add`, and `remove` methods if the `autoEmit` property is `false`. This can also be used to notify stores if objects have changed from other sources (if a change has occurred on the server, from another user). There is a corresponding `on` method on [collections](./Collection.md#ontype-listener) for listening to data change events. Also, the [Trackable](./Stores.md#trackable) can be used to add index/position information to the events.\n+`emit(type, event)` | This can be used to dispatch event notifications, indicating changes to the objects in the collection. This should be called by `put`, `add`, and `remove` methods if the `autoEmit` property is `false`. This can also be used to notify stores if objects have changed from other sources (if a change has occurred on the server, from another user). There is a corresponding `on` method on [collections](./Collection.md#ontype-listener) for listening to data change events. Also, the [Trackable](./Stores.md#trackable) mixin can be used to add index/position information to the events.\n \n-Stores that can perform synchronous operations may provide analogous methods for `get`, `put`, `add`, and `remove` that end with `Sync` to provide synchronous support. For example `getSync(id)` will directly return an object instead of a promise. The `dstore/Memory` store provides `Sync` methods.\n\\ No newline at end of file\n+#### Synchronous Methods\n+\n+Stores that can perform synchronous operations may provide analogous methods for `get`, `put`, `add`, and `remove` that end with `Sync` to provide synchronous support. For example `getSync(id)` will directly return an object instead of a promise. The `dstore/Memory` store provides `Sync` methods in addition to the promise-based methods. This behavior has been separated into distinct methods to provide consistent return types.\n+\n+It is generally advisable to always use the synchronous methods so that client code does not have to be updated in case the store is changed. However, if you have very performance intensive store accesses, the synchronous methods can be used to avoid the minor overhead imposed by promises.","path":"docs/Store.md","position":null,"original_position":24,"commit_id":"7b70282e30998bed489cc0a0a2fc5681125f6536","original_commit_id":"da21c7950da6642b09f504c008c8042f6ba5bfb8","user":{"login":"msssk","id":931637,"avatar_url":"https://avatars.githubusercontent.com/u/931637?v=3","gravatar_id":"","url":"https://api.github.com/users/msssk","html_url":"https://github.com/msssk","followers_url":"https://api.github.com/users/msssk/followers","following_url":"https://api.github.com/users/msssk/following{/other_user}","gists_url":"https://api.github.com/users/msssk/gists{/gist_id}","starred_url":"https://api.github.com/users/msssk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msssk/subscriptions","organizations_url":"https://api.github.com/users/msssk/orgs","repos_url":"https://api.github.com/users/msssk/repos","events_url":"https://api.github.com/users/msssk/events{/privacy}","received_events_url":"https://api.github.com/users/msssk/received_events","type":"User","site_admin":false},"body":"Thank you! A very important distinction, fixed it!","created_at":"2016-09-06T23:33:17Z","updated_at":"2016-09-06T23:33:17Z","html_url":"https://github.com/SitePen/dstore/pull/196#discussion_r77737799","pull_request_url":"https://api.github.com/repos/SitePen/dstore/pulls/196","_links":{"self":{"href":"https://api.github.com/repos/SitePen/dstore/pulls/comments/77737799"},"html":{"href":"https://github.com/SitePen/dstore/pull/196#discussion_r77737799"},"pull_request":{"href":"https://api.github.com/repos/SitePen/dstore/pulls/196"}}},"pull_request":{"url":"https://api.github.com/repos/SitePen/dstore/pulls/196","id":83370321,"html_url":"https://github.com/SitePen/dstore/pull/196","diff_url":"https://github.com/SitePen/dstore/pull/196.diff","patch_url":"https://github.com/SitePen/dstore/pull/196.patch","issue_url":"https://api.github.com/repos/SitePen/dstore/issues/196","number":196,"state":"open","locked":false,"title":"Improve documentation for Memory store","user":{"login":"msssk","id":931637,"avatar_url":"https://avatars.githubusercontent.com/u/931637?v=3","gravatar_id":"","url":"https://api.github.com/users/msssk","html_url":"https://github.com/msssk","followers_url":"https://api.github.com/users/msssk/followers","following_url":"https://api.github.com/users/msssk/following{/other_user}","gists_url":"https://api.github.com/users/msssk/gists{/gist_id}","starred_url":"https://api.github.com/users/msssk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msssk/subscriptions","organizations_url":"https://api.github.com/users/msssk/orgs","repos_url":"https://api.github.com/users/msssk/repos","events_url":"https://api.github.com/users/msssk/events{/privacy}","received_events_url":"https://api.github.com/users/msssk/received_events","type":"User","site_admin":false},"body":"* document sync methods in a table\r\n* explain when to use sync methods\r\n* document `setData` method","created_at":"2016-08-31T00:27:25Z","updated_at":"2016-09-06T23:33:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8020be6f8b43c492e9693fc4f327e89b105232ac","assignee":{"login":"edhager","id":4441986,"avatar_url":"https://avatars.githubusercontent.com/u/4441986?v=3","gravatar_id":"","url":"https://api.github.com/users/edhager","html_url":"https://github.com/edhager","followers_url":"https://api.github.com/users/edhager/followers","following_url":"https://api.github.com/users/edhager/following{/other_user}","gists_url":"https://api.github.com/users/edhager/gists{/gist_id}","starred_url":"https://api.github.com/users/edhager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edhager/subscriptions","organizations_url":"https://api.github.com/users/edhager/orgs","repos_url":"https://api.github.com/users/edhager/repos","events_url":"https://api.github.com/users/edhager/events{/privacy}","received_events_url":"https://api.github.com/users/edhager/received_events","type":"User","site_admin":false},"assignees":[{"login":"edhager","id":4441986,"avatar_url":"https://avatars.githubusercontent.com/u/4441986?v=3","gravatar_id":"","url":"https://api.github.com/users/edhager","html_url":"https://github.com/edhager","followers_url":"https://api.github.com/users/edhager/followers","following_url":"https://api.github.com/users/edhager/following{/other_user}","gists_url":"https://api.github.com/users/edhager/gists{/gist_id}","starred_url":"https://api.github.com/users/edhager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edhager/subscriptions","organizations_url":"https://api.github.com/users/edhager/orgs","repos_url":"https://api.github.com/users/edhager/repos","events_url":"https://api.github.com/users/edhager/events{/privacy}","received_events_url":"https://api.github.com/users/edhager/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/SitePen/dstore/pulls/196/commits","review_comments_url":"https://api.github.com/repos/SitePen/dstore/pulls/196/comments","review_comment_url":"https://api.github.com/repos/SitePen/dstore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SitePen/dstore/issues/196/comments","statuses_url":"https://api.github.com/repos/SitePen/dstore/statuses/7b70282e30998bed489cc0a0a2fc5681125f6536","head":{"label":"msssk:sync-method-docs","ref":"sync-method-docs","sha":"7b70282e30998bed489cc0a0a2fc5681125f6536","user":{"login":"msssk","id":931637,"avatar_url":"https://avatars.githubusercontent.com/u/931637?v=3","gravatar_id":"","url":"https://api.github.com/users/msssk","html_url":"https://github.com/msssk","followers_url":"https://api.github.com/users/msssk/followers","following_url":"https://api.github.com/users/msssk/following{/other_user}","gists_url":"https://api.github.com/users/msssk/gists{/gist_id}","starred_url":"https://api.github.com/users/msssk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msssk/subscriptions","organizations_url":"https://api.github.com/users/msssk/orgs","repos_url":"https://api.github.com/users/msssk/repos","events_url":"https://api.github.com/users/msssk/events{/privacy}","received_events_url":"https://api.github.com/users/msssk/received_events","type":"User","site_admin":false},"repo":{"id":20076038,"name":"dstore","full_name":"msssk/dstore","owner":{"login":"msssk","id":931637,"avatar_url":"https://avatars.githubusercontent.com/u/931637?v=3","gravatar_id":"","url":"https://api.github.com/users/msssk","html_url":"https://github.com/msssk","followers_url":"https://api.github.com/users/msssk/followers","following_url":"https://api.github.com/users/msssk/following{/other_user}","gists_url":"https://api.github.com/users/msssk/gists{/gist_id}","starred_url":"https://api.github.com/users/msssk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msssk/subscriptions","organizations_url":"https://api.github.com/users/msssk/orgs","repos_url":"https://api.github.com/users/msssk/repos","events_url":"https://api.github.com/users/msssk/events{/privacy}","received_events_url":"https://api.github.com/users/msssk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/msssk/dstore","description":"","fork":true,"url":"https://api.github.com/repos/msssk/dstore","forks_url":"https://api.github.com/repos/msssk/dstore/forks","keys_url":"https://api.github.com/repos/msssk/dstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/msssk/dstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/msssk/dstore/teams","hooks_url":"https://api.github.com/repos/msssk/dstore/hooks","issue_events_url":"https://api.github.com/repos/msssk/dstore/issues/events{/number}","events_url":"https://api.github.com/repos/msssk/dstore/events","assignees_url":"https://api.github.com/repos/msssk/dstore/assignees{/user}","branches_url":"https://api.github.com/repos/msssk/dstore/branches{/branch}","tags_url":"https://api.github.com/repos/msssk/dstore/tags","blobs_url":"https://api.github.com/repos/msssk/dstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/msssk/dstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/msssk/dstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/msssk/dstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/msssk/dstore/statuses/{sha}","languages_url":"https://api.github.com/repos/msssk/dstore/languages","stargazers_url":"https://api.github.com/repos/msssk/dstore/stargazers","contributors_url":"https://api.github.com/repos/msssk/dstore/contributors","subscribers_url":"https://api.github.com/repos/msssk/dstore/subscribers","subscription_url":"https://api.github.com/repos/msssk/dstore/subscription","commits_url":"https://api.github.com/repos/msssk/dstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/msssk/dstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/msssk/dstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/msssk/dstore/issues/comments{/number}","contents_url":"https://api.github.com/repos/msssk/dstore/contents/{+path}","compare_url":"https://api.github.com/repos/msssk/dstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/msssk/dstore/merges","archive_url":"https://api.github.com/repos/msssk/dstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/msssk/dstore/downloads","issues_url":"https://api.github.com/repos/msssk/dstore/issues{/number}","pulls_url":"https://api.github.com/repos/msssk/dstore/pulls{/number}","milestones_url":"https://api.github.com/repos/msssk/dstore/milestones{/number}","notifications_url":"https://api.github.com/repos/msssk/dstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/msssk/dstore/labels{/name}","releases_url":"https://api.github.com/repos/msssk/dstore/releases{/id}","deployments_url":"https://api.github.com/repos/msssk/dstore/deployments","created_at":"2014-05-22T20:32:46Z","updated_at":"2014-05-23T23:24:51Z","pushed_at":"2016-09-06T23:31:34Z","git_url":"git://github.com/msssk/dstore.git","ssh_url":"git@github.com:msssk/dstore.git","clone_url":"https://github.com/msssk/dstore.git","svn_url":"https://github.com/msssk/dstore","homepage":null,"size":985,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SitePen:master","ref":"master","sha":"084f92d166c60f6a0c3232c352dd0c3f197123ed","user":{"login":"SitePen","id":1067343,"avatar_url":"https://avatars.githubusercontent.com/u/1067343?v=3","gravatar_id":"","url":"https://api.github.com/users/SitePen","html_url":"https://github.com/SitePen","followers_url":"https://api.github.com/users/SitePen/followers","following_url":"https://api.github.com/users/SitePen/following{/other_user}","gists_url":"https://api.github.com/users/SitePen/gists{/gist_id}","starred_url":"https://api.github.com/users/SitePen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SitePen/subscriptions","organizations_url":"https://api.github.com/users/SitePen/orgs","repos_url":"https://api.github.com/users/SitePen/repos","events_url":"https://api.github.com/users/SitePen/events{/privacy}","received_events_url":"https://api.github.com/users/SitePen/received_events","type":"Organization","site_admin":false},"repo":{"id":11800427,"name":"dstore","full_name":"SitePen/dstore","owner":{"login":"SitePen","id":1067343,"avatar_url":"https://avatars.githubusercontent.com/u/1067343?v=3","gravatar_id":"","url":"https://api.github.com/users/SitePen","html_url":"https://github.com/SitePen","followers_url":"https://api.github.com/users/SitePen/followers","following_url":"https://api.github.com/users/SitePen/following{/other_user}","gists_url":"https://api.github.com/users/SitePen/gists{/gist_id}","starred_url":"https://api.github.com/users/SitePen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SitePen/subscriptions","organizations_url":"https://api.github.com/users/SitePen/orgs","repos_url":"https://api.github.com/users/SitePen/repos","events_url":"https://api.github.com/users/SitePen/events{/privacy}","received_events_url":"https://api.github.com/users/SitePen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SitePen/dstore","description":"","fork":false,"url":"https://api.github.com/repos/SitePen/dstore","forks_url":"https://api.github.com/repos/SitePen/dstore/forks","keys_url":"https://api.github.com/repos/SitePen/dstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SitePen/dstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SitePen/dstore/teams","hooks_url":"https://api.github.com/repos/SitePen/dstore/hooks","issue_events_url":"https://api.github.com/repos/SitePen/dstore/issues/events{/number}","events_url":"https://api.github.com/repos/SitePen/dstore/events","assignees_url":"https://api.github.com/repos/SitePen/dstore/assignees{/user}","branches_url":"https://api.github.com/repos/SitePen/dstore/branches{/branch}","tags_url":"https://api.github.com/repos/SitePen/dstore/tags","blobs_url":"https://api.github.com/repos/SitePen/dstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SitePen/dstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SitePen/dstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/SitePen/dstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SitePen/dstore/statuses/{sha}","languages_url":"https://api.github.com/repos/SitePen/dstore/languages","stargazers_url":"https://api.github.com/repos/SitePen/dstore/stargazers","contributors_url":"https://api.github.com/repos/SitePen/dstore/contributors","subscribers_url":"https://api.github.com/repos/SitePen/dstore/subscribers","subscription_url":"https://api.github.com/repos/SitePen/dstore/subscription","commits_url":"https://api.github.com/repos/SitePen/dstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/SitePen/dstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/SitePen/dstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/SitePen/dstore/issues/comments{/number}","contents_url":"https://api.github.com/repos/SitePen/dstore/contents/{+path}","compare_url":"https://api.github.com/repos/SitePen/dstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SitePen/dstore/merges","archive_url":"https://api.github.com/repos/SitePen/dstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SitePen/dstore/downloads","issues_url":"https://api.github.com/repos/SitePen/dstore/issues{/number}","pulls_url":"https://api.github.com/repos/SitePen/dstore/pulls{/number}","milestones_url":"https://api.github.com/repos/SitePen/dstore/milestones{/number}","notifications_url":"https://api.github.com/repos/SitePen/dstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SitePen/dstore/labels{/name}","releases_url":"https://api.github.com/repos/SitePen/dstore/releases{/id}","deployments_url":"https://api.github.com/repos/SitePen/dstore/deployments","created_at":"2013-07-31T20:24:42Z","updated_at":"2016-09-02T13:16:22Z","pushed_at":"2016-09-06T23:31:35Z","git_url":"git://github.com/SitePen/dstore.git","ssh_url":"git@github.com:SitePen/dstore.git","clone_url":"https://github.com/SitePen/dstore.git","svn_url":"https://github.com/SitePen/dstore","homepage":"http://dstorejs.io/","size":1696,"stargazers_count":247,"watchers_count":247,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":74,"forks":66,"open_issues":74,"watchers":247,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SitePen/dstore/pulls/196"},"html":{"href":"https://github.com/SitePen/dstore/pull/196"},"issue":{"href":"https://api.github.com/repos/SitePen/dstore/issues/196"},"comments":{"href":"https://api.github.com/repos/SitePen/dstore/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/SitePen/dstore/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/SitePen/dstore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SitePen/dstore/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/SitePen/dstore/statuses/7b70282e30998bed489cc0a0a2fc5681125f6536"}}}}
{"actor":{"display_login":"msssk"}}