{"action":"created","comment":{"url":"https://api.github.com/repos/lsst/qserv/pulls/comments/32164820","id":32164820,"diff_hunk":"@@ -208,24 +203,41 @@ inline OS& generate(OS& os, char const label[], std::shared_ptr<T> t) {\n     }\n     return os;\n }\n+\n+template<class T>\n+void nil_string_helper(std::ostringstream& oss,\n+\t\t\t\t\t   const std::shared_ptr<T> &ptr) {\n+\tif (ptr != nullptr)\n+\t\toss << *ptr << \" \";\n+}\n+\n } // anonymous\n \n-void SelectStmt::_print() {\n+\n+std::string SelectStmt::toString() {\n+\n     //_selectList->getColumnRefList()->printRefs();\n-    LOGF_INFO(\"from %1%\" % _fromList);\n-    LOGF_INFO(\"select %1%\" % _selectList);\n-    if(_hasDistinct) { LOGF_INFO(\"distinct\"); }\n-    LOGF_INFO(\"where %1%\" % _whereClause);\n-    LOGF_INFO(\"groupby %1%\" % _groupBy);\n-    LOGF_INFO(\"having %1%\" % _having);\n-    LOGF_INFO(\"orderby %1%\" % _orderBy);\n+    std::ostringstream oss;\n+\n+    nil_string_helper(oss, _selectList);\n+    nil_string_helper(oss, _fromList);\n+    if(_hasDistinct) {\n+        oss << \"DISTINCT \";\n+    }\n+    nil_string_helper(oss, _whereClause);\n+    nil_string_helper(oss, _groupBy);\n+    nil_string_helper(oss, _having);\n+    nil_string_helper(oss, _orderBy);\n     if(_limit != -1) {\n-        LOGF_INFO(\" LIMIT %1%\" % _limit);\n+        oss << \" LIMIT \" << _limit;\n     }\n+    return oss.str();\n }\n \n-std::string SelectStmt::_generateDbg() {\n-    return getTemplate().dbgStr();\n+std::string SelectStmt::toQueryTemplateString() {\n+    //_selectList->getColumnRefList()->printRefs();\n+    //_selectList->dbgPrint(std::cout);\n+    return getQueryTemplate().toString();","path":"core/modules/query/SelectStmt.cc","position":74,"original_position":73,"commit_id":"7af4a7616dfc06f21d0e8a882d61d21df87b0d54","original_commit_id":"ee48c5484df16cc9dd207ed850a62a0f14cce227","user":{"login":"fjammes","id":290045,"avatar_url":"https://avatars.githubusercontent.com/u/290045?v=3","gravatar_id":"","url":"https://api.github.com/users/fjammes","html_url":"https://github.com/fjammes","followers_url":"https://api.github.com/users/fjammes/followers","following_url":"https://api.github.com/users/fjammes/following{/other_user}","gists_url":"https://api.github.com/users/fjammes/gists{/gist_id}","starred_url":"https://api.github.com/users/fjammes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjammes/subscriptions","organizations_url":"https://api.github.com/users/fjammes/orgs","repos_url":"https://api.github.com/users/fjammes/repos","events_url":"https://api.github.com/users/fjammes/events{/privacy}","received_events_url":"https://api.github.com/users/fjammes/received_events","type":"User","site_admin":false},"body":"ok removed","created_at":"2015-06-10T20:51:19Z","updated_at":"2015-06-10T20:51:19Z","html_url":"https://github.com/lsst/qserv/pull/92#discussion_r32164820","pull_request_url":"https://api.github.com/repos/lsst/qserv/pulls/92","_links":{"self":{"href":"https://api.github.com/repos/lsst/qserv/pulls/comments/32164820"},"html":{"href":"https://github.com/lsst/qserv/pull/92#discussion_r32164820"},"pull_request":{"href":"https://api.github.com/repos/lsst/qserv/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/lsst/qserv/pulls/92","id":37179098,"html_url":"https://github.com/lsst/qserv/pull/92","diff_url":"https://github.com/lsst/qserv/pull/92.diff","patch_url":"https://github.com/lsst/qserv/pull/92.patch","issue_url":"https://api.github.com/repos/lsst/qserv/issues/92","number":92,"state":"open","locked":false,"title":"U/fjammes/dm 2858","user":{"login":"jbecla","id":626419,"avatar_url":"https://avatars.githubusercontent.com/u/626419?v=3","gravatar_id":"","url":"https://api.github.com/users/jbecla","html_url":"https://github.com/jbecla","followers_url":"https://api.github.com/users/jbecla/followers","following_url":"https://api.github.com/users/jbecla/following{/other_user}","gists_url":"https://api.github.com/users/jbecla/gists{/gist_id}","starred_url":"https://api.github.com/users/jbecla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbecla/subscriptions","organizations_url":"https://api.github.com/users/jbecla/orgs","repos_url":"https://api.github.com/users/jbecla/repos","events_url":"https://api.github.com/users/jbecla/events{/privacy}","received_events_url":"https://api.github.com/users/jbecla/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-08T17:56:46Z","updated_at":"2015-06-10T20:51:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c2cbf443e88c4d538770f247e73ba02cb66c372","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lsst/qserv/pulls/92/commits","review_comments_url":"https://api.github.com/repos/lsst/qserv/pulls/92/comments","review_comment_url":"https://api.github.com/repos/lsst/qserv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lsst/qserv/issues/92/comments","statuses_url":"https://api.github.com/repos/lsst/qserv/statuses/7af4a7616dfc06f21d0e8a882d61d21df87b0d54","head":{"label":"lsst:u/fjammes/DM-2858","ref":"u/fjammes/DM-2858","sha":"7af4a7616dfc06f21d0e8a882d61d21df87b0d54","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":23013460,"name":"qserv","full_name":"lsst/qserv","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/qserv","description":"LSST Query Services","fork":false,"url":"https://api.github.com/repos/lsst/qserv","forks_url":"https://api.github.com/repos/lsst/qserv/forks","keys_url":"https://api.github.com/repos/lsst/qserv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/qserv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/qserv/teams","hooks_url":"https://api.github.com/repos/lsst/qserv/hooks","issue_events_url":"https://api.github.com/repos/lsst/qserv/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/qserv/events","assignees_url":"https://api.github.com/repos/lsst/qserv/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/qserv/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/qserv/tags","blobs_url":"https://api.github.com/repos/lsst/qserv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/qserv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/qserv/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/qserv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/qserv/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/qserv/languages","stargazers_url":"https://api.github.com/repos/lsst/qserv/stargazers","contributors_url":"https://api.github.com/repos/lsst/qserv/contributors","subscribers_url":"https://api.github.com/repos/lsst/qserv/subscribers","subscription_url":"https://api.github.com/repos/lsst/qserv/subscription","commits_url":"https://api.github.com/repos/lsst/qserv/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/qserv/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/qserv/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/qserv/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/qserv/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/qserv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/qserv/merges","archive_url":"https://api.github.com/repos/lsst/qserv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/qserv/downloads","issues_url":"https://api.github.com/repos/lsst/qserv/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/qserv/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/qserv/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/qserv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/qserv/labels{/name}","releases_url":"https://api.github.com/repos/lsst/qserv/releases{/id}","created_at":"2014-08-16T07:50:36Z","updated_at":"2015-05-08T02:01:15Z","pushed_at":"2015-06-10T19:56:01Z","git_url":"git://github.com/lsst/qserv.git","ssh_url":"git@github.com:lsst/qserv.git","clone_url":"https://github.com/lsst/qserv.git","svn_url":"https://github.com/lsst/qserv","homepage":"http://dm.lsst.org/","size":20033,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":13,"forks":5,"open_issues":13,"watchers":4,"default_branch":"master"}},"base":{"label":"lsst:master","ref":"master","sha":"750a5ae0782f1fa4320d2421c9521af9682577ed","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":23013460,"name":"qserv","full_name":"lsst/qserv","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/qserv","description":"LSST Query Services","fork":false,"url":"https://api.github.com/repos/lsst/qserv","forks_url":"https://api.github.com/repos/lsst/qserv/forks","keys_url":"https://api.github.com/repos/lsst/qserv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/qserv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/qserv/teams","hooks_url":"https://api.github.com/repos/lsst/qserv/hooks","issue_events_url":"https://api.github.com/repos/lsst/qserv/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/qserv/events","assignees_url":"https://api.github.com/repos/lsst/qserv/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/qserv/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/qserv/tags","blobs_url":"https://api.github.com/repos/lsst/qserv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/qserv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/qserv/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/qserv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/qserv/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/qserv/languages","stargazers_url":"https://api.github.com/repos/lsst/qserv/stargazers","contributors_url":"https://api.github.com/repos/lsst/qserv/contributors","subscribers_url":"https://api.github.com/repos/lsst/qserv/subscribers","subscription_url":"https://api.github.com/repos/lsst/qserv/subscription","commits_url":"https://api.github.com/repos/lsst/qserv/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/qserv/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/qserv/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/qserv/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/qserv/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/qserv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/qserv/merges","archive_url":"https://api.github.com/repos/lsst/qserv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/qserv/downloads","issues_url":"https://api.github.com/repos/lsst/qserv/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/qserv/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/qserv/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/qserv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/qserv/labels{/name}","releases_url":"https://api.github.com/repos/lsst/qserv/releases{/id}","created_at":"2014-08-16T07:50:36Z","updated_at":"2015-05-08T02:01:15Z","pushed_at":"2015-06-10T19:56:01Z","git_url":"git://github.com/lsst/qserv.git","ssh_url":"git@github.com:lsst/qserv.git","clone_url":"https://github.com/lsst/qserv.git","svn_url":"https://github.com/lsst/qserv","homepage":"http://dm.lsst.org/","size":20033,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":13,"forks":5,"open_issues":13,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lsst/qserv/pulls/92"},"html":{"href":"https://github.com/lsst/qserv/pull/92"},"issue":{"href":"https://api.github.com/repos/lsst/qserv/issues/92"},"comments":{"href":"https://api.github.com/repos/lsst/qserv/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/lsst/qserv/pulls/92/comments"},"review_comment":{"href":"https://api.github.com/repos/lsst/qserv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lsst/qserv/pulls/92/commits"},"statuses":{"href":"https://api.github.com/repos/lsst/qserv/statuses/7af4a7616dfc06f21d0e8a882d61d21df87b0d54"}}}}