{"action":"created","issue":{"url":"https://api.github.com/repos/rstats-db/RSQLite/issues/65","labels_url":"https://api.github.com/repos/rstats-db/RSQLite/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/rstats-db/RSQLite/issues/65/comments","events_url":"https://api.github.com/repos/rstats-db/RSQLite/issues/65/events","html_url":"https://github.com/rstats-db/RSQLite/issues/65","id":53004319,"number":65,"title":"Big int is not properly handled","user":{"login":"gaizoule","id":6177156,"avatar_url":"https://avatars.githubusercontent.com/u/6177156?v=3","gravatar_id":"","url":"https://api.github.com/users/gaizoule","html_url":"https://github.com/gaizoule","followers_url":"https://api.github.com/users/gaizoule/followers","following_url":"https://api.github.com/users/gaizoule/following{/other_user}","gists_url":"https://api.github.com/users/gaizoule/gists{/gist_id}","starred_url":"https://api.github.com/users/gaizoule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaizoule/subscriptions","organizations_url":"https://api.github.com/users/gaizoule/orgs","repos_url":"https://api.github.com/users/gaizoule/repos","events_url":"https://api.github.com/users/gaizoule/events{/privacy}","received_events_url":"https://api.github.com/users/gaizoule/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-12-28T16:42:38Z","updated_at":"2015-01-17T16:23:39Z","closed_at":null,"body":"When dbGetQuery from sqlite table which contains  big ints, the result is not right.\r\nfor eample:\r\ntable: test\r\nid (integer), price(double)\r\n4294967296, 3.1415\r\n\r\nthen  dbGetQuery(con, \"select * from test\") will return\r\nid,price\r\n0,3.1415\r\n\r\n\r\n\r\n\r\n\r\n "},"comment":{"url":"https://api.github.com/repos/rstats-db/RSQLite/issues/comments/70372874","html_url":"https://github.com/rstats-db/RSQLite/issues/65#issuecomment-70372874","issue_url":"https://api.github.com/repos/rstats-db/RSQLite/issues/65","id":70372874,"user":{"login":"dankelley","id":99469,"avatar_url":"https://avatars.githubusercontent.com/u/99469?v=3","gravatar_id":"","url":"https://api.github.com/users/dankelley","html_url":"https://github.com/dankelley","followers_url":"https://api.github.com/users/dankelley/followers","following_url":"https://api.github.com/users/dankelley/following{/other_user}","gists_url":"https://api.github.com/users/dankelley/gists{/gist_id}","starred_url":"https://api.github.com/users/dankelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dankelley/subscriptions","organizations_url":"https://api.github.com/users/dankelley/orgs","repos_url":"https://api.github.com/users/dankelley/repos","events_url":"https://api.github.com/users/dankelley/events{/privacy}","received_events_url":"https://api.github.com/users/dankelley/received_events","type":"User","site_admin":false},"created_at":"2015-01-17T16:23:39Z","updated_at":"2015-01-17T16:23:39Z","body":"I thought I'd post my workaround, in case it helps others. This is not a terribly general result, but it should be ok for practical times measured in milliseconds from 1970.\r\n\r\nFirst, create a database that has a time 1/2 second into year 2015.\r\n```\r\n\\rm -f test.db\r\nsqlite3 test.db\r\ncreate table data(t longint);\r\ninsert into data values(1420070400500);\r\n```\r\nNext, run the following R code\r\n```splus\r\nlibrary(RSQLite)\r\ndrv <- dbDriver(\"SQLite\")\r\ncon <- dbConnect(drv, dbname=\"test.db\")\r\nres <- dbSendQuery(con, \"select cast(t as real) from data\")\r\nt <- as.numeric(dbFetch(res))\r\nas.POSIXct(\"1970-01-01 00:00:00\", tz=\"UTC\") + t/1000\r\ndbClearResult(res)\r\ndbDisconnect(con)\r\n```\r\nto get result\r\n```\r\n\"2015-01-01 00:00:00.5 UTC\"\r\n```\r\n\r\n"}}