{"action":"created","issue":{"url":"https://api.github.com/repos/android/android-ktx/issues/328","repository_url":"https://api.github.com/repos/android/android-ktx","labels_url":"https://api.github.com/repos/android/android-ktx/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/android/android-ktx/issues/328/comments","events_url":"https://api.github.com/repos/android/android-ktx/issues/328/events","html_url":"https://github.com/android/android-ktx/issues/328","id":297301135,"number":328,"title":"Add Database DSL","user":{"login":"printart","id":23297694,"avatar_url":"https://avatars3.githubusercontent.com/u/23297694?v=4","gravatar_id":"","url":"https://api.github.com/users/printart","html_url":"https://github.com/printart","followers_url":"https://api.github.com/users/printart/followers","following_url":"https://api.github.com/users/printart/following{/other_user}","gists_url":"https://api.github.com/users/printart/gists{/gist_id}","starred_url":"https://api.github.com/users/printart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/printart/subscriptions","organizations_url":"https://api.github.com/users/printart/orgs","repos_url":"https://api.github.com/users/printart/repos","events_url":"https://api.github.com/users/printart/events{/privacy}","received_events_url":"https://api.github.com/users/printart/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-15T01:13:17Z","updated_at":"2018-02-15T02:12:42Z","closed_at":"2018-02-15T02:12:42Z","author_association":"NONE","body":"This extension adds DSL to SQLiteDatabase:\r\ninline fun `<T>` SQLiteDatabase.dbMake(sqlDb: SQLiteDatabase.() -> T): T {\r\n    return sqlDb(this)\r\n}\r\nSomewhere in your code:\r\n val result = YourHelper(context).writableDatabase.dbMake {        \r\n    insert()\r\n    update()\r\n    delete()\r\n    query()\r\n }\r\n"},"comment":{"url":"https://api.github.com/repos/android/android-ktx/issues/comments/365806842","html_url":"https://github.com/android/android-ktx/issues/328#issuecomment-365806842","issue_url":"https://api.github.com/repos/android/android-ktx/issues/328","id":365806842,"user":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars0.githubusercontent.com/u/66577?v=4","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"created_at":"2018-02-15T02:12:42Z","updated_at":"2018-02-15T02:12:42Z","author_association":"OWNER","body":"We already have something like this for transactions: https://android.github.io/android-ktx/core-ktx/androidx.database.sqlite/android.database.sqlite.-s-q-lite-database/index.html\r\n\r\nOtherwise this is the same as the standard library's `apply` extension."}}
{"actor":{"display_login":"JakeWharton"}}