{"id":15620908,"url":"https://github.com/gradii/fedaco","last_synced_at":"2025-08-26T03:14:59.646Z","repository":{"id":57114100,"uuid":"393576566","full_name":"gradii/fedaco","owner":"gradii","description":"Laravel Eloquent With Typescript","archived":false,"fork":false,"pushed_at":"2024-11-21T12:45:24.000Z","size":2566,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T16:14:28.674Z","etag":null,"topics":["active-record","database","mariadb","nodejs","orm","postgresql","sqlite","typescript"],"latest_commit_sha":null,"homepage":"https://gradii.github.io/fedaco","language":"TypeScript","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/gradii.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-08-07T04:21:17.000Z","updated_at":"2024-11-21T12:45:27.000Z","dependencies_parsed_at":"2024-05-19T07:28:23.688Z","dependency_job_id":"4d0f980c-2640-4700-9289-1f8860f36091","html_url":"https://github.com/gradii/fedaco","commit_stats":{"total_commits":94,"total_committers":3,"mean_commits":"31.333333333333332","dds":0.07446808510638303,"last_synced_commit":"f50ebe91ccc8e001c7ac6cdf9972fb2f30d34020"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradii%2Ffedaco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradii%2Ffedaco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradii%2Ffedaco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradii%2Ffedaco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gradii","download_url":"https://codeload.github.com/gradii/fedaco/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251342725,"owners_count":21574245,"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":["active-record","database","mariadb","nodejs","orm","postgresql","sqlite","typescript"],"created_at":"2024-10-03T09:03:34.804Z","updated_at":"2025-04-28T16:14:34.610Z","avatar_url":"https://github.com/gradii.png","language":"TypeScript","readme":"# Fedaco Orm\n\n[![Build Status](https://github.com/gradii/fedaco/workflows/CI/badge.svg)](https://github.com/gradii/fedaco/actions?query=workflow%3ACI)\n\n### How To Use It\n\n- setup a connection\n  ```typescript\n  const db = new DatabaseConfig();\n  db.addConnection({\n    'driver'  : 'sqlite',\n    'database': ':memory:'\n  });\n  db.bootFedaco();\n  db.setAsGlobal();\n  ```\n- define a model\n  ```typescript\n  @Table({\n    tableName: 'user'\n  })\n  class User extends Model {\n    @PrimaryColumn\n    id;\n    \n    @Column()\n    email;\n  \n    @Column()\n    name;\n  \n    @Column()\n    age;\n  \n    @CreatedAtColumn()\n    created_at;\n  \n    @UpdateAtColumn()\n    updated_at;\n  }\n  ```\n- fetch data\n  ```typescript\n  const list = await User.createQuery().get();\n  ```\n\n### Create Table\n\n#### create a user table.\n\n  ```typescript\n  const schemaBuilder = Model.getConnectionResolver()\n    .connection(connectionName)\n    .getSchemaBuilder();\n  ;\n  \n  await schemaBuilder().create('users', table =\u003e {\n    table.increments('id');\n    table.string('email').withUnique();\n    table.string('name');\n    table.string('age');\n  });\n  ```\n\n### Features\n- wrapped driver. unify all driver query api\n- compile query builder to sql\n- decorate to define model\n- soft delete\n- use relationship to link model\n- relation can set dynamic constrain\n- sqlite and mysql support\n\n\n### Notice\necma class with field declaration not in constructor is not support. es2016 is support but es2022 is not.\nfield declaration can use `declare` keyword to declare field in constructor, then the field will not generated in class when enabled es2022\nlike this\n```typescript\n  @Table({\n    tableName: 'user'\n  })\n  class User extends Model {\n    @PrimaryColumn()\n    declare id;\n  }\n  ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgradii%2Ffedaco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgradii%2Ffedaco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgradii%2Ffedaco/lists"}