{"action":"created","comment":{"url":"https://api.github.com/repos/SOCI/soci/pulls/comments/34247893","id":34247893,"diff_hunk":"@@ -55,7 +55,20 @@ inline namespace boost {\n #endif\n #endif // HAVE_BOOST\n \n-\n+// Firebird returns string that represents entire byte-size(not character size) of the column( i.e. CHAR(10) NONE - 10bytes, CHAR(10) UTF8 - 40bytes )\n+// MySql returns right trimmed value by default or space padded up to column character size when PAD_CHAR_TO_FULL_LENGTH\n+// PostgreSQL returns space padded version up to actual column character size (not byte size )\n+// SQLite has TEXT affinity for all char types so it is not an issue here - macro bellow will match correctly\n+// TODO: comments for other backends(DB, ODBC)\n+//This macro will check result string from column defined as fixed char\n+//It will check only bytes up to original string size.\n+//If result string is bigger than original string then all remaining chars must be spaces so if any non-space char is found it will fail .\n+#define CHECK_CHAR( STR, ORIG_STR ) \\","path":"tests/common-tests.h","position":13,"original_position":13,"commit_id":"91430ad0c76a8cc3e4d29114d76650809b866984","original_commit_id":"91430ad0c76a8cc3e4d29114d76650809b866984","user":{"login":"vadz","id":146917,"avatar_url":"https://avatars.githubusercontent.com/u/146917?v=3","gravatar_id":"","url":"https://api.github.com/users/vadz","html_url":"https://github.com/vadz","followers_url":"https://api.github.com/users/vadz/followers","following_url":"https://api.github.com/users/vadz/following{/other_user}","gists_url":"https://api.github.com/users/vadz/gists{/gist_id}","starred_url":"https://api.github.com/users/vadz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadz/subscriptions","organizations_url":"https://api.github.com/users/vadz/orgs","repos_url":"https://api.github.com/users/vadz/repos","events_url":"https://api.github.com/users/vadz/events{/privacy}","received_events_url":"https://api.github.com/users/vadz/received_events","type":"User","site_admin":false},"body":"The macro name is too generic, I'd call it `CHECK_EQUAL_PADDED()` or something like this.\r\n\r\nAlso, from stylistic point of view, it's weird to use ALL CAPS for the macro arguments, they usually use the same convention as normal variables (i.e. I'd call them `padded_str` and `expected_str` perhaps).","created_at":"2015-07-09T12:05:37Z","updated_at":"2015-07-09T12:05:37Z","html_url":"https://github.com/SOCI/soci/pull/356#discussion_r34247893","pull_request_url":"https://api.github.com/repos/SOCI/soci/pulls/356","_links":{"self":{"href":"https://api.github.com/repos/SOCI/soci/pulls/comments/34247893"},"html":{"href":"https://github.com/SOCI/soci/pull/356#discussion_r34247893"},"pull_request":{"href":"https://api.github.com/repos/SOCI/soci/pulls/356"}}},"pull_request":{"url":"https://api.github.com/repos/SOCI/soci/pulls/356","id":39072616,"html_url":"https://github.com/SOCI/soci/pull/356","diff_url":"https://github.com/SOCI/soci/pull/356.diff","patch_url":"https://github.com/SOCI/soci/pull/356.patch","issue_url":"https://api.github.com/repos/SOCI/soci/issues/356","number":356,"state":"open","locked":false,"title":"Firebird backend CHAR trailing spaces fix","user":{"login":"ravselj","id":6742843,"avatar_url":"https://avatars.githubusercontent.com/u/6742843?v=3","gravatar_id":"","url":"https://api.github.com/users/ravselj","html_url":"https://github.com/ravselj","followers_url":"https://api.github.com/users/ravselj/followers","following_url":"https://api.github.com/users/ravselj/following{/other_user}","gists_url":"https://api.github.com/users/ravselj/gists{/gist_id}","starred_url":"https://api.github.com/users/ravselj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravselj/subscriptions","organizations_url":"https://api.github.com/users/ravselj/orgs","repos_url":"https://api.github.com/users/ravselj/repos","events_url":"https://api.github.com/users/ravselj/events{/privacy}","received_events_url":"https://api.github.com/users/ravselj/received_events","type":"User","site_admin":false},"body":"I have found problem in FIREBIRD back-end. The problem is with char type and trailing spaces.\r\n\r\nCurrent padding tests were inappropriate because actual database column size is determined also by column encoding type.\r\n\r\nExample:\r\nCHAR(10) CHARACTER SET NONE - (10 bytes) (Hello is represented as 'Hello.....' (dot as space)\r\nCHAR(10) CHARACTER SET UTF8 - (40 bytes) (Hello is represented as 'Hello...................................'\r\n\r\nBy design there is no difference if we store 'Hello' or 'Hello.....' in column of type CHAR(10) CHARACTER SET NONE. Trailing spaces will be trimmed and information is lost by design. User must use VARCHAR in this case.\r\n\r\nThere is not need for SOCI to return string with trailing spaces so this PR trims them before they are returned to user.","created_at":"2015-07-02T11:25:17Z","updated_at":"2015-07-09T12:05:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9060ad8055ca70a541618bb109b69b719dad0b6e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SOCI/soci/pulls/356/commits","review_comments_url":"https://api.github.com/repos/SOCI/soci/pulls/356/comments","review_comment_url":"https://api.github.com/repos/SOCI/soci/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SOCI/soci/issues/356/comments","statuses_url":"https://api.github.com/repos/SOCI/soci/statuses/91430ad0c76a8cc3e4d29114d76650809b866984","head":{"label":"ravselj:firebird_fixed_char","ref":"firebird_fixed_char","sha":"91430ad0c76a8cc3e4d29114d76650809b866984","user":{"login":"ravselj","id":6742843,"avatar_url":"https://avatars.githubusercontent.com/u/6742843?v=3","gravatar_id":"","url":"https://api.github.com/users/ravselj","html_url":"https://github.com/ravselj","followers_url":"https://api.github.com/users/ravselj/followers","following_url":"https://api.github.com/users/ravselj/following{/other_user}","gists_url":"https://api.github.com/users/ravselj/gists{/gist_id}","starred_url":"https://api.github.com/users/ravselj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravselj/subscriptions","organizations_url":"https://api.github.com/users/ravselj/orgs","repos_url":"https://api.github.com/users/ravselj/repos","events_url":"https://api.github.com/users/ravselj/events{/privacy}","received_events_url":"https://api.github.com/users/ravselj/received_events","type":"User","site_admin":false},"repo":{"id":37979076,"name":"soci","full_name":"ravselj/soci","owner":{"login":"ravselj","id":6742843,"avatar_url":"https://avatars.githubusercontent.com/u/6742843?v=3","gravatar_id":"","url":"https://api.github.com/users/ravselj","html_url":"https://github.com/ravselj","followers_url":"https://api.github.com/users/ravselj/followers","following_url":"https://api.github.com/users/ravselj/following{/other_user}","gists_url":"https://api.github.com/users/ravselj/gists{/gist_id}","starred_url":"https://api.github.com/users/ravselj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravselj/subscriptions","organizations_url":"https://api.github.com/users/ravselj/orgs","repos_url":"https://api.github.com/users/ravselj/repos","events_url":"https://api.github.com/users/ravselj/events{/privacy}","received_events_url":"https://api.github.com/users/ravselj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ravselj/soci","description":"SOCI - The C++ Database Access Library. This is official repository the SOCI project.","fork":true,"url":"https://api.github.com/repos/ravselj/soci","forks_url":"https://api.github.com/repos/ravselj/soci/forks","keys_url":"https://api.github.com/repos/ravselj/soci/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ravselj/soci/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ravselj/soci/teams","hooks_url":"https://api.github.com/repos/ravselj/soci/hooks","issue_events_url":"https://api.github.com/repos/ravselj/soci/issues/events{/number}","events_url":"https://api.github.com/repos/ravselj/soci/events","assignees_url":"https://api.github.com/repos/ravselj/soci/assignees{/user}","branches_url":"https://api.github.com/repos/ravselj/soci/branches{/branch}","tags_url":"https://api.github.com/repos/ravselj/soci/tags","blobs_url":"https://api.github.com/repos/ravselj/soci/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ravselj/soci/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ravselj/soci/git/refs{/sha}","trees_url":"https://api.github.com/repos/ravselj/soci/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ravselj/soci/statuses/{sha}","languages_url":"https://api.github.com/repos/ravselj/soci/languages","stargazers_url":"https://api.github.com/repos/ravselj/soci/stargazers","contributors_url":"https://api.github.com/repos/ravselj/soci/contributors","subscribers_url":"https://api.github.com/repos/ravselj/soci/subscribers","subscription_url":"https://api.github.com/repos/ravselj/soci/subscription","commits_url":"https://api.github.com/repos/ravselj/soci/commits{/sha}","git_commits_url":"https://api.github.com/repos/ravselj/soci/git/commits{/sha}","comments_url":"https://api.github.com/repos/ravselj/soci/comments{/number}","issue_comment_url":"https://api.github.com/repos/ravselj/soci/issues/comments{/number}","contents_url":"https://api.github.com/repos/ravselj/soci/contents/{+path}","compare_url":"https://api.github.com/repos/ravselj/soci/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ravselj/soci/merges","archive_url":"https://api.github.com/repos/ravselj/soci/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ravselj/soci/downloads","issues_url":"https://api.github.com/repos/ravselj/soci/issues{/number}","pulls_url":"https://api.github.com/repos/ravselj/soci/pulls{/number}","milestones_url":"https://api.github.com/repos/ravselj/soci/milestones{/number}","notifications_url":"https://api.github.com/repos/ravselj/soci/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ravselj/soci/labels{/name}","releases_url":"https://api.github.com/repos/ravselj/soci/releases{/id}","created_at":"2015-06-24T10:50:16Z","updated_at":"2015-06-24T10:50:17Z","pushed_at":"2015-07-09T09:36:19Z","git_url":"git://github.com/ravselj/soci.git","ssh_url":"git@github.com:ravselj/soci.git","clone_url":"https://github.com/ravselj/soci.git","svn_url":"https://github.com/ravselj/soci","homepage":"http://soci.sourceforge.net/","size":5522,"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":"SOCI:master","ref":"master","sha":"c4255c9e3ba540c11a815f93ec536e83c09839de","user":{"login":"SOCI","id":1135620,"avatar_url":"https://avatars.githubusercontent.com/u/1135620?v=3","gravatar_id":"","url":"https://api.github.com/users/SOCI","html_url":"https://github.com/SOCI","followers_url":"https://api.github.com/users/SOCI/followers","following_url":"https://api.github.com/users/SOCI/following{/other_user}","gists_url":"https://api.github.com/users/SOCI/gists{/gist_id}","starred_url":"https://api.github.com/users/SOCI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SOCI/subscriptions","organizations_url":"https://api.github.com/users/SOCI/orgs","repos_url":"https://api.github.com/users/SOCI/repos","events_url":"https://api.github.com/users/SOCI/events{/privacy}","received_events_url":"https://api.github.com/users/SOCI/received_events","type":"Organization","site_admin":false},"repo":{"id":2738731,"name":"soci","full_name":"SOCI/soci","owner":{"login":"SOCI","id":1135620,"avatar_url":"https://avatars.githubusercontent.com/u/1135620?v=3","gravatar_id":"","url":"https://api.github.com/users/SOCI","html_url":"https://github.com/SOCI","followers_url":"https://api.github.com/users/SOCI/followers","following_url":"https://api.github.com/users/SOCI/following{/other_user}","gists_url":"https://api.github.com/users/SOCI/gists{/gist_id}","starred_url":"https://api.github.com/users/SOCI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SOCI/subscriptions","organizations_url":"https://api.github.com/users/SOCI/orgs","repos_url":"https://api.github.com/users/SOCI/repos","events_url":"https://api.github.com/users/SOCI/events{/privacy}","received_events_url":"https://api.github.com/users/SOCI/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SOCI/soci","description":"SOCI - The C++ Database Access Library. This is official repository the SOCI project.","fork":false,"url":"https://api.github.com/repos/SOCI/soci","forks_url":"https://api.github.com/repos/SOCI/soci/forks","keys_url":"https://api.github.com/repos/SOCI/soci/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SOCI/soci/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SOCI/soci/teams","hooks_url":"https://api.github.com/repos/SOCI/soci/hooks","issue_events_url":"https://api.github.com/repos/SOCI/soci/issues/events{/number}","events_url":"https://api.github.com/repos/SOCI/soci/events","assignees_url":"https://api.github.com/repos/SOCI/soci/assignees{/user}","branches_url":"https://api.github.com/repos/SOCI/soci/branches{/branch}","tags_url":"https://api.github.com/repos/SOCI/soci/tags","blobs_url":"https://api.github.com/repos/SOCI/soci/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SOCI/soci/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SOCI/soci/git/refs{/sha}","trees_url":"https://api.github.com/repos/SOCI/soci/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SOCI/soci/statuses/{sha}","languages_url":"https://api.github.com/repos/SOCI/soci/languages","stargazers_url":"https://api.github.com/repos/SOCI/soci/stargazers","contributors_url":"https://api.github.com/repos/SOCI/soci/contributors","subscribers_url":"https://api.github.com/repos/SOCI/soci/subscribers","subscription_url":"https://api.github.com/repos/SOCI/soci/subscription","commits_url":"https://api.github.com/repos/SOCI/soci/commits{/sha}","git_commits_url":"https://api.github.com/repos/SOCI/soci/git/commits{/sha}","comments_url":"https://api.github.com/repos/SOCI/soci/comments{/number}","issue_comment_url":"https://api.github.com/repos/SOCI/soci/issues/comments{/number}","contents_url":"https://api.github.com/repos/SOCI/soci/contents/{+path}","compare_url":"https://api.github.com/repos/SOCI/soci/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SOCI/soci/merges","archive_url":"https://api.github.com/repos/SOCI/soci/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SOCI/soci/downloads","issues_url":"https://api.github.com/repos/SOCI/soci/issues{/number}","pulls_url":"https://api.github.com/repos/SOCI/soci/pulls{/number}","milestones_url":"https://api.github.com/repos/SOCI/soci/milestones{/number}","notifications_url":"https://api.github.com/repos/SOCI/soci/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SOCI/soci/labels{/name}","releases_url":"https://api.github.com/repos/SOCI/soci/releases{/id}","created_at":"2011-11-09T01:49:49Z","updated_at":"2015-07-03T02:28:00Z","pushed_at":"2015-07-09T09:36:19Z","git_url":"git://github.com/SOCI/soci.git","ssh_url":"git@github.com:SOCI/soci.git","clone_url":"https://github.com/SOCI/soci.git","svn_url":"https://github.com/SOCI/soci","homepage":"http://soci.sourceforge.net/","size":62471,"stargazers_count":270,"watchers_count":270,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":113,"mirror_url":null,"open_issues_count":87,"forks":113,"open_issues":87,"watchers":270,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SOCI/soci/pulls/356"},"html":{"href":"https://github.com/SOCI/soci/pull/356"},"issue":{"href":"https://api.github.com/repos/SOCI/soci/issues/356"},"comments":{"href":"https://api.github.com/repos/SOCI/soci/issues/356/comments"},"review_comments":{"href":"https://api.github.com/repos/SOCI/soci/pulls/356/comments"},"review_comment":{"href":"https://api.github.com/repos/SOCI/soci/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SOCI/soci/pulls/356/commits"},"statuses":{"href":"https://api.github.com/repos/SOCI/soci/statuses/91430ad0c76a8cc3e4d29114d76650809b866984"}}}}