{"action":"created","comment":{"url":"https://api.github.com/repos/otoolep/rqlite/pulls/comments/47801905","id":47801905,"diff_hunk":"@@ -313,7 +314,9 @@ func (s *Server) ListenAndServe(leader string) error {\n \ts.router.HandleFunc(\"/diagnostics\", s.serveDiagnostics).Methods(\"GET\")\n \ts.router.HandleFunc(\"/raft\", s.serveRaftInfo).Methods(\"GET\")\n \ts.router.HandleFunc(\"/db\", s.readHandler).Methods(\"GET\")\n+\ts.router.HandleFunc(\"/db/{tablename}\", s.tableReadHandler).Methods(\"GET\")\n \ts.router.HandleFunc(\"/db\", s.writeHandler).Methods(\"POST\")\n+\ts.router.HandleFunc(\"/db/ingest\", s.tableWriteHandler).Methods(\"POST\")","path":"server/server.go","position":14,"original_position":14,"commit_id":"98885b5b8a13fef593ab0259c830c1bcff67fe9b","original_commit_id":"98885b5b8a13fef593ab0259c830c1bcff67fe9b","user":{"login":"heckdevice","id":7968042,"avatar_url":"https://avatars.githubusercontent.com/u/7968042?v=3","gravatar_id":"","url":"https://api.github.com/users/heckdevice","html_url":"https://github.com/heckdevice","followers_url":"https://api.github.com/users/heckdevice/followers","following_url":"https://api.github.com/users/heckdevice/following{/other_user}","gists_url":"https://api.github.com/users/heckdevice/gists{/gist_id}","starred_url":"https://api.github.com/users/heckdevice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heckdevice/subscriptions","organizations_url":"https://api.github.com/users/heckdevice/orgs","repos_url":"https://api.github.com/users/heckdevice/repos","events_url":"https://api.github.com/users/heckdevice/events{/privacy}","received_events_url":"https://api.github.com/users/heckdevice/received_events","type":"User","site_admin":false},"body":"Thats a valid point. OK","created_at":"2015-12-16T16:55:14Z","updated_at":"2015-12-16T16:55:14Z","html_url":"https://github.com/otoolep/rqlite/pull/49#discussion_r47801905","pull_request_url":"https://api.github.com/repos/otoolep/rqlite/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/otoolep/rqlite/pulls/comments/47801905"},"html":{"href":"https://github.com/otoolep/rqlite/pull/49#discussion_r47801905"},"pull_request":{"href":"https://api.github.com/repos/otoolep/rqlite/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/otoolep/rqlite/pulls/49","id":53544387,"html_url":"https://github.com/otoolep/rqlite/pull/49","diff_url":"https://github.com/otoolep/rqlite/pull/49.diff","patch_url":"https://github.com/otoolep/rqlite/pull/49.patch","issue_url":"https://api.github.com/repos/otoolep/rqlite/issues/49","number":49,"state":"open","locked":false,"title":"New API for Retrieval / Bulk Ingest","user":{"login":"heckdevice","id":7968042,"avatar_url":"https://avatars.githubusercontent.com/u/7968042?v=3","gravatar_id":"","url":"https://api.github.com/users/heckdevice","html_url":"https://github.com/heckdevice","followers_url":"https://api.github.com/users/heckdevice/followers","following_url":"https://api.github.com/users/heckdevice/following{/other_user}","gists_url":"https://api.github.com/users/heckdevice/gists{/gist_id}","starred_url":"https://api.github.com/users/heckdevice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heckdevice/subscriptions","organizations_url":"https://api.github.com/users/heckdevice/orgs","repos_url":"https://api.github.com/users/heckdevice/repos","events_url":"https://api.github.com/users/heckdevice/events{/privacy}","received_events_url":"https://api.github.com/users/heckdevice/received_events","type":"User","site_admin":false},"body":"Implemented the following two apis:\r\n\r\n1. /db/{tablename} GET operation internally transforms to a Select * from {tablename} and returns the JSON\r\n\r\n2. /db/ingest POST operation bulk ingests the data into tables. The payload has to be in the following format:\r\nTaking e.g. of table foo with columns: id and name\r\n{\r\n\"data\":\r\n[\r\n {\r\n  \"table\":\"foo\",\r\n  \"payload\":\r\n  [{\"name\":\"testdata6\",\"id\":\"601\"},\r\n  {\"name\":\"testdata7\",\"id\":\"701\"}]\r\n }\r\n]\r\n}\r\n\r\nThe same can be used to insert into multiple tables as well.","created_at":"2015-12-14T10:04:28Z","updated_at":"2015-12-16T16:55:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bfe6cee02162d7c021d9cd908702d8e367846c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/otoolep/rqlite/pulls/49/commits","review_comments_url":"https://api.github.com/repos/otoolep/rqlite/pulls/49/comments","review_comment_url":"https://api.github.com/repos/otoolep/rqlite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/otoolep/rqlite/issues/49/comments","statuses_url":"https://api.github.com/repos/otoolep/rqlite/statuses/98885b5b8a13fef593ab0259c830c1bcff67fe9b","head":{"label":"jsrCorp:master","ref":"master","sha":"98885b5b8a13fef593ab0259c830c1bcff67fe9b","user":{"login":"jsrCorp","id":13146577,"avatar_url":"https://avatars.githubusercontent.com/u/13146577?v=3","gravatar_id":"","url":"https://api.github.com/users/jsrCorp","html_url":"https://github.com/jsrCorp","followers_url":"https://api.github.com/users/jsrCorp/followers","following_url":"https://api.github.com/users/jsrCorp/following{/other_user}","gists_url":"https://api.github.com/users/jsrCorp/gists{/gist_id}","starred_url":"https://api.github.com/users/jsrCorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsrCorp/subscriptions","organizations_url":"https://api.github.com/users/jsrCorp/orgs","repos_url":"https://api.github.com/users/jsrCorp/repos","events_url":"https://api.github.com/users/jsrCorp/events{/privacy}","received_events_url":"https://api.github.com/users/jsrCorp/received_events","type":"Organization","site_admin":false},"repo":{"id":47168322,"name":"rqlite","full_name":"jsrCorp/rqlite","owner":{"login":"jsrCorp","id":13146577,"avatar_url":"https://avatars.githubusercontent.com/u/13146577?v=3","gravatar_id":"","url":"https://api.github.com/users/jsrCorp","html_url":"https://github.com/jsrCorp","followers_url":"https://api.github.com/users/jsrCorp/followers","following_url":"https://api.github.com/users/jsrCorp/following{/other_user}","gists_url":"https://api.github.com/users/jsrCorp/gists{/gist_id}","starred_url":"https://api.github.com/users/jsrCorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsrCorp/subscriptions","organizations_url":"https://api.github.com/users/jsrCorp/orgs","repos_url":"https://api.github.com/users/jsrCorp/repos","events_url":"https://api.github.com/users/jsrCorp/events{/privacy}","received_events_url":"https://api.github.com/users/jsrCorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jsrCorp/rqlite","description":"Replicated SQLite using the Raft consensus protocol","fork":true,"url":"https://api.github.com/repos/jsrCorp/rqlite","forks_url":"https://api.github.com/repos/jsrCorp/rqlite/forks","keys_url":"https://api.github.com/repos/jsrCorp/rqlite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsrCorp/rqlite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsrCorp/rqlite/teams","hooks_url":"https://api.github.com/repos/jsrCorp/rqlite/hooks","issue_events_url":"https://api.github.com/repos/jsrCorp/rqlite/issues/events{/number}","events_url":"https://api.github.com/repos/jsrCorp/rqlite/events","assignees_url":"https://api.github.com/repos/jsrCorp/rqlite/assignees{/user}","branches_url":"https://api.github.com/repos/jsrCorp/rqlite/branches{/branch}","tags_url":"https://api.github.com/repos/jsrCorp/rqlite/tags","blobs_url":"https://api.github.com/repos/jsrCorp/rqlite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsrCorp/rqlite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsrCorp/rqlite/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsrCorp/rqlite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsrCorp/rqlite/statuses/{sha}","languages_url":"https://api.github.com/repos/jsrCorp/rqlite/languages","stargazers_url":"https://api.github.com/repos/jsrCorp/rqlite/stargazers","contributors_url":"https://api.github.com/repos/jsrCorp/rqlite/contributors","subscribers_url":"https://api.github.com/repos/jsrCorp/rqlite/subscribers","subscription_url":"https://api.github.com/repos/jsrCorp/rqlite/subscription","commits_url":"https://api.github.com/repos/jsrCorp/rqlite/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsrCorp/rqlite/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsrCorp/rqlite/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsrCorp/rqlite/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsrCorp/rqlite/contents/{+path}","compare_url":"https://api.github.com/repos/jsrCorp/rqlite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsrCorp/rqlite/merges","archive_url":"https://api.github.com/repos/jsrCorp/rqlite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsrCorp/rqlite/downloads","issues_url":"https://api.github.com/repos/jsrCorp/rqlite/issues{/number}","pulls_url":"https://api.github.com/repos/jsrCorp/rqlite/pulls{/number}","milestones_url":"https://api.github.com/repos/jsrCorp/rqlite/milestones{/number}","notifications_url":"https://api.github.com/repos/jsrCorp/rqlite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsrCorp/rqlite/labels{/name}","releases_url":"https://api.github.com/repos/jsrCorp/rqlite/releases{/id}","created_at":"2015-12-01T05:43:24Z","updated_at":"2015-12-14T08:16:39Z","pushed_at":"2015-12-15T03:58:21Z","git_url":"git://github.com/jsrCorp/rqlite.git","ssh_url":"git@github.com:jsrCorp/rqlite.git","clone_url":"https://github.com/jsrCorp/rqlite.git","svn_url":"https://github.com/jsrCorp/rqlite","homepage":"http://www.philipotoole.com/replicating-sqlite-using-raft-consensus","size":148,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"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":"otoolep:master","ref":"master","sha":"7d0679bea3822ebefb11ad3a39e1226166e5514b","user":{"login":"otoolep","id":536312,"avatar_url":"https://avatars.githubusercontent.com/u/536312?v=3","gravatar_id":"","url":"https://api.github.com/users/otoolep","html_url":"https://github.com/otoolep","followers_url":"https://api.github.com/users/otoolep/followers","following_url":"https://api.github.com/users/otoolep/following{/other_user}","gists_url":"https://api.github.com/users/otoolep/gists{/gist_id}","starred_url":"https://api.github.com/users/otoolep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otoolep/subscriptions","organizations_url":"https://api.github.com/users/otoolep/orgs","repos_url":"https://api.github.com/users/otoolep/repos","events_url":"https://api.github.com/users/otoolep/events{/privacy}","received_events_url":"https://api.github.com/users/otoolep/received_events","type":"User","site_admin":false},"repo":{"id":23247808,"name":"rqlite","full_name":"otoolep/rqlite","owner":{"login":"otoolep","id":536312,"avatar_url":"https://avatars.githubusercontent.com/u/536312?v=3","gravatar_id":"","url":"https://api.github.com/users/otoolep","html_url":"https://github.com/otoolep","followers_url":"https://api.github.com/users/otoolep/followers","following_url":"https://api.github.com/users/otoolep/following{/other_user}","gists_url":"https://api.github.com/users/otoolep/gists{/gist_id}","starred_url":"https://api.github.com/users/otoolep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otoolep/subscriptions","organizations_url":"https://api.github.com/users/otoolep/orgs","repos_url":"https://api.github.com/users/otoolep/repos","events_url":"https://api.github.com/users/otoolep/events{/privacy}","received_events_url":"https://api.github.com/users/otoolep/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/otoolep/rqlite","description":"Replicated SQLite using the Raft consensus protocol","fork":false,"url":"https://api.github.com/repos/otoolep/rqlite","forks_url":"https://api.github.com/repos/otoolep/rqlite/forks","keys_url":"https://api.github.com/repos/otoolep/rqlite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/otoolep/rqlite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/otoolep/rqlite/teams","hooks_url":"https://api.github.com/repos/otoolep/rqlite/hooks","issue_events_url":"https://api.github.com/repos/otoolep/rqlite/issues/events{/number}","events_url":"https://api.github.com/repos/otoolep/rqlite/events","assignees_url":"https://api.github.com/repos/otoolep/rqlite/assignees{/user}","branches_url":"https://api.github.com/repos/otoolep/rqlite/branches{/branch}","tags_url":"https://api.github.com/repos/otoolep/rqlite/tags","blobs_url":"https://api.github.com/repos/otoolep/rqlite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/otoolep/rqlite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/otoolep/rqlite/git/refs{/sha}","trees_url":"https://api.github.com/repos/otoolep/rqlite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/otoolep/rqlite/statuses/{sha}","languages_url":"https://api.github.com/repos/otoolep/rqlite/languages","stargazers_url":"https://api.github.com/repos/otoolep/rqlite/stargazers","contributors_url":"https://api.github.com/repos/otoolep/rqlite/contributors","subscribers_url":"https://api.github.com/repos/otoolep/rqlite/subscribers","subscription_url":"https://api.github.com/repos/otoolep/rqlite/subscription","commits_url":"https://api.github.com/repos/otoolep/rqlite/commits{/sha}","git_commits_url":"https://api.github.com/repos/otoolep/rqlite/git/commits{/sha}","comments_url":"https://api.github.com/repos/otoolep/rqlite/comments{/number}","issue_comment_url":"https://api.github.com/repos/otoolep/rqlite/issues/comments{/number}","contents_url":"https://api.github.com/repos/otoolep/rqlite/contents/{+path}","compare_url":"https://api.github.com/repos/otoolep/rqlite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/otoolep/rqlite/merges","archive_url":"https://api.github.com/repos/otoolep/rqlite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/otoolep/rqlite/downloads","issues_url":"https://api.github.com/repos/otoolep/rqlite/issues{/number}","pulls_url":"https://api.github.com/repos/otoolep/rqlite/pulls{/number}","milestones_url":"https://api.github.com/repos/otoolep/rqlite/milestones{/number}","notifications_url":"https://api.github.com/repos/otoolep/rqlite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/otoolep/rqlite/labels{/name}","releases_url":"https://api.github.com/repos/otoolep/rqlite/releases{/id}","created_at":"2014-08-23T04:31:18Z","updated_at":"2015-12-15T00:03:49Z","pushed_at":"2015-12-14T17:22:36Z","git_url":"git://github.com/otoolep/rqlite.git","ssh_url":"git@github.com:otoolep/rqlite.git","clone_url":"https://github.com/otoolep/rqlite.git","svn_url":"https://github.com/otoolep/rqlite","homepage":"http://www.philipotoole.com/replicating-sqlite-using-raft-consensus","size":612,"stargazers_count":430,"watchers_count":430,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":15,"forks":29,"open_issues":15,"watchers":430,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/otoolep/rqlite/pulls/49"},"html":{"href":"https://github.com/otoolep/rqlite/pull/49"},"issue":{"href":"https://api.github.com/repos/otoolep/rqlite/issues/49"},"comments":{"href":"https://api.github.com/repos/otoolep/rqlite/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/otoolep/rqlite/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/otoolep/rqlite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/otoolep/rqlite/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/otoolep/rqlite/statuses/98885b5b8a13fef593ab0259c830c1bcff67fe9b"}}}}