{"action":"created","issue":{"url":"https://api.github.com/repos/Sqlite-Ecto/sqlite_ecto2/issues/225","repository_url":"https://api.github.com/repos/Sqlite-Ecto/sqlite_ecto2","labels_url":"https://api.github.com/repos/Sqlite-Ecto/sqlite_ecto2/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/Sqlite-Ecto/sqlite_ecto2/issues/225/comments","events_url":"https://api.github.com/repos/Sqlite-Ecto/sqlite_ecto2/issues/225/events","html_url":"https://github.com/Sqlite-Ecto/sqlite_ecto2/issues/225","id":379532197,"node_id":"MDU6SXNzdWUzNzk1MzIxOTc=","number":225,"title":"UPSERT with ON CONFLICT","user":{"login":"venkatd","id":220686,"node_id":"MDQ6VXNlcjIyMDY4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/220686?v=4","gravatar_id":"","url":"https://api.github.com/users/venkatd","html_url":"https://github.com/venkatd","followers_url":"https://api.github.com/users/venkatd/followers","following_url":"https://api.github.com/users/venkatd/following{/other_user}","gists_url":"https://api.github.com/users/venkatd/gists{/gist_id}","starred_url":"https://api.github.com/users/venkatd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/venkatd/subscriptions","organizations_url":"https://api.github.com/users/venkatd/orgs","repos_url":"https://api.github.com/users/venkatd/repos","events_url":"https://api.github.com/users/venkatd/events{/privacy}","received_events_url":"https://api.github.com/users/venkatd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-11T15:16:08Z","updated_at":"2018-11-11T16:02:08Z","closed_at":null,"author_association":"NONE","body":"It looks like as of 3.24, sqlite3 supports ON CONFLICT UPDATE that mimics the postgres syntax: https://www.sqlite.org/lang_UPSERT.html\r\n\r\nI saw that https://github.com/mmzeeman/esqlite has updated to 3.24 at least on the master branch.\r\n\r\nI'm a newbie to the Ecto internals so if someone is able to point me in the right direction, I can take a stab at implementing this.\r\n\r\nUPSERT will be very useful to us so we can treat sqlite as a key-value store."},"comment":{"url":"https://api.github.com/repos/Sqlite-Ecto/sqlite_ecto2/issues/comments/437682170","html_url":"https://github.com/Sqlite-Ecto/sqlite_ecto2/issues/225#issuecomment-437682170","issue_url":"https://api.github.com/repos/Sqlite-Ecto/sqlite_ecto2/issues/225","id":437682170,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzY4MjE3MA==","user":{"login":"ConnorRigby","id":21150830,"node_id":"MDQ6VXNlcjIxMTUwODMw","avatar_url":"https://avatars3.githubusercontent.com/u/21150830?v=4","gravatar_id":"","url":"https://api.github.com/users/ConnorRigby","html_url":"https://github.com/ConnorRigby","followers_url":"https://api.github.com/users/ConnorRigby/followers","following_url":"https://api.github.com/users/ConnorRigby/following{/other_user}","gists_url":"https://api.github.com/users/ConnorRigby/gists{/gist_id}","starred_url":"https://api.github.com/users/ConnorRigby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConnorRigby/subscriptions","organizations_url":"https://api.github.com/users/ConnorRigby/orgs","repos_url":"https://api.github.com/users/ConnorRigby/repos","events_url":"https://api.github.com/users/ConnorRigby/events{/privacy}","received_events_url":"https://api.github.com/users/ConnorRigby/received_events","type":"User","site_admin":false},"created_at":"2018-11-11T16:02:08Z","updated_at":"2018-11-11T16:02:08Z","author_association":"MEMBER","body":"We follow releases of `esqlite`, so when it is released i will investigate integrating `UPSERT`s with Ecto. \r\nFor what it's worth if you want to take a look, you can add `{:esqlite, github: \"mmzeeman/esqlite\", override: true, manager: :rebar3}` to your deps.  [this](https://github.com/Sqlite-Ecto/sqlite_ecto2/blob/master/lib/sqlite_ecto/connection.ex#L161) is likely the function that will need to be updated."}}
{"actor":{"display_login":"ConnorRigby"}}