{"action":"created","comment":{"url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/comments/183217174","pull_request_review_id":114181253,"id":183217174,"diff_hunk":"@@ -1003,6 +1009,90 @@ function testComplexTypeRetrieval() returns (string, string, string, string) {\n     return (s1, s2, s3, s4);\n }\n \n+function testSelectLoadToMemory() returns (Employee[], Employee[], Employee[]) {\n+    endpoint jdbc:Client testDB {\n+        url:\"jdbc:hsqldb:file:./target/tempdb/TEST_SQL_CONNECTOR\",\n+        username:\"SA\",\n+        poolOptions:{maximumPoolSize:1}\n+    };\n+\n+    table dt = check testDB->select(\"SELECT * from employeeItr\", Employee, loadToMemory = true);\n+\n+    Employee[] employeeArray1;\n+    Employee[] employeeArray2;\n+    Employee[] employeeArray3;\n+    int i = 0;\n+    while (dt.hasNext()) {\n+        var rs = check <Employee>dt.getNext();\n+        Employee e = {id:rs.id, name:rs.name, address:rs.address};\n+        employeeArray1[i] = e;\n+        i++;\n+    }\n+\n+    i = 0;\n+    while (dt.hasNext()) {\n+        var rs = check <Employee>dt.getNext();\n+        Employee e = {id:rs.id, name:rs.name, address:rs.address};\n+        employeeArray2[i] = e;\n+        i++;\n+    }\n+\n+    i = 0;\n+    while (dt.hasNext()) {\n+        var rs = check <Employee>dt.getNext();\n+        Employee e = {id:rs.id, name:rs.name, address:rs.address};\n+        employeeArray3[i] = e;\n+        i++;\n+    }\n+\n+    testDB.stop();\n+    return (employeeArray1, employeeArray2, employeeArray3);\n+}\n+\n+function testLoadToMemorySelectAfterTableClose() returns (Employee[], Employee[], error) {\n+    endpoint jdbc:Client testDB {\n+        url:\"jdbc:hsqldb:file:./target/tempdb/TEST_SQL_CONNECTOR\",\n+        username:\"SA\",\n+        poolOptions:{maximumPoolSize:1}\n+    };\n+\n+    table dt = check testDB->select(\"SELECT * from employeeItr\", Employee, loadToMemory = true);\n+\n+    Employee[] employeeArray1;\n+    Employee[] employeeArray2;\n+    Employee[] employeeArray3;\n+    int i = 0;\n+    while (dt.hasNext()) {\n+        var rs = check <Employee>dt.getNext();\n+        Employee e = {id:rs.id, name:rs.name, address:rs.address};\n+        employeeArray1[i] = e;\n+        i++;\n+    }\n+    i = 0;\n+    while (dt.hasNext()) {\n+        var rs = check <Employee>dt.getNext();\n+        Employee e = {id:rs.id, name:rs.name, address:rs.address};\n+        employeeArray2[i] = e;\n+        i++;\n+    }\n+    dt.close();\n+    i = 0;\n+    error e;\n+    try {\n+        while (dt.hasNext()) {\n+            var rs = check <Employee>dt.getNext();\n+            Employee e = {id:rs.id, name:rs.name, address:rs.address};\n+            employeeArray3[i] = e;\n+            i++;\n+        }\n+    }\n+    catch (error err) {\n+        e = err;\n+    }","path":"tests/ballerina-test/src/test/resources/test-src/connectors/sql/sql_actions_test.bal","position":96,"original_position":96,"commit_id":"acd6dd358b6f3c2b846a64a40d5a34a9e1c3b8e8","original_commit_id":"acd6dd358b6f3c2b846a64a40d5a34a9e1c3b8e8","user":{"login":"anupama-pathirage","id":16300038,"avatar_url":"https://avatars0.githubusercontent.com/u/16300038?v=4","gravatar_id":"","url":"https://api.github.com/users/anupama-pathirage","html_url":"https://github.com/anupama-pathirage","followers_url":"https://api.github.com/users/anupama-pathirage/followers","following_url":"https://api.github.com/users/anupama-pathirage/following{/other_user}","gists_url":"https://api.github.com/users/anupama-pathirage/gists{/gist_id}","starred_url":"https://api.github.com/users/anupama-pathirage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anupama-pathirage/subscriptions","organizations_url":"https://api.github.com/users/anupama-pathirage/orgs","repos_url":"https://api.github.com/users/anupama-pathirage/repos","events_url":"https://api.github.com/users/anupama-pathirage/events{/privacy}","received_events_url":"https://api.github.com/users/anupama-pathirage/received_events","type":"User","site_admin":false},"body":"Formatting issue","created_at":"2018-04-21T19:28:20Z","updated_at":"2018-04-21T19:28:20Z","html_url":"https://github.com/ballerina-platform/ballerina-lang/pull/7591#discussion_r183217174","pull_request_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/7591","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/comments/183217174"},"html":{"href":"https://github.com/ballerina-platform/ballerina-lang/pull/7591#discussion_r183217174"},"pull_request":{"href":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/7591"}}},"pull_request":{"url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/7591","id":182966856,"html_url":"https://github.com/ballerina-platform/ballerina-lang/pull/7591","diff_url":"https://github.com/ballerina-platform/ballerina-lang/pull/7591.diff","patch_url":"https://github.com/ballerina-platform/ballerina-lang/pull/7591.patch","issue_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues/7591","number":7591,"state":"open","locked":false,"title":"Support re-iteration in sql connector select, introduce reset method to DataIterator","user":{"login":"Manuri","id":1335271,"avatar_url":"https://avatars0.githubusercontent.com/u/1335271?v=4","gravatar_id":"","url":"https://api.github.com/users/Manuri","html_url":"https://github.com/Manuri","followers_url":"https://api.github.com/users/Manuri/followers","following_url":"https://api.github.com/users/Manuri/following{/other_user}","gists_url":"https://api.github.com/users/Manuri/gists{/gist_id}","starred_url":"https://api.github.com/users/Manuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manuri/subscriptions","organizations_url":"https://api.github.com/users/Manuri/orgs","repos_url":"https://api.github.com/users/Manuri/repos","events_url":"https://api.github.com/users/Manuri/events{/privacy}","received_events_url":"https://api.github.com/users/Manuri/received_events","type":"User","site_admin":false},"body":"## Purpose\r\nSupport re-iteration in sql connector select, \r\nIntroduce reset method to DataIterator\r\n","created_at":"2018-04-20T05:59:05Z","updated_at":"2018-04-21T19:28:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"116760aa959ae144b0998f7b0fe3a77c41ad1618","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/7591/commits","review_comments_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/7591/comments","review_comment_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues/7591/comments","statuses_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/statuses/acd6dd358b6f3c2b846a64a40d5a34a9e1c3b8e8","head":{"label":"Manuri:support-re-iteration-sql-connector-backup","ref":"support-re-iteration-sql-connector-backup","sha":"acd6dd358b6f3c2b846a64a40d5a34a9e1c3b8e8","user":{"login":"Manuri","id":1335271,"avatar_url":"https://avatars0.githubusercontent.com/u/1335271?v=4","gravatar_id":"","url":"https://api.github.com/users/Manuri","html_url":"https://github.com/Manuri","followers_url":"https://api.github.com/users/Manuri/followers","following_url":"https://api.github.com/users/Manuri/following{/other_user}","gists_url":"https://api.github.com/users/Manuri/gists{/gist_id}","starred_url":"https://api.github.com/users/Manuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manuri/subscriptions","organizations_url":"https://api.github.com/users/Manuri/orgs","repos_url":"https://api.github.com/users/Manuri/repos","events_url":"https://api.github.com/users/Manuri/events{/privacy}","received_events_url":"https://api.github.com/users/Manuri/received_events","type":"User","site_admin":false},"repo":{"id":83290408,"name":"ballerina","full_name":"Manuri/ballerina","owner":{"login":"Manuri","id":1335271,"avatar_url":"https://avatars0.githubusercontent.com/u/1335271?v=4","gravatar_id":"","url":"https://api.github.com/users/Manuri","html_url":"https://github.com/Manuri","followers_url":"https://api.github.com/users/Manuri/followers","following_url":"https://api.github.com/users/Manuri/following{/other_user}","gists_url":"https://api.github.com/users/Manuri/gists{/gist_id}","starred_url":"https://api.github.com/users/Manuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manuri/subscriptions","organizations_url":"https://api.github.com/users/Manuri/orgs","repos_url":"https://api.github.com/users/Manuri/repos","events_url":"https://api.github.com/users/Manuri/events{/privacy}","received_events_url":"https://api.github.com/users/Manuri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Manuri/ballerina","description":"Ballerina is a new programming language for integration built on a sequence diagram metaphor.","fork":true,"url":"https://api.github.com/repos/Manuri/ballerina","forks_url":"https://api.github.com/repos/Manuri/ballerina/forks","keys_url":"https://api.github.com/repos/Manuri/ballerina/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Manuri/ballerina/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Manuri/ballerina/teams","hooks_url":"https://api.github.com/repos/Manuri/ballerina/hooks","issue_events_url":"https://api.github.com/repos/Manuri/ballerina/issues/events{/number}","events_url":"https://api.github.com/repos/Manuri/ballerina/events","assignees_url":"https://api.github.com/repos/Manuri/ballerina/assignees{/user}","branches_url":"https://api.github.com/repos/Manuri/ballerina/branches{/branch}","tags_url":"https://api.github.com/repos/Manuri/ballerina/tags","blobs_url":"https://api.github.com/repos/Manuri/ballerina/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Manuri/ballerina/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Manuri/ballerina/git/refs{/sha}","trees_url":"https://api.github.com/repos/Manuri/ballerina/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Manuri/ballerina/statuses/{sha}","languages_url":"https://api.github.com/repos/Manuri/ballerina/languages","stargazers_url":"https://api.github.com/repos/Manuri/ballerina/stargazers","contributors_url":"https://api.github.com/repos/Manuri/ballerina/contributors","subscribers_url":"https://api.github.com/repos/Manuri/ballerina/subscribers","subscription_url":"https://api.github.com/repos/Manuri/ballerina/subscription","commits_url":"https://api.github.com/repos/Manuri/ballerina/commits{/sha}","git_commits_url":"https://api.github.com/repos/Manuri/ballerina/git/commits{/sha}","comments_url":"https://api.github.com/repos/Manuri/ballerina/comments{/number}","issue_comment_url":"https://api.github.com/repos/Manuri/ballerina/issues/comments{/number}","contents_url":"https://api.github.com/repos/Manuri/ballerina/contents/{+path}","compare_url":"https://api.github.com/repos/Manuri/ballerina/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Manuri/ballerina/merges","archive_url":"https://api.github.com/repos/Manuri/ballerina/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Manuri/ballerina/downloads","issues_url":"https://api.github.com/repos/Manuri/ballerina/issues{/number}","pulls_url":"https://api.github.com/repos/Manuri/ballerina/pulls{/number}","milestones_url":"https://api.github.com/repos/Manuri/ballerina/milestones{/number}","notifications_url":"https://api.github.com/repos/Manuri/ballerina/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Manuri/ballerina/labels{/name}","releases_url":"https://api.github.com/repos/Manuri/ballerina/releases{/id}","deployments_url":"https://api.github.com/repos/Manuri/ballerina/deployments","created_at":"2017-02-27T09:08:36Z","updated_at":"2018-04-04T04:15:47Z","pushed_at":"2018-04-21T05:38:00Z","git_url":"git://github.com/Manuri/ballerina.git","ssh_url":"git@github.com:Manuri/ballerina.git","clone_url":"https://github.com/Manuri/ballerina.git","svn_url":"https://github.com/Manuri/ballerina","homepage":"","size":215534,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ballerina-platform:master","ref":"master","sha":"47e23311a63186c7172a5b6dc62795538870ad7d","user":{"login":"ballerina-platform","id":34733518,"avatar_url":"https://avatars2.githubusercontent.com/u/34733518?v=4","gravatar_id":"","url":"https://api.github.com/users/ballerina-platform","html_url":"https://github.com/ballerina-platform","followers_url":"https://api.github.com/users/ballerina-platform/followers","following_url":"https://api.github.com/users/ballerina-platform/following{/other_user}","gists_url":"https://api.github.com/users/ballerina-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/ballerina-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ballerina-platform/subscriptions","organizations_url":"https://api.github.com/users/ballerina-platform/orgs","repos_url":"https://api.github.com/users/ballerina-platform/repos","events_url":"https://api.github.com/users/ballerina-platform/events{/privacy}","received_events_url":"https://api.github.com/users/ballerina-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":73930305,"name":"ballerina-lang","full_name":"ballerina-platform/ballerina-lang","owner":{"login":"ballerina-platform","id":34733518,"avatar_url":"https://avatars2.githubusercontent.com/u/34733518?v=4","gravatar_id":"","url":"https://api.github.com/users/ballerina-platform","html_url":"https://github.com/ballerina-platform","followers_url":"https://api.github.com/users/ballerina-platform/followers","following_url":"https://api.github.com/users/ballerina-platform/following{/other_user}","gists_url":"https://api.github.com/users/ballerina-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/ballerina-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ballerina-platform/subscriptions","organizations_url":"https://api.github.com/users/ballerina-platform/orgs","repos_url":"https://api.github.com/users/ballerina-platform/repos","events_url":"https://api.github.com/users/ballerina-platform/events{/privacy}","received_events_url":"https://api.github.com/users/ballerina-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ballerina-platform/ballerina-lang","description":"Ballerina is a new programming language for integration built on a sequence diagram metaphor.","fork":false,"url":"https://api.github.com/repos/ballerina-platform/ballerina-lang","forks_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/forks","keys_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/teams","hooks_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/hooks","issue_events_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues/events{/number}","events_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/events","assignees_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/assignees{/user}","branches_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/branches{/branch}","tags_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/tags","blobs_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/git/refs{/sha}","trees_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/statuses/{sha}","languages_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/languages","stargazers_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/stargazers","contributors_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/contributors","subscribers_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/subscribers","subscription_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/subscription","commits_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/commits{/sha}","git_commits_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/git/commits{/sha}","comments_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/comments{/number}","issue_comment_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues/comments{/number}","contents_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/contents/{+path}","compare_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/merges","archive_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/downloads","issues_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues{/number}","pulls_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls{/number}","milestones_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/milestones{/number}","notifications_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/labels{/name}","releases_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/releases{/id}","deployments_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/deployments","created_at":"2016-11-16T14:58:44Z","updated_at":"2018-04-21T15:38:14Z","pushed_at":"2018-04-21T19:00:02Z","git_url":"git://github.com/ballerina-platform/ballerina-lang.git","ssh_url":"git@github.com:ballerina-platform/ballerina-lang.git","clone_url":"https://github.com/ballerina-platform/ballerina-lang.git","svn_url":"https://github.com/ballerina-platform/ballerina-lang","homepage":"","size":220581,"stargazers_count":250,"watchers_count":250,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":313,"mirror_url":null,"archived":false,"open_issues_count":773,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":313,"open_issues":773,"watchers":250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/7591"},"html":{"href":"https://github.com/ballerina-platform/ballerina-lang/pull/7591"},"issue":{"href":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues/7591"},"comments":{"href":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues/7591/comments"},"review_comments":{"href":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/7591/comments"},"review_comment":{"href":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ballerina-platform/ballerina-lang/pulls/7591/commits"},"statuses":{"href":"https://api.github.com/repos/ballerina-platform/ballerina-lang/statuses/acd6dd358b6f3c2b846a64a40d5a34a9e1c3b8e8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"anupama-pathirage"}}