{"id":19007660,"url":"https://github.com/razaghimahdi/sql-delight-example01","last_synced_at":"2026-05-09T05:09:17.035Z","repository":{"id":44618398,"uuid":"432112945","full_name":"razaghimahdi/Sql-Delight-Example01","owner":"razaghimahdi","description":"sql-delight example, a plugin by Square which is pure kotlin and it is useful in kmm","archived":false,"fork":false,"pushed_at":"2023-06-02T07:36:12.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-01T20:24:46.900Z","etag":null,"topics":["android","coroutines","database","kotlin","sql","sqldelight","sqldelight-sample"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/razaghimahdi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-26T08:55:49.000Z","updated_at":"2022-01-24T12:16:15.000Z","dependencies_parsed_at":"2024-11-08T18:45:10.234Z","dependency_job_id":"d22c9a17-3a42-4043-bead-de65a917b1c0","html_url":"https://github.com/razaghimahdi/Sql-Delight-Example01","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razaghimahdi%2FSql-Delight-Example01","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razaghimahdi%2FSql-Delight-Example01/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razaghimahdi%2FSql-Delight-Example01/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razaghimahdi%2FSql-Delight-Example01/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razaghimahdi","download_url":"https://codeload.github.com/razaghimahdi/Sql-Delight-Example01/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240035534,"owners_count":19737601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","coroutines","database","kotlin","sql","sqldelight","sqldelight-sample"],"created_at":"2024-11-08T18:39:00.729Z","updated_at":"2026-04-23T00:30:22.878Z","avatar_url":"https://github.com/razaghimahdi.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQL Delight Example01\n\n## Developed by Mahdi Razzaghi Ghaleh\n\n**simple example of sql-delight**\n\n## Give a Star! ⭐\nIf you like or are using this project to learn or start your solution, please give it a star. Thanks!\n\n### What is SqlDelight?\n\nKotlin Multiplatform is one of the most interesting trends in mobile development this year. \nIt's dedicated to sharing the code between many different platforms, including mobile ones — Android and iOS.\nSQLDelight generates typesafe kotlin APIs from your SQL statements. It verifies your schema, statements, \nand migrations at compile-time and provides IDE features like autocomplete and refactoring which make writing and maintaining SQL simple.\n\n### SqlDelight and Coroutine\n\nOne of the main reasons behind the success of the jetpack Room database library is that\nit’s easy to use and compatible with popular frameworks like coroutines, and paging.\nSQL Delight also has that benefit;\nwe only need to add the following line under the dependencies node inside the app level Gradle file to make it work.\n\n**Look at these examples:**\n\n```kotlin\n/**\n * we need to use AndroidSqliteDriver to write the data into the android database which persists across app launches.\n * */\nval context = LocalContext.current\nval androidSqlDriver = AndroidSqliteDriver(\n    schema = Database.Schema,\n    context = context,\n    name = \"user.db\"\n)\n\n/**Then we need to get hold of the queries that we’ve created inside database.sql file.*/\nval queries = Database(androidSqlDriver).userDbQueries\nval users = queries.selectAll().executeAsList().map { it.toUser() }\n```\n  \n#### Some Ideas:\n\n- **https://cashapp.github.io/sqldelight/**\n- **https://github.com/cashapp/sqldelight**\n- **https://betterprogramming.pub/getting-started-with-sqldelight-in-android-development-eecd0ae9bbdd**\n- **https://medium.com/xorum-io/migration-from-room-to-sqldelight-28d6f4aaf31e**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazaghimahdi%2Fsql-delight-example01","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazaghimahdi%2Fsql-delight-example01","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazaghimahdi%2Fsql-delight-example01/lists"}