{"url":"https://api.github.com/repos/simonw/sqlite-utils/issues/605","repository_url":"https://api.github.com/repos/simonw/sqlite-utils","labels_url":"https://api.github.com/repos/simonw/sqlite-utils/issues/605/labels{/name}","comments_url":"https://api.github.com/repos/simonw/sqlite-utils/issues/605/comments","events_url":"https://api.github.com/repos/simonw/sqlite-utils/issues/605/events","html_url":"https://github.com/simonw/sqlite-utils/issues/605","id":2007893839,"node_id":"I_kwDOCGYnMM53rgdP","number":605,"title":"Insert fails with `Error: Python int too large to convert to SQLite INTEGER`; can we use `NUMERIC` here?","user":{"login":"Zac-HD","id":12229877,"node_id":"MDQ6VXNlcjEyMjI5ODc3","avatar_url":"https://avatars.githubusercontent.com/u/12229877?v=4","gravatar_id":"","url":"https://api.github.com/users/Zac-HD","html_url":"https://github.com/Zac-HD","followers_url":"https://api.github.com/users/Zac-HD/followers","following_url":"https://api.github.com/users/Zac-HD/following{/other_user}","gists_url":"https://api.github.com/users/Zac-HD/gists{/gist_id}","starred_url":"https://api.github.com/users/Zac-HD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zac-HD/subscriptions","organizations_url":"https://api.github.com/users/Zac-HD/orgs","repos_url":"https://api.github.com/users/Zac-HD/repos","events_url":"https://api.github.com/users/Zac-HD/events{/privacy}","received_events_url":"https://api.github.com/users/Zac-HD/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2023-11-23T10:19:46Z","updated_at":"2023-12-08T05:07:54Z","closed_at":"2023-12-08T05:07:54Z","assignee":null,"author_association":"NONE","active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"I'm currently working on a new feature for Hypothesis, where we can dump a tidy jsonlines table of all the test cases we tried - including arguments, outcomes, timings, coverage, etc.  Exploring this seems like a perfect cases for `sqlite-utils` and `datasette`, but I pretty quickly ran into an integer overflow problem and don't want to recommend that experience to my users.\r\n\r\nI originally went to report this as a bug... and then found https://github.com/simonw/sqlite-utils/issues/309#issuecomment-895581038 almost exactly matched my repro 😅 \r\n\r\nhttps://github.com/simonw/sqlite-utils/issues/110#issuecomment-626391063 suggests that using `NUMERIC` would avoid this overflow error, although \"If the TEXT value is a well-formed integer literal that is too large to fit in a 64-bit signed integer, it is converted to REAL.\" suggests that this would come at the cost of rounding to the nearest float value.  Maybe I should just convert large integers to float before writing out my json?\r\n\r\nAfter a bit more hacking, \"manually cast large integers to float\" seems like a decent solution for my particular case, but having written it up I thought I might as well post this issue anyway - I hope it's useful feedback, and won't mind at all if you close as wontfix if it's not.","closed_by":{"login":"simonw","id":9599,"node_id":"MDQ6VXNlcjk1OTk=","avatar_url":"https://avatars.githubusercontent.com/u/9599?v=4","gravatar_id":"","url":"https://api.github.com/users/simonw","html_url":"https://github.com/simonw","followers_url":"https://api.github.com/users/simonw/followers","following_url":"https://api.github.com/users/simonw/following{/other_user}","gists_url":"https://api.github.com/users/simonw/gists{/gist_id}","starred_url":"https://api.github.com/users/simonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonw/subscriptions","organizations_url":"https://api.github.com/users/simonw/orgs","repos_url":"https://api.github.com/users/simonw/repos","events_url":"https://api.github.com/users/simonw/events{/privacy}","received_events_url":"https://api.github.com/users/simonw/received_events","type":"User","user_view_type":"public","site_admin":false},"reactions":{"url":"https://api.github.com/repos/simonw/sqlite-utils/issues/605/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/simonw/sqlite-utils/issues/605/timeline","performed_via_github_app":null,"state_reason":"completed","pinned_comment":null}