{"action":"created","comment":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/24893393","id":24893393,"diff_hunk":"@@ -0,0 +1,134 @@\n+/*##############################################################################\n+\n+    HPCC SYSTEMS software Copyright (C) 2015 HPCC Systems.\n+\n+    Licensed under the Apache License, Version 2.0 (the \"License\");\n+    you may not use this file except in compliance with the License.\n+    You may obtain a copy of the License at\n+\n+       http://www.apache.org/licenses/LICENSE-2.0\n+\n+    Unless required by applicable law or agreed to in writing, software\n+    distributed under the License is distributed on an \"AS IS\" BASIS,\n+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+    See the License for the specific language governing permissions and\n+    limitations under the License.\n+############################################################################## */\n+\n+#ifndef ECL_REDIS_INCL\n+#define ECL_REDIS_INCL\n+\n+#ifdef _WIN32\n+#define ECL_REDIS_CALL _cdecl\n+#ifdef ECL_REDIS_EXPORTS\n+#define ECL_REDIS_API __declspec(dllexport)\n+#else\n+#define ECL_REDIS_API __declspec(dllimport)\n+#endif\n+#else\n+#define ECL_REDIS_CALL\n+#define ECL_REDIS_API\n+#endif\n+\n+#include \"jhash.hpp\"\n+#include \"hqlplugins.hpp\"\n+#include \"eclhelper.hpp\"\n+#include \"jexcept.hpp\"\n+#include \"hiredis/hiredis.h\"\n+\n+extern \"C\"\n+{\n+    ECL_REDIS_API bool getECLPluginDefinition(ECLPluginDefinitionBlock *pb);\n+    ECL_REDIS_API void setPluginContext(IPluginContext * _ctx);\n+}\n+\n+class StringBuffer;\n+\n+namespace RedisPlugin {\n+static const unsigned unitExpire = 86400;//1 day (secs)\n+\n+#define setFailMsg \"'Set' request failed - \"\n+#define getFailMsg \"'Get<type>' request failed - \"\n+\n+StringBuffer & appendExpire(StringBuffer & buffer, unsigned expire);\n+\n+class RedisServer : public CInterface\n+{\n+public :\n+    RedisServer() : port(0) { }\n+    RedisServer(ICodeContext * ctx, const char * _options)\n+    {\n+        serverPswdHash = hashc((const unsigned char*)_options, strlen(_options), 0);\n+        options.set(_options);\n+        parseOptions(ctx, _options);\n+    }\n+    RedisServer(ICodeContext * ctx, const char * _options, const char * pswd)\n+    {\n+        serverPswdHash = hashc((const unsigned char*)_options, strlen(_options), serverPswdHash);","path":"plugins/redis/redisplugin.hpp","position":67,"original_position":67,"commit_id":"8f6c7aae1d25e0d418b5a21d0171038d7a9cd344","original_commit_id":"8f6c7aae1d25e0d418b5a21d0171038d7a9cd344","user":{"login":"richardkchapman","id":900820,"avatar_url":"https://avatars.githubusercontent.com/u/900820?v=3","gravatar_id":"","url":"https://api.github.com/users/richardkchapman","html_url":"https://github.com/richardkchapman","followers_url":"https://api.github.com/users/richardkchapman/followers","following_url":"https://api.github.com/users/richardkchapman/following{/other_user}","gists_url":"https://api.github.com/users/richardkchapman/gists{/gist_id}","starred_url":"https://api.github.com/users/richardkchapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardkchapman/subscriptions","organizations_url":"https://api.github.com/users/richardkchapman/orgs","repos_url":"https://api.github.com/users/richardkchapman/repos","events_url":"https://api.github.com/users/richardkchapman/events{/privacy}","received_events_url":"https://api.github.com/users/richardkchapman/received_events","type":"User","site_admin":false},"body":"I prefer \r\n\r\nvariable = f(a, 0);\r\nvariable = f(b, variable);\r\n\r\nversus nesting - easier to read.","created_at":"2015-02-18T10:59:02Z","updated_at":"2015-02-18T10:59:02Z","html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6977#discussion_r24893393","pull_request_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6977","_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/24893393"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/6977#discussion_r24893393"},"pull_request":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6977"}}},"pull_request":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6977","id":29265519,"html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6977","diff_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6977.diff","patch_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6977.patch","issue_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6977","number":6977,"state":"open","locked":false,"title":"HPCC-13047 Redis plugin sync module","user":{"login":"jamienoss","id":5013975,"avatar_url":"https://avatars.githubusercontent.com/u/5013975?v=3","gravatar_id":"","url":"https://api.github.com/users/jamienoss","html_url":"https://github.com/jamienoss","followers_url":"https://api.github.com/users/jamienoss/followers","following_url":"https://api.github.com/users/jamienoss/following{/other_user}","gists_url":"https://api.github.com/users/jamienoss/gists{/gist_id}","starred_url":"https://api.github.com/users/jamienoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamienoss/subscriptions","organizations_url":"https://api.github.com/users/jamienoss/orgs","repos_url":"https://api.github.com/users/jamienoss/repos","events_url":"https://api.github.com/users/jamienoss/events{/privacy}","received_events_url":"https://api.github.com/users/jamienoss/received_events","type":"User","site_admin":false},"body":"Signed-off-by: james <james.noss@lexisnexis.com>","created_at":"2015-02-13T13:50:11Z","updated_at":"2015-02-18T10:59:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0b0447d384fbfd6a51a0b2daaf382575db255b0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6977/commits","review_comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6977/comments","review_comment_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/{number}","comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6977/comments","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/8f6c7aae1d25e0d418b5a21d0171038d7a9cd344","head":{"label":"jamienoss:issue13047-support-redis-5.2-sync","ref":"issue13047-support-redis-5.2-sync","sha":"8f6c7aae1d25e0d418b5a21d0171038d7a9cd344","user":{"login":"jamienoss","id":5013975,"avatar_url":"https://avatars.githubusercontent.com/u/5013975?v=3","gravatar_id":"","url":"https://api.github.com/users/jamienoss","html_url":"https://github.com/jamienoss","followers_url":"https://api.github.com/users/jamienoss/followers","following_url":"https://api.github.com/users/jamienoss/following{/other_user}","gists_url":"https://api.github.com/users/jamienoss/gists{/gist_id}","starred_url":"https://api.github.com/users/jamienoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamienoss/subscriptions","organizations_url":"https://api.github.com/users/jamienoss/orgs","repos_url":"https://api.github.com/users/jamienoss/repos","events_url":"https://api.github.com/users/jamienoss/events{/privacy}","received_events_url":"https://api.github.com/users/jamienoss/received_events","type":"User","site_admin":false},"repo":{"id":12548948,"name":"HPCC-Platform","full_name":"jamienoss/HPCC-Platform","owner":{"login":"jamienoss","id":5013975,"avatar_url":"https://avatars.githubusercontent.com/u/5013975?v=3","gravatar_id":"","url":"https://api.github.com/users/jamienoss","html_url":"https://github.com/jamienoss","followers_url":"https://api.github.com/users/jamienoss/followers","following_url":"https://api.github.com/users/jamienoss/following{/other_user}","gists_url":"https://api.github.com/users/jamienoss/gists{/gist_id}","starred_url":"https://api.github.com/users/jamienoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamienoss/subscriptions","organizations_url":"https://api.github.com/users/jamienoss/orgs","repos_url":"https://api.github.com/users/jamienoss/repos","events_url":"https://api.github.com/users/jamienoss/events{/privacy}","received_events_url":"https://api.github.com/users/jamienoss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamienoss/HPCC-Platform","description":"IMPORTANT - Issue tracking has been migrated to JIRA - use your github ID and password reset mechanism to log in","fork":true,"url":"https://api.github.com/repos/jamienoss/HPCC-Platform","forks_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/issues/comments/{number}","contents_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/jamienoss/HPCC-Platform/releases{/id}","created_at":"2013-09-02T20:57:07Z","updated_at":"2014-12-20T18:48:40Z","pushed_at":"2015-02-13T13:44:11Z","git_url":"git://github.com/jamienoss/HPCC-Platform.git","ssh_url":"git@github.com:jamienoss/HPCC-Platform.git","clone_url":"https://github.com/jamienoss/HPCC-Platform.git","svn_url":"https://github.com/jamienoss/HPCC-Platform","homepage":"track.hpccsystems.com","size":135692,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"hpcc-systems:candidate-5.2.0","ref":"candidate-5.2.0","sha":"86ee70eba9e800c5e7faa351738e30cde2231480","user":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"repo":{"id":2030681,"name":"HPCC-Platform","full_name":"hpcc-systems/HPCC-Platform","owner":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcc-systems/HPCC-Platform","description":"IMPORTANT - Issue tracking has been migrated to JIRA - use your github ID and password reset mechanism to log in","fork":false,"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform","forks_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/comments/{number}","contents_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/releases{/id}","created_at":"2011-07-11T14:29:51Z","updated_at":"2015-02-17T14:14:46Z","pushed_at":"2015-02-18T09:02:58Z","git_url":"git://github.com/hpcc-systems/HPCC-Platform.git","ssh_url":"git@github.com:hpcc-systems/HPCC-Platform.git","clone_url":"https://github.com/hpcc-systems/HPCC-Platform.git","svn_url":"https://github.com/hpcc-systems/HPCC-Platform","homepage":"track.hpccsystems.com","size":268108,"stargazers_count":242,"watchers_count":242,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":419,"forks":96,"open_issues":419,"watchers":242,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6977"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/6977"},"issue":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6977"},"comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6977/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6977/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6977/commits"},"statuses":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/8f6c7aae1d25e0d418b5a21d0171038d7a9cd344"}}}}