{"action":"created","comment":{"url":"https://api.github.com/repos/josh-wambua/kopete/pulls/comments/36033238","id":36033238,"diff_hunk":"@@ -0,0 +1,127 @@\n+#include \"databaseconstants.h\"\n+\n+QString DatabaseConstants::columnId()\n+{\n+\treturn \"id\";\n+}\n+\n+QString DatabaseConstants::columnTimeStamp()\n+{\n+\treturn \"timestamp\";\n+}\n+\n+QString DatabaseConstants::columnMessage()\n+{\n+\treturn \"message\";\n+}\n+\n+QString DatabaseConstants::columnProtocol()\n+{\n+\treturn \"protocol\";\n+}\n+\n+QString DatabaseConstants::columnAccount()\n+{\n+\treturn \"account\";\n+}\n+\n+QString DatabaseConstants::columnDirection()\n+{\n+\treturn \"direction\";\n+}\n+\n+QString DatabaseConstants::columnImportance()\n+{\n+\treturn \"importance\";\n+}\n+\n+QString DatabaseConstants::columnContact()\n+{\n+\treturn \"contact\";\n+}\n+\n+QString DatabaseConstants::columnSubject()\n+{\n+\treturn \"subject\";\n+}\n+\n+QString DatabaseConstants::columnSession()\n+{\n+\treturn \"session\";\n+}\n+\n+QString DatabaseConstants::columnSessionName()\n+{\n+\treturn \"session_name\";\n+}\n+\n+QString DatabaseConstants::columnFrom()\n+{\n+\treturn \"from\";\n+}\n+\n+QString DatabaseConstants::columnFromName()\n+{\n+\treturn \"from_name\";\n+}\n+\n+QString DatabaseConstants::columnTo()\n+{\n+\treturn \"to\";\n+}\n+\n+QString DatabaseConstants::columnToName()\n+{\n+\treturn \"to_name\";\n+}\n+\n+QString DatabaseConstants::columnState()\n+{\n+\treturn \"state\";\n+}\n+\n+QString DatabaseConstants::columnType()\n+{\n+\treturn \"type\";\n+}\n+\n+QString DatabaseConstants::columnIsGroup()\n+{\n+\treturn \"is_group\";\n+}\n+\n+QString DatabaseConstants::sql_prepareForMessageInsert()\n+{\n+\treturn \"INSERT INTO `messages` (`timestamp`, `message`, `account`, `protocol`, `direction`, `importance`, `contact`, `subject`, \"\n+\t       \" `session`, `session_name`, `from`, `from_name`, `to`, `to_name`, `state`, `type`, `is_group`) \"\n+\t       \" VALUES (:timestamp, :message, :account, :protocol, :direction, :importance, :contact, :subject, :session, :session_name, \"\n+\t       \" :from, :from_name, :to, :to_name, :state, :type, :is_group)\";\n+}\n+\n+QString DatabaseConstants::sql_createMessagesTable()\n+{\n+\treturn \"CREATE TABLE IF NOT EXISTS \\\"messages\\\" (\"","path":"plugins/history/databaseconstants.cpp","position":103,"original_position":103,"commit_id":"0e9ec0375debaf15fd18c0c25b9943a249f5785e","original_commit_id":"98963255ca19cb96276cfc71d9adc1febcf5e34e","user":{"login":"josh-wambua","id":7008757,"avatar_url":"https://avatars.githubusercontent.com/u/7008757?v=3","gravatar_id":"","url":"https://api.github.com/users/josh-wambua","html_url":"https://github.com/josh-wambua","followers_url":"https://api.github.com/users/josh-wambua/followers","following_url":"https://api.github.com/users/josh-wambua/following{/other_user}","gists_url":"https://api.github.com/users/josh-wambua/gists{/gist_id}","starred_url":"https://api.github.com/users/josh-wambua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh-wambua/subscriptions","organizations_url":"https://api.github.com/users/josh-wambua/orgs","repos_url":"https://api.github.com/users/josh-wambua/repos","events_url":"https://api.github.com/users/josh-wambua/events{/privacy}","received_events_url":"https://api.github.com/users/josh-wambua/received_events","type":"User","site_admin":false},"body":"I am working on seeing if there is another way to do this.","created_at":"2015-08-01T12:37:48Z","updated_at":"2015-08-01T12:37:48Z","html_url":"https://github.com/josh-wambua/kopete/pull/4#discussion_r36033238","pull_request_url":"https://api.github.com/repos/josh-wambua/kopete/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/josh-wambua/kopete/pulls/comments/36033238"},"html":{"href":"https://github.com/josh-wambua/kopete/pull/4#discussion_r36033238"},"pull_request":{"href":"https://api.github.com/repos/josh-wambua/kopete/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/josh-wambua/kopete/pulls/4","id":41202667,"html_url":"https://github.com/josh-wambua/kopete/pull/4","diff_url":"https://github.com/josh-wambua/kopete/pull/4.diff","patch_url":"https://github.com/josh-wambua/kopete/pull/4.patch","issue_url":"https://api.github.com/repos/josh-wambua/kopete/issues/4","number":4,"state":"open","locked":false,"title":"History/database helper","user":{"login":"josh-wambua","id":7008757,"avatar_url":"https://avatars.githubusercontent.com/u/7008757?v=3","gravatar_id":"","url":"https://api.github.com/users/josh-wambua","html_url":"https://github.com/josh-wambua","followers_url":"https://api.github.com/users/josh-wambua/followers","following_url":"https://api.github.com/users/josh-wambua/following{/other_user}","gists_url":"https://api.github.com/users/josh-wambua/gists{/gist_id}","starred_url":"https://api.github.com/users/josh-wambua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh-wambua/subscriptions","organizations_url":"https://api.github.com/users/josh-wambua/orgs","repos_url":"https://api.github.com/users/josh-wambua/repos","events_url":"https://api.github.com/users/josh-wambua/events{/privacy}","received_events_url":"https://api.github.com/users/josh-wambua/received_events","type":"User","site_admin":false},"body":"This branch is based on the prepare branch, and contains code to interface with the database. This enables full database logging.\r\n\r\nTo be reviewed after #3 ","created_at":"2015-07-30T06:44:59Z","updated_at":"2015-08-01T12:37:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a654f2e46c457c2d149fae5454f2a819c20dba9a","assignee":{"login":"josh-wambua","id":7008757,"avatar_url":"https://avatars.githubusercontent.com/u/7008757?v=3","gravatar_id":"","url":"https://api.github.com/users/josh-wambua","html_url":"https://github.com/josh-wambua","followers_url":"https://api.github.com/users/josh-wambua/followers","following_url":"https://api.github.com/users/josh-wambua/following{/other_user}","gists_url":"https://api.github.com/users/josh-wambua/gists{/gist_id}","starred_url":"https://api.github.com/users/josh-wambua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh-wambua/subscriptions","organizations_url":"https://api.github.com/users/josh-wambua/orgs","repos_url":"https://api.github.com/users/josh-wambua/repos","events_url":"https://api.github.com/users/josh-wambua/events{/privacy}","received_events_url":"https://api.github.com/users/josh-wambua/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/josh-wambua/kopete/pulls/4/commits","review_comments_url":"https://api.github.com/repos/josh-wambua/kopete/pulls/4/comments","review_comment_url":"https://api.github.com/repos/josh-wambua/kopete/pulls/comments{/number}","comments_url":"https://api.github.com/repos/josh-wambua/kopete/issues/4/comments","statuses_url":"https://api.github.com/repos/josh-wambua/kopete/statuses/0e9ec0375debaf15fd18c0c25b9943a249f5785e","head":{"label":"josh-wambua:history/database_helper","ref":"history/database_helper","sha":"0e9ec0375debaf15fd18c0c25b9943a249f5785e","user":{"login":"josh-wambua","id":7008757,"avatar_url":"https://avatars.githubusercontent.com/u/7008757?v=3","gravatar_id":"","url":"https://api.github.com/users/josh-wambua","html_url":"https://github.com/josh-wambua","followers_url":"https://api.github.com/users/josh-wambua/followers","following_url":"https://api.github.com/users/josh-wambua/following{/other_user}","gists_url":"https://api.github.com/users/josh-wambua/gists{/gist_id}","starred_url":"https://api.github.com/users/josh-wambua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh-wambua/subscriptions","organizations_url":"https://api.github.com/users/josh-wambua/orgs","repos_url":"https://api.github.com/users/josh-wambua/repos","events_url":"https://api.github.com/users/josh-wambua/events{/privacy}","received_events_url":"https://api.github.com/users/josh-wambua/received_events","type":"User","site_admin":false},"repo":{"id":36676019,"name":"kopete","full_name":"josh-wambua/kopete","owner":{"login":"josh-wambua","id":7008757,"avatar_url":"https://avatars.githubusercontent.com/u/7008757?v=3","gravatar_id":"","url":"https://api.github.com/users/josh-wambua","html_url":"https://github.com/josh-wambua","followers_url":"https://api.github.com/users/josh-wambua/followers","following_url":"https://api.github.com/users/josh-wambua/following{/other_user}","gists_url":"https://api.github.com/users/josh-wambua/gists{/gist_id}","starred_url":"https://api.github.com/users/josh-wambua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh-wambua/subscriptions","organizations_url":"https://api.github.com/users/josh-wambua/orgs","repos_url":"https://api.github.com/users/josh-wambua/repos","events_url":"https://api.github.com/users/josh-wambua/events{/privacy}","received_events_url":"https://api.github.com/users/josh-wambua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/josh-wambua/kopete","description":"","fork":false,"url":"https://api.github.com/repos/josh-wambua/kopete","forks_url":"https://api.github.com/repos/josh-wambua/kopete/forks","keys_url":"https://api.github.com/repos/josh-wambua/kopete/keys{/key_id}","collaborators_url":"https://api.github.com/repos/josh-wambua/kopete/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/josh-wambua/kopete/teams","hooks_url":"https://api.github.com/repos/josh-wambua/kopete/hooks","issue_events_url":"https://api.github.com/repos/josh-wambua/kopete/issues/events{/number}","events_url":"https://api.github.com/repos/josh-wambua/kopete/events","assignees_url":"https://api.github.com/repos/josh-wambua/kopete/assignees{/user}","branches_url":"https://api.github.com/repos/josh-wambua/kopete/branches{/branch}","tags_url":"https://api.github.com/repos/josh-wambua/kopete/tags","blobs_url":"https://api.github.com/repos/josh-wambua/kopete/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/josh-wambua/kopete/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/josh-wambua/kopete/git/refs{/sha}","trees_url":"https://api.github.com/repos/josh-wambua/kopete/git/trees{/sha}","statuses_url":"https://api.github.com/repos/josh-wambua/kopete/statuses/{sha}","languages_url":"https://api.github.com/repos/josh-wambua/kopete/languages","stargazers_url":"https://api.github.com/repos/josh-wambua/kopete/stargazers","contributors_url":"https://api.github.com/repos/josh-wambua/kopete/contributors","subscribers_url":"https://api.github.com/repos/josh-wambua/kopete/subscribers","subscription_url":"https://api.github.com/repos/josh-wambua/kopete/subscription","commits_url":"https://api.github.com/repos/josh-wambua/kopete/commits{/sha}","git_commits_url":"https://api.github.com/repos/josh-wambua/kopete/git/commits{/sha}","comments_url":"https://api.github.com/repos/josh-wambua/kopete/comments{/number}","issue_comment_url":"https://api.github.com/repos/josh-wambua/kopete/issues/comments{/number}","contents_url":"https://api.github.com/repos/josh-wambua/kopete/contents/{+path}","compare_url":"https://api.github.com/repos/josh-wambua/kopete/compare/{base}...{head}","merges_url":"https://api.github.com/repos/josh-wambua/kopete/merges","archive_url":"https://api.github.com/repos/josh-wambua/kopete/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/josh-wambua/kopete/downloads","issues_url":"https://api.github.com/repos/josh-wambua/kopete/issues{/number}","pulls_url":"https://api.github.com/repos/josh-wambua/kopete/pulls{/number}","milestones_url":"https://api.github.com/repos/josh-wambua/kopete/milestones{/number}","notifications_url":"https://api.github.com/repos/josh-wambua/kopete/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/josh-wambua/kopete/labels{/name}","releases_url":"https://api.github.com/repos/josh-wambua/kopete/releases{/id}","created_at":"2015-06-01T17:15:16Z","updated_at":"2015-06-02T00:31:20Z","pushed_at":"2015-08-01T12:37:27Z","git_url":"git://github.com/josh-wambua/kopete.git","ssh_url":"git@github.com:josh-wambua/kopete.git","clone_url":"https://github.com/josh-wambua/kopete.git","svn_url":"https://github.com/josh-wambua/kopete","homepage":null,"size":37284,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"josh-wambua:master","ref":"master","sha":"fe4f0365b11dbc68282feed7a5b2d1e1b163f992","user":{"login":"josh-wambua","id":7008757,"avatar_url":"https://avatars.githubusercontent.com/u/7008757?v=3","gravatar_id":"","url":"https://api.github.com/users/josh-wambua","html_url":"https://github.com/josh-wambua","followers_url":"https://api.github.com/users/josh-wambua/followers","following_url":"https://api.github.com/users/josh-wambua/following{/other_user}","gists_url":"https://api.github.com/users/josh-wambua/gists{/gist_id}","starred_url":"https://api.github.com/users/josh-wambua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh-wambua/subscriptions","organizations_url":"https://api.github.com/users/josh-wambua/orgs","repos_url":"https://api.github.com/users/josh-wambua/repos","events_url":"https://api.github.com/users/josh-wambua/events{/privacy}","received_events_url":"https://api.github.com/users/josh-wambua/received_events","type":"User","site_admin":false},"repo":{"id":36676019,"name":"kopete","full_name":"josh-wambua/kopete","owner":{"login":"josh-wambua","id":7008757,"avatar_url":"https://avatars.githubusercontent.com/u/7008757?v=3","gravatar_id":"","url":"https://api.github.com/users/josh-wambua","html_url":"https://github.com/josh-wambua","followers_url":"https://api.github.com/users/josh-wambua/followers","following_url":"https://api.github.com/users/josh-wambua/following{/other_user}","gists_url":"https://api.github.com/users/josh-wambua/gists{/gist_id}","starred_url":"https://api.github.com/users/josh-wambua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh-wambua/subscriptions","organizations_url":"https://api.github.com/users/josh-wambua/orgs","repos_url":"https://api.github.com/users/josh-wambua/repos","events_url":"https://api.github.com/users/josh-wambua/events{/privacy}","received_events_url":"https://api.github.com/users/josh-wambua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/josh-wambua/kopete","description":"","fork":false,"url":"https://api.github.com/repos/josh-wambua/kopete","forks_url":"https://api.github.com/repos/josh-wambua/kopete/forks","keys_url":"https://api.github.com/repos/josh-wambua/kopete/keys{/key_id}","collaborators_url":"https://api.github.com/repos/josh-wambua/kopete/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/josh-wambua/kopete/teams","hooks_url":"https://api.github.com/repos/josh-wambua/kopete/hooks","issue_events_url":"https://api.github.com/repos/josh-wambua/kopete/issues/events{/number}","events_url":"https://api.github.com/repos/josh-wambua/kopete/events","assignees_url":"https://api.github.com/repos/josh-wambua/kopete/assignees{/user}","branches_url":"https://api.github.com/repos/josh-wambua/kopete/branches{/branch}","tags_url":"https://api.github.com/repos/josh-wambua/kopete/tags","blobs_url":"https://api.github.com/repos/josh-wambua/kopete/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/josh-wambua/kopete/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/josh-wambua/kopete/git/refs{/sha}","trees_url":"https://api.github.com/repos/josh-wambua/kopete/git/trees{/sha}","statuses_url":"https://api.github.com/repos/josh-wambua/kopete/statuses/{sha}","languages_url":"https://api.github.com/repos/josh-wambua/kopete/languages","stargazers_url":"https://api.github.com/repos/josh-wambua/kopete/stargazers","contributors_url":"https://api.github.com/repos/josh-wambua/kopete/contributors","subscribers_url":"https://api.github.com/repos/josh-wambua/kopete/subscribers","subscription_url":"https://api.github.com/repos/josh-wambua/kopete/subscription","commits_url":"https://api.github.com/repos/josh-wambua/kopete/commits{/sha}","git_commits_url":"https://api.github.com/repos/josh-wambua/kopete/git/commits{/sha}","comments_url":"https://api.github.com/repos/josh-wambua/kopete/comments{/number}","issue_comment_url":"https://api.github.com/repos/josh-wambua/kopete/issues/comments{/number}","contents_url":"https://api.github.com/repos/josh-wambua/kopete/contents/{+path}","compare_url":"https://api.github.com/repos/josh-wambua/kopete/compare/{base}...{head}","merges_url":"https://api.github.com/repos/josh-wambua/kopete/merges","archive_url":"https://api.github.com/repos/josh-wambua/kopete/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/josh-wambua/kopete/downloads","issues_url":"https://api.github.com/repos/josh-wambua/kopete/issues{/number}","pulls_url":"https://api.github.com/repos/josh-wambua/kopete/pulls{/number}","milestones_url":"https://api.github.com/repos/josh-wambua/kopete/milestones{/number}","notifications_url":"https://api.github.com/repos/josh-wambua/kopete/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/josh-wambua/kopete/labels{/name}","releases_url":"https://api.github.com/repos/josh-wambua/kopete/releases{/id}","created_at":"2015-06-01T17:15:16Z","updated_at":"2015-06-02T00:31:20Z","pushed_at":"2015-08-01T12:37:27Z","git_url":"git://github.com/josh-wambua/kopete.git","ssh_url":"git@github.com:josh-wambua/kopete.git","clone_url":"https://github.com/josh-wambua/kopete.git","svn_url":"https://github.com/josh-wambua/kopete","homepage":null,"size":37284,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/josh-wambua/kopete/pulls/4"},"html":{"href":"https://github.com/josh-wambua/kopete/pull/4"},"issue":{"href":"https://api.github.com/repos/josh-wambua/kopete/issues/4"},"comments":{"href":"https://api.github.com/repos/josh-wambua/kopete/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/josh-wambua/kopete/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/josh-wambua/kopete/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/josh-wambua/kopete/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/josh-wambua/kopete/statuses/0e9ec0375debaf15fd18c0c25b9943a249f5785e"}}}}