{"id":20772797,"url":"https://github.com/leadcodedev/fluent_orm","last_synced_at":"2025-09-09T11:12:43.405Z","repository":{"id":184985309,"uuid":"672787847","full_name":"LeadcodeDev/fluent_orm","owner":"LeadcodeDev","description":"Fluent is a template-based ORM for Dart, offering a robust alternative to database management, with features such as easier migration and query management.","archived":false,"fork":false,"pushed_at":"2024-02-21T20:46:49.000Z","size":126,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T14:48:28.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LeadcodeDev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2023-07-31T07:04:23.000Z","updated_at":"2024-11-18T16:17:27.000Z","dependencies_parsed_at":"2024-02-21T21:56:17.550Z","dependency_job_id":null,"html_url":"https://github.com/LeadcodeDev/fluent_orm","commit_stats":null,"previous_names":["leadcodedev/fluent_orm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeadcodeDev%2Ffluent_orm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeadcodeDev%2Ffluent_orm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeadcodeDev%2Ffluent_orm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeadcodeDev%2Ffluent_orm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeadcodeDev","download_url":"https://codeload.github.com/LeadcodeDev/fluent_orm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234477555,"owners_count":18839684,"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":[],"created_at":"2024-11-17T12:23:06.144Z","updated_at":"2025-01-18T07:25:21.185Z","avatar_url":"https://github.com/LeadcodeDev.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fluent ORM\n\n## Motivation\nAs a Typescript developer at heart, I've always been accustomed to coming across a multitude of packages in the Node.js ecosystem, each one more incredible than the last, to satisfy my every desire.\n\n![icons technologies](https://skillicons.dev/icons?i=postgres,mysql,dart,flutter)\n\n## No alternative in Dart\nWhen I was learning the [Dart language](https://dart.dev) I was surprised to see, or rather not to have, a wide choice of packages fulfilling the role of an ORM. The only fascinating alternative is Prisma, an adaptation of the world-famous [Prisma ORM](https://www.prisma.io) for the Javascript language.\n\nAs a big fan of [Adonis](https://adonisjs.com) as I am, I didn't find the essence of the standards surrounding the database domain, such as migration management, enabling tables to be altered and evolved over time, or the concept of model, the representation of each table within its application.\n\nIt was with the aim of solidifying my knowledge in this field while offering a robust and reliable alternative to everyone that I designed **Fluent** : *The model-based ORM for Dart*.\n\n## Our philosophy\nWith a view to agnostic and cross-platform use, we've decided to free ourselves from the language's reflexion, so that you can still compile your applications to [Javascript](https://dart.dev/web/js-interop), [AOT](https://dart.dev/tools/dart-compile#aot-snapshot), [JIT](https://dart.dev/tools/dart-compile#jit-snapshot) or as [executables](https://dart.dev/tools/dart-compile#exe).\n\n## Example of use\nIn this example, we're going to create a table called `articles`, which would hypothetically contain a list of subjects with a wide variety of themes.\n\n```dart\n// title: Model\nimport 'package:fluent_orm/fluent_orm.dart';\n\nfinal class Article extends Model\u003cArticle\u003e {\n  int get id =\u003e model.property('id');\n  String get title =\u003e model.property('title');\n  String get content =\u003e model.property('content');\n}\n```\n\n```dart\n// title: Migration\nfinal class Article1691342071 extends Schema {\n  final String tableName = 'articles';\n\n  @override\n  Future\u003cvoid\u003e up () async {\n    schema.createTable(tableName, (table) {\n      table.increments('id');\n      table.string('title').notNullable();\n      table.text('content');\n    });\n  }\n\n  @override\n  Future\u003cvoid\u003e down () async {\n    schema.dropTable(tableName);\n  }\n}\n```\n\n```dart\n// title: QueryBuilder\nfinal articles = await Database.of(manager).model\u003cArticle\u003e().query()\n  .where(column: 'id', value: 1)\n  .fetch();\n\nexpect(articles, isA\u003cList\u003cArticle\u003e\u003e());\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleadcodedev%2Ffluent_orm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleadcodedev%2Ffluent_orm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleadcodedev%2Ffluent_orm/lists"}