{"action":"created","issue":{"url":"https://api.github.com/repos/NLPchina/elasticsearch-sql/issues/337","repository_url":"https://api.github.com/repos/NLPchina/elasticsearch-sql","labels_url":"https://api.github.com/repos/NLPchina/elasticsearch-sql/issues/337/labels{/name}","comments_url":"https://api.github.com/repos/NLPchina/elasticsearch-sql/issues/337/comments","events_url":"https://api.github.com/repos/NLPchina/elasticsearch-sql/issues/337/events","html_url":"https://github.com/NLPchina/elasticsearch-sql/issues/337","id":193016881,"number":337,"title":"Using elasticsearch-sql JDBC support,How to judge the resultSet record number is empty","user":{"login":"ilevon","id":20918334,"avatar_url":"https://avatars.githubusercontent.com/u/20918334?v=3","gravatar_id":"","url":"https://api.github.com/users/ilevon","html_url":"https://github.com/ilevon","followers_url":"https://api.github.com/users/ilevon/followers","following_url":"https://api.github.com/users/ilevon/following{/other_user}","gists_url":"https://api.github.com/users/ilevon/gists{/gist_id}","starred_url":"https://api.github.com/users/ilevon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilevon/subscriptions","organizations_url":"https://api.github.com/users/ilevon/orgs","repos_url":"https://api.github.com/users/ilevon/repos","events_url":"https://api.github.com/users/ilevon/events{/privacy}","received_events_url":"https://api.github.com/users/ilevon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-02T02:22:18Z","updated_at":"2016-12-11T09:29:12Z","closed_at":null,"body":"Hi:\r\nUsing elasticsearch-sql JDBC support, I met a problem.\r\n```\r\nString sql = buildSql(condition);\r\nPreparedStatement ps = connection.prepareStatement(sql);\r\nResultSet resultSet = ps.executeQuery();\r\n```\r\nHow to judge the resultSet record number is empty\r\n```\r\nwhile (resultSet != null && resultSet.next()){\r\n   //do\r\n  //Like above, even if there is no record will be entered here\r\n}\r\n```\r\nI use the following:\r\n`int record = resultSet.getMetaData().getColumnCount();`\r\nQuery to record number, but record  is equal to zero.\r\nAnd,whether to support the JDBC cursor paging?\r\n\r\nFor example:\r\n```\r\nPreparedStatement pstat = conn.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);\r\npstat.setMaxRows(startNo+maxCount-1);\r\nResultSet resultSet = pstat.executeQuery();\r\nresultSet .first();\r\nresultSet .relative(startNo-2);\r\n```\r\n\r\nRegards.\r\n"},"comment":{"url":"https://api.github.com/repos/NLPchina/elasticsearch-sql/issues/comments/266271958","html_url":"https://github.com/NLPchina/elasticsearch-sql/issues/337#issuecomment-266271958","issue_url":"https://api.github.com/repos/NLPchina/elasticsearch-sql/issues/337","id":266271958,"user":{"login":"ansjsun","id":1221947,"avatar_url":"https://avatars.githubusercontent.com/u/1221947?v=3","gravatar_id":"","url":"https://api.github.com/users/ansjsun","html_url":"https://github.com/ansjsun","followers_url":"https://api.github.com/users/ansjsun/followers","following_url":"https://api.github.com/users/ansjsun/following{/other_user}","gists_url":"https://api.github.com/users/ansjsun/gists{/gist_id}","starred_url":"https://api.github.com/users/ansjsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansjsun/subscriptions","organizations_url":"https://api.github.com/users/ansjsun/orgs","repos_url":"https://api.github.com/users/ansjsun/repos","events_url":"https://api.github.com/users/ansjsun/events{/privacy}","received_events_url":"https://api.github.com/users/ansjsun/received_events","type":"User","site_admin":false},"created_at":"2016-12-11T09:29:12Z","updated_at":"2016-12-11T09:29:12Z","body":"@allwefantasy "}}
{"actor":{"display_login":"ansjsun"}}