{"action":"created","issue":{"url":"https://api.github.com/repos/jgallagher/rusqlite/issues/113","repository_url":"https://api.github.com/repos/jgallagher/rusqlite","labels_url":"https://api.github.com/repos/jgallagher/rusqlite/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/jgallagher/rusqlite/issues/113/comments","events_url":"https://api.github.com/repos/jgallagher/rusqlite/issues/113/events","html_url":"https://github.com/jgallagher/rusqlite/pull/113","id":125430341,"number":113,"title":"Introduce StatementCache","user":{"login":"jgallagher","id":1435635,"avatar_url":"https://avatars.githubusercontent.com/u/1435635?v=3","gravatar_id":"","url":"https://api.github.com/users/jgallagher","html_url":"https://github.com/jgallagher","followers_url":"https://api.github.com/users/jgallagher/followers","following_url":"https://api.github.com/users/jgallagher/following{/other_user}","gists_url":"https://api.github.com/users/jgallagher/gists{/gist_id}","starred_url":"https://api.github.com/users/jgallagher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgallagher/subscriptions","organizations_url":"https://api.github.com/users/jgallagher/orgs","repos_url":"https://api.github.com/users/jgallagher/repos","events_url":"https://api.github.com/users/jgallagher/events{/privacy}","received_events_url":"https://api.github.com/users/jgallagher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-07T16:35:22Z","updated_at":"2016-05-18T18:48:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jgallagher/rusqlite/pulls/113","html_url":"https://github.com/jgallagher/rusqlite/pull/113","diff_url":"https://github.com/jgallagher/rusqlite/pull/113.diff","patch_url":"https://github.com/jgallagher/rusqlite/pull/113.patch"},"body":"Mostly #61, with fixes for the latest merged PRs.\r\n\r\n@gwenn I made a couple of minor changes here; the only public-facing one is removing `cacheable` and instead having a consuming method `discard()`. I think this feels a little nicer; what do you think?"},"comment":{"url":"https://api.github.com/repos/jgallagher/rusqlite/issues/comments/220122048","html_url":"https://github.com/jgallagher/rusqlite/pull/113#issuecomment-220122048","issue_url":"https://api.github.com/repos/jgallagher/rusqlite/issues/113","id":220122048,"user":{"login":"gwenn","id":45554,"avatar_url":"https://avatars.githubusercontent.com/u/45554?v=3","gravatar_id":"","url":"https://api.github.com/users/gwenn","html_url":"https://github.com/gwenn","followers_url":"https://api.github.com/users/gwenn/followers","following_url":"https://api.github.com/users/gwenn/following{/other_user}","gists_url":"https://api.github.com/users/gwenn/gists{/gist_id}","starred_url":"https://api.github.com/users/gwenn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwenn/subscriptions","organizations_url":"https://api.github.com/users/gwenn/orgs","repos_url":"https://api.github.com/users/gwenn/repos","events_url":"https://api.github.com/users/gwenn/events{/privacy}","received_events_url":"https://api.github.com/users/gwenn/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T18:48:23Z","updated_at":"2016-05-18T18:48:23Z","body":"The column_count cannot be saved in memory because it can be invalidated by a DDL:\r\n```rust\r\ndb.execute(\"CREATE TABLE test (x TEXT)\").unwrap();\r\n// ...\r\nlet stmt = db.prepare_cached(\"SELECT * FROM test\").unwrap();\r\n// ...\r\ndb.execute(\"ALTER TABLE test ADD COLUMN y TEXT\").unwrap();\r\n// ...\r\nstmt.stmt.query_map(&[], |row| {\r\n            let x = row.get(0);\r\n            let y = row.get(1); // PANIC ?\r\n            // ...\r\n    }).unwrap();\r\n```"}}