{"action":"created","issue":{"url":"https://api.github.com/repos/davidmoten/rxjava-jdbc/issues/37","labels_url":"https://api.github.com/repos/davidmoten/rxjava-jdbc/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/davidmoten/rxjava-jdbc/issues/37/comments","events_url":"https://api.github.com/repos/davidmoten/rxjava-jdbc/issues/37/events","html_url":"https://github.com/davidmoten/rxjava-jdbc/issues/37","id":103217451,"number":37,"title":"db.select(sql).dependsOnOperator().getXXX() doesn't seem to work","user":{"login":"Crystark","id":259699,"avatar_url":"https://avatars.githubusercontent.com/u/259699?v=3","gravatar_id":"","url":"https://api.github.com/users/Crystark","html_url":"https://github.com/Crystark","followers_url":"https://api.github.com/users/Crystark/followers","following_url":"https://api.github.com/users/Crystark/following{/other_user}","gists_url":"https://api.github.com/users/Crystark/gists{/gist_id}","starred_url":"https://api.github.com/users/Crystark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Crystark/subscriptions","organizations_url":"https://api.github.com/users/Crystark/orgs","repos_url":"https://api.github.com/users/Crystark/repos","events_url":"https://api.github.com/users/Crystark/events{/privacy}","received_events_url":"https://api.github.com/users/Crystark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-26T09:11:59Z","updated_at":"2015-09-24T23:56:39Z","closed_at":null,"body":"Hi,\r\n\r\nI have the following piece of code that doesn't seem to work as I want:\r\n\r\n```java\r\nupdateObservable = Observable.interval(0, 10, TimeUnit.SECONDS)\r\n\t.doOnNext(s -> System.out.println(\"try \" + s))\r\n\t.lift(db\r\n\t\t.select(\"SELECT id FROM mytable ORDER BY updated_at ASC\")\r\n\t\t.dependsOnOperator()\r\n\t\t.getTupleN()\r\n\t)\r\n\t.doOnNext(s -> System.out.println(\"result \" + s));\r\n\t\r\nupdateObservable.subscribe();\r\n```\r\n\r\nThis prints out:\r\n\r\n```\r\ntry 0\r\ntry 1\r\n...\r\n```\r\n\r\nAlthough this seems to work fine:\r\n\r\n```java\r\nupdateObservable = Observable.interval(0, 10, TimeUnit.SECONDS)\r\n\t.doOnNext(s -> System.out.println(\"try \" + s))\r\n\t.lift(db\r\n\t\t.select(\"SELECT id FROM mytable WHERE id <> ? ORDER BY updated_at ASC\")\r\n\t\t.parameterOperator()\r\n\t\t.getTupleN()\r\n\t)\r\n\t.doOnNext(s -> System.out.println(\"result \" + s));\r\nupdateObservable.subscribe();\r\n```\r\n\r\nBecause it prints the following:\r\n\r\n```\r\ntry 0\r\nresult TupleN [values=[18]]\r\nresult TupleN [values=[16]]\r\nresult TupleN [values=[17]]\r\ntry 1\r\nresult TupleN [values=[18]]\r\nresult TupleN [values=[16]]\r\nresult TupleN [values=[17]]\r\n...\r\n```\r\n\r\n**Am I doing something wrong in the first example ?**\r\n\r\nFYI I've simplified the above example but what I really want to do is to continuously poll that request and process its elements. It would probably look like that:\r\n\r\n```java\r\nupdateObservable = Observable.interval(0, 1, TimeUnit.NANOSECONDS)\r\n\t.onBackpressureLatest()\r\n\t.lift(db\r\n\t\t.select(\"SELECT id FROM mytable ORDER BY updated_at ASC\")\r\n\t\t.dependsOnOperator()\r\n\t\t.getTupleN()\r\n\t)\r\n\t.<List<String>> compose(new MyTableTransformer())\r\n\t.lift(db\r\n\t\t.update(\"UPDATE mytable SET updated_at = ? WHERE id = ?\")\r\n\t\t.parameterOperator()\r\n\t);\r\n\t\r\nupdateObservable.subscribe();\r\n```\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/davidmoten/rxjava-jdbc/issues/comments/143084265","html_url":"https://github.com/davidmoten/rxjava-jdbc/issues/37#issuecomment-143084265","issue_url":"https://api.github.com/repos/davidmoten/rxjava-jdbc/issues/37","id":143084265,"user":{"login":"davidmoten","id":318187,"avatar_url":"https://avatars.githubusercontent.com/u/318187?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmoten","html_url":"https://github.com/davidmoten","followers_url":"https://api.github.com/users/davidmoten/followers","following_url":"https://api.github.com/users/davidmoten/following{/other_user}","gists_url":"https://api.github.com/users/davidmoten/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmoten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmoten/subscriptions","organizations_url":"https://api.github.com/users/davidmoten/orgs","repos_url":"https://api.github.com/users/davidmoten/repos","events_url":"https://api.github.com/users/davidmoten/events{/privacy}","received_events_url":"https://api.github.com/users/davidmoten/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T23:56:39Z","updated_at":"2015-09-24T23:56:39Z","body":"It is possible that 0.6.5 release fixes this as well. Can you test please?"}}