{"id":19787233,"url":"https://github.com/rorm-orm/dorm","last_synced_at":"2025-11-23T14:02:58.133Z","repository":{"id":75077325,"uuid":"569031170","full_name":"rorm-orm/dorm","owner":"rorm-orm","description":"D frontend for rorm","archived":false,"fork":false,"pushed_at":"2025-08-27T23:22:02.000Z","size":2441,"stargazers_count":16,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-28T07:18:58.792Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rorm-orm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2022-11-21T23:40:47.000Z","updated_at":"2025-08-27T23:22:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"93cbf1cd-cd4a-4b3e-9060-b4b4f0bdb8a9","html_url":"https://github.com/rorm-orm/dorm","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/rorm-orm/dorm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rorm-orm%2Fdorm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rorm-orm%2Fdorm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rorm-orm%2Fdorm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rorm-orm%2Fdorm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rorm-orm","download_url":"https://codeload.github.com/rorm-orm/dorm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rorm-orm%2Fdorm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285961614,"owners_count":27261497,"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","status":"online","status_checked_at":"2025-11-23T02:00:06.149Z","response_time":135,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T06:21:50.434Z","updated_at":"2025-11-23T14:02:58.110Z","avatar_url":"https://github.com/rorm-orm.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DORM\n\n[![License](https://img.shields.io/github/license/rorm-orm/dorm?label=License)](LICENSE.md)\n[![](https://img.shields.io/dub/v/dorm?label=Dub\u0026logo=D)](https://code.dlang.org/packages/dorm)\n[![Dub downloads](https://img.shields.io/dub/dw/dorm?label=Downloads)](https://code.dlang.org/packages/dorm)\n[![Integration Tests](https://img.shields.io/github/actions/workflow/status/rorm-orm/dorm/ci.yml?label=Build)](https://github.com/rorm-orm/dorm/actions/workflows/ci.yml)\n\nA sophisticated D ORM using [rorm-lib](https://github.com/rorm-orm/rorm-lib) as a backend.\n\nWorks standalone using multi-threading or with vibe-core.\n\nThe following databases are currently supported:\n- SQLite 3\n- MariaDB 10.5 - 10.9\n- Postgres 11 - 15\n\n## Documentation\n\nTake a look at [rorm-orm/docs](https://github.com/rorm-orm/docs) or just use the \ndeployed documentation: [rorm.rs](https://rorm.rs).\n\nAuto-generated source code documentation is available on [https://dorm.dpldocs.info/](https://dorm.dpldocs.info/).\n\n## Installation\n\n```\ndub add dorm\n```\n\nWhen first compiling, DORM will automatically download pre-compiled library binaries into the package location when it hasn't been downloaded yet. You can also manually put the `librorm.a` (Posix) or `rorm.lib` (Windows) file into the DUB package to not make it download anything.\n\nYou can use `dub run dorm` to run the supporting CLI tool, which will be downloaded at the same time. `rorm-cli` is used for creating migrations, which you check-in into your project source and to apply migrations both on development machines as well as on production machines.\n\n## Example\n\nFor a more detailed walkthrough see [rorm.rs](https://rorm.rs)\n\n```d\nmodule models;\n\nimport dorm.design;\n\nmixin RegisterModels;\n\nclass User : Model\n{\n\t@Id long id;\n\n\t@maxLength(255)\n\tstring username;\n\n\t@maxLength(255)\n\tstring password;\n\n\t@autoCreateTime\n\tSysTime createdAt;\n\n\t@columnName(\"admin\")\n\tbool isAdmin;\n\n\t@constructValue!(() =\u003e Clock.currTime + 24.hours)\n\tSysTime tempPasswordTime;\n}\n```\n\n```d\nimport models;\n\nimport faked, std.datetime.systime, std.random, std.stdio;\n\nimport dorm.api.db;\n\nmixin SetupDormRuntime;\n\nvoid main() {\n\t@DormPatch!User\n\tstruct UserSelection {\n\t\tlong id;\n\t\tstring username;\n\t\tSysTime createdAt;\n\t}\n\n\tauto appConfig = parseTomlConfig!BareConfiguration(\"database.toml\");\n\tauto db = DormDB(appConfig.database);\n\n\tauto f = new Faker_de(uniform!int);\n\n\tforeach (i; 0 .. 2) {\n\t\t@DormPatch!User\n\t\tstruct UserInsert {\n\t\t\tstring username;\n\t\t\tstring password;\n\t\t\tbool isAdmin;\n\t\t}\n\n\t\tUserInsert user;\n\t\tuser.username = f.nameName;\n\t\tuser.password = \"123456\";\n\t\tdb.insert(user);\n\t}\n\n\tauto oldestUsers = db.select!UserSelection\n\t\t.condition(u =\u003e u.not.isAdmin)\n\t\t.orderBy(u =\u003e u.createdAt.asc)\n\t\t.limit(5)\n\t\t.stream();\n\n\twriteln(\"Oldest 5 Users:\");\n\tforeach (i, user; oldestUsers) {\n\t\twritefln!\"#%d %s\\tcreated at %s\"(i + 1, user.username, user.createdAt);\n\n\t\t// delete first user\n\t\tif (i == 0)\n\t\t\tdb.remove(user);\n\t}\n}\n```\n\nFor a more detailed walkthrough see [rorm.rs](https://rorm.rs)\n\n## Contribution\n\nBefore contribution, see the [development guidelines](https://rorm.rs/developer/guidelines).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frorm-orm%2Fdorm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frorm-orm%2Fdorm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frorm-orm%2Fdorm/lists"}