{"action":"created","comment":{"url":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/comments/59994661","id":59994661,"diff_hunk":"@@ -25,8 +25,209 @@\n import Dispatch\n import CSQLite\n \n+\n+/// The mode in which a transaction acquires a lock.\n+public enum TransactionMode : String {\n+    \n+    /// Defers locking the database till the first read/write executes.\n+    case Deferred = \"DEFERRED\"\n+    \n+    /// Immediately acquires a reserved lock on the database.\n+    case Immediate = \"IMMEDIATE\"\n+    \n+    /// Immediately acquires an exclusive lock on all databases.\n+    case Exclusive = \"EXCLUSIVE\"\n+    \n+}\n+\n+\n+/// Protocol to an SQLite connection\n+public protocol Connection {","path":"SQLite/Core/Connection.swift","position":21,"original_position":21,"commit_id":"18f612fd112bdedc6fecec558fb27cd119a2c59e","original_commit_id":"18f612fd112bdedc6fecec558fb27cd119a2c59e","user":{"login":"stephencelis","id":658,"avatar_url":"https://avatars.githubusercontent.com/u/658?v=3","gravatar_id":"","url":"https://api.github.com/users/stephencelis","html_url":"https://github.com/stephencelis","followers_url":"https://api.github.com/users/stephencelis/followers","following_url":"https://api.github.com/users/stephencelis/following{/other_user}","gists_url":"https://api.github.com/users/stephencelis/gists{/gist_id}","starred_url":"https://api.github.com/users/stephencelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephencelis/subscriptions","organizations_url":"https://api.github.com/users/stephencelis/orgs","repos_url":"https://api.github.com/users/stephencelis/repos","events_url":"https://api.github.com/users/stephencelis/events{/privacy}","received_events_url":"https://api.github.com/users/stephencelis/received_events","type":"User","site_admin":false},"body":"I wonder if we can find another, happier medium. The reaction I had to the current naming direction is that it's a little harder to derive specific meaning on its own. I'm left wondering why only one of the types is prefixed with the abbreviation `DB` and what the significance of `DB` has over the other types. I also wonder if decorators like `DB` are slightly redundant in a SQLite library?\r\n\r\nI actually prefer `ConnectionType` over `ConnectionProtocol`, but was trying to move in the general direction of Swift norms. I wonder if we could come up with a different protocol name that we like even better. Or maybe `DBConnection` could change to something else, like `ConcreteConnection`, though that descriptor still seems slightly confusing to me.\r\n\r\nAny other ideas?","created_at":"2016-04-17T22:40:45Z","updated_at":"2016-04-17T22:40:45Z","html_url":"https://github.com/stephencelis/SQLite.swift/pull/411#discussion_r59994661","pull_request_url":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/411","_links":{"self":{"href":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/comments/59994661"},"html":{"href":"https://github.com/stephencelis/SQLite.swift/pull/411#discussion_r59994661"},"pull_request":{"href":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/411"}}},"pull_request":{"url":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/411","id":66731714,"html_url":"https://github.com/stephencelis/SQLite.swift/pull/411","diff_url":"https://github.com/stephencelis/SQLite.swift/pull/411.diff","patch_url":"https://github.com/stephencelis/SQLite.swift/pull/411.patch","issue_url":"https://api.github.com/repos/stephencelis/SQLite.swift/issues/411","number":411,"state":"open","locked":false,"title":"Connection pool","user":{"login":"kdubb","id":787655,"avatar_url":"https://avatars.githubusercontent.com/u/787655?v=3","gravatar_id":"","url":"https://api.github.com/users/kdubb","html_url":"https://github.com/kdubb","followers_url":"https://api.github.com/users/kdubb/followers","following_url":"https://api.github.com/users/kdubb/following{/other_user}","gists_url":"https://api.github.com/users/kdubb/gists{/gist_id}","starred_url":"https://api.github.com/users/kdubb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdubb/subscriptions","organizations_url":"https://api.github.com/users/kdubb/orgs","repos_url":"https://api.github.com/users/kdubb/repos","events_url":"https://api.github.com/users/kdubb/events{/privacy}","received_events_url":"https://api.github.com/users/kdubb/received_events","type":"User","site_admin":false},"body":"Implement simultaneous multi reader, single write connection pool.  Uses WAL and exclusive VFS mode to achieve concurrency.","created_at":"2016-04-16T08:18:08Z","updated_at":"2016-04-17T22:40:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef17808253a6a4456f8bdd26734889f20b5730c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/411/commits","review_comments_url":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/411/comments","review_comment_url":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stephencelis/SQLite.swift/issues/411/comments","statuses_url":"https://api.github.com/repos/stephencelis/SQLite.swift/statuses/18f612fd112bdedc6fecec558fb27cd119a2c59e","head":{"label":"reTXT:connection_pool","ref":"connection_pool","sha":"18f612fd112bdedc6fecec558fb27cd119a2c59e","user":{"login":"reTXT","id":7282805,"avatar_url":"https://avatars.githubusercontent.com/u/7282805?v=3","gravatar_id":"","url":"https://api.github.com/users/reTXT","html_url":"https://github.com/reTXT","followers_url":"https://api.github.com/users/reTXT/followers","following_url":"https://api.github.com/users/reTXT/following{/other_user}","gists_url":"https://api.github.com/users/reTXT/gists{/gist_id}","starred_url":"https://api.github.com/users/reTXT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reTXT/subscriptions","organizations_url":"https://api.github.com/users/reTXT/orgs","repos_url":"https://api.github.com/users/reTXT/repos","events_url":"https://api.github.com/users/reTXT/events{/privacy}","received_events_url":"https://api.github.com/users/reTXT/received_events","type":"Organization","site_admin":false},"repo":{"id":47034925,"name":"SQLite.swift","full_name":"reTXT/SQLite.swift","owner":{"login":"reTXT","id":7282805,"avatar_url":"https://avatars.githubusercontent.com/u/7282805?v=3","gravatar_id":"","url":"https://api.github.com/users/reTXT","html_url":"https://github.com/reTXT","followers_url":"https://api.github.com/users/reTXT/followers","following_url":"https://api.github.com/users/reTXT/following{/other_user}","gists_url":"https://api.github.com/users/reTXT/gists{/gist_id}","starred_url":"https://api.github.com/users/reTXT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reTXT/subscriptions","organizations_url":"https://api.github.com/users/reTXT/orgs","repos_url":"https://api.github.com/users/reTXT/repos","events_url":"https://api.github.com/users/reTXT/events{/privacy}","received_events_url":"https://api.github.com/users/reTXT/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reTXT/SQLite.swift","description":"A type-safe, Swift-language layer over SQLite3.","fork":true,"url":"https://api.github.com/repos/reTXT/SQLite.swift","forks_url":"https://api.github.com/repos/reTXT/SQLite.swift/forks","keys_url":"https://api.github.com/repos/reTXT/SQLite.swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reTXT/SQLite.swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reTXT/SQLite.swift/teams","hooks_url":"https://api.github.com/repos/reTXT/SQLite.swift/hooks","issue_events_url":"https://api.github.com/repos/reTXT/SQLite.swift/issues/events{/number}","events_url":"https://api.github.com/repos/reTXT/SQLite.swift/events","assignees_url":"https://api.github.com/repos/reTXT/SQLite.swift/assignees{/user}","branches_url":"https://api.github.com/repos/reTXT/SQLite.swift/branches{/branch}","tags_url":"https://api.github.com/repos/reTXT/SQLite.swift/tags","blobs_url":"https://api.github.com/repos/reTXT/SQLite.swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reTXT/SQLite.swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reTXT/SQLite.swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/reTXT/SQLite.swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reTXT/SQLite.swift/statuses/{sha}","languages_url":"https://api.github.com/repos/reTXT/SQLite.swift/languages","stargazers_url":"https://api.github.com/repos/reTXT/SQLite.swift/stargazers","contributors_url":"https://api.github.com/repos/reTXT/SQLite.swift/contributors","subscribers_url":"https://api.github.com/repos/reTXT/SQLite.swift/subscribers","subscription_url":"https://api.github.com/repos/reTXT/SQLite.swift/subscription","commits_url":"https://api.github.com/repos/reTXT/SQLite.swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/reTXT/SQLite.swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/reTXT/SQLite.swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/reTXT/SQLite.swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/reTXT/SQLite.swift/contents/{+path}","compare_url":"https://api.github.com/repos/reTXT/SQLite.swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reTXT/SQLite.swift/merges","archive_url":"https://api.github.com/repos/reTXT/SQLite.swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reTXT/SQLite.swift/downloads","issues_url":"https://api.github.com/repos/reTXT/SQLite.swift/issues{/number}","pulls_url":"https://api.github.com/repos/reTXT/SQLite.swift/pulls{/number}","milestones_url":"https://api.github.com/repos/reTXT/SQLite.swift/milestones{/number}","notifications_url":"https://api.github.com/repos/reTXT/SQLite.swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reTXT/SQLite.swift/labels{/name}","releases_url":"https://api.github.com/repos/reTXT/SQLite.swift/releases{/id}","deployments_url":"https://api.github.com/repos/reTXT/SQLite.swift/deployments","created_at":"2015-11-28T18:26:04Z","updated_at":"2016-04-16T06:49:30Z","pushed_at":"2016-04-17T21:55:05Z","git_url":"git://github.com/reTXT/SQLite.swift.git","ssh_url":"git@github.com:reTXT/SQLite.swift.git","clone_url":"https://github.com/reTXT/SQLite.swift.git","svn_url":"https://github.com/reTXT/SQLite.swift","homepage":"","size":2293,"stargazers_count":0,"watchers_count":0,"language":"Swift","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":"stephencelis:master","ref":"master","sha":"ccf43925aacf9fcc6130639247b3e7578a1c727a","user":{"login":"stephencelis","id":658,"avatar_url":"https://avatars.githubusercontent.com/u/658?v=3","gravatar_id":"","url":"https://api.github.com/users/stephencelis","html_url":"https://github.com/stephencelis","followers_url":"https://api.github.com/users/stephencelis/followers","following_url":"https://api.github.com/users/stephencelis/following{/other_user}","gists_url":"https://api.github.com/users/stephencelis/gists{/gist_id}","starred_url":"https://api.github.com/users/stephencelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephencelis/subscriptions","organizations_url":"https://api.github.com/users/stephencelis/orgs","repos_url":"https://api.github.com/users/stephencelis/repos","events_url":"https://api.github.com/users/stephencelis/events{/privacy}","received_events_url":"https://api.github.com/users/stephencelis/received_events","type":"User","site_admin":false},"repo":{"id":24797553,"name":"SQLite.swift","full_name":"stephencelis/SQLite.swift","owner":{"login":"stephencelis","id":658,"avatar_url":"https://avatars.githubusercontent.com/u/658?v=3","gravatar_id":"","url":"https://api.github.com/users/stephencelis","html_url":"https://github.com/stephencelis","followers_url":"https://api.github.com/users/stephencelis/followers","following_url":"https://api.github.com/users/stephencelis/following{/other_user}","gists_url":"https://api.github.com/users/stephencelis/gists{/gist_id}","starred_url":"https://api.github.com/users/stephencelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephencelis/subscriptions","organizations_url":"https://api.github.com/users/stephencelis/orgs","repos_url":"https://api.github.com/users/stephencelis/repos","events_url":"https://api.github.com/users/stephencelis/events{/privacy}","received_events_url":"https://api.github.com/users/stephencelis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stephencelis/SQLite.swift","description":"A type-safe, Swift-language layer over SQLite3.","fork":false,"url":"https://api.github.com/repos/stephencelis/SQLite.swift","forks_url":"https://api.github.com/repos/stephencelis/SQLite.swift/forks","keys_url":"https://api.github.com/repos/stephencelis/SQLite.swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephencelis/SQLite.swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephencelis/SQLite.swift/teams","hooks_url":"https://api.github.com/repos/stephencelis/SQLite.swift/hooks","issue_events_url":"https://api.github.com/repos/stephencelis/SQLite.swift/issues/events{/number}","events_url":"https://api.github.com/repos/stephencelis/SQLite.swift/events","assignees_url":"https://api.github.com/repos/stephencelis/SQLite.swift/assignees{/user}","branches_url":"https://api.github.com/repos/stephencelis/SQLite.swift/branches{/branch}","tags_url":"https://api.github.com/repos/stephencelis/SQLite.swift/tags","blobs_url":"https://api.github.com/repos/stephencelis/SQLite.swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephencelis/SQLite.swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephencelis/SQLite.swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephencelis/SQLite.swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephencelis/SQLite.swift/statuses/{sha}","languages_url":"https://api.github.com/repos/stephencelis/SQLite.swift/languages","stargazers_url":"https://api.github.com/repos/stephencelis/SQLite.swift/stargazers","contributors_url":"https://api.github.com/repos/stephencelis/SQLite.swift/contributors","subscribers_url":"https://api.github.com/repos/stephencelis/SQLite.swift/subscribers","subscription_url":"https://api.github.com/repos/stephencelis/SQLite.swift/subscription","commits_url":"https://api.github.com/repos/stephencelis/SQLite.swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephencelis/SQLite.swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephencelis/SQLite.swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephencelis/SQLite.swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/stephencelis/SQLite.swift/contents/{+path}","compare_url":"https://api.github.com/repos/stephencelis/SQLite.swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephencelis/SQLite.swift/merges","archive_url":"https://api.github.com/repos/stephencelis/SQLite.swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephencelis/SQLite.swift/downloads","issues_url":"https://api.github.com/repos/stephencelis/SQLite.swift/issues{/number}","pulls_url":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls{/number}","milestones_url":"https://api.github.com/repos/stephencelis/SQLite.swift/milestones{/number}","notifications_url":"https://api.github.com/repos/stephencelis/SQLite.swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephencelis/SQLite.swift/labels{/name}","releases_url":"https://api.github.com/repos/stephencelis/SQLite.swift/releases{/id}","deployments_url":"https://api.github.com/repos/stephencelis/SQLite.swift/deployments","created_at":"2014-10-04T18:23:46Z","updated_at":"2016-04-17T15:57:54Z","pushed_at":"2016-04-17T21:38:31Z","git_url":"git://github.com/stephencelis/SQLite.swift.git","ssh_url":"git@github.com:stephencelis/SQLite.swift.git","clone_url":"https://github.com/stephencelis/SQLite.swift.git","svn_url":"https://github.com/stephencelis/SQLite.swift","homepage":"","size":4936,"stargazers_count":2781,"watchers_count":2781,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":454,"mirror_url":null,"open_issues_count":63,"forks":454,"open_issues":63,"watchers":2781,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/411"},"html":{"href":"https://github.com/stephencelis/SQLite.swift/pull/411"},"issue":{"href":"https://api.github.com/repos/stephencelis/SQLite.swift/issues/411"},"comments":{"href":"https://api.github.com/repos/stephencelis/SQLite.swift/issues/411/comments"},"review_comments":{"href":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/411/comments"},"review_comment":{"href":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stephencelis/SQLite.swift/pulls/411/commits"},"statuses":{"href":"https://api.github.com/repos/stephencelis/SQLite.swift/statuses/18f612fd112bdedc6fecec558fb27cd119a2c59e"}}}}