{"id":13483756,"url":"https://github.com/Crecto/crecto","last_synced_at":"2025-03-27T15:30:31.425Z","repository":{"id":45330672,"uuid":"74188140","full_name":"Crecto/crecto","owner":"Crecto","description":"Database wrapper and ORM for Crystal, inspired by Ecto","archived":false,"fork":false,"pushed_at":"2024-01-03T01:02:43.000Z","size":3972,"stargazers_count":343,"open_issues_count":21,"forks_count":43,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-21T10:55:09.770Z","etag":null,"topics":["crystal","database","database-wrapper","ecto","mysql","orm","orm-framework","postgres"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/Crecto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-11-19T05:02:12.000Z","updated_at":"2025-03-21T00:21:07.000Z","dependencies_parsed_at":"2024-06-20T11:00:55.604Z","dependency_job_id":"966b22c5-61c1-4c42-a1ba-c52036a5f2b8","html_url":"https://github.com/Crecto/crecto","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crecto%2Fcrecto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crecto%2Fcrecto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crecto%2Fcrecto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crecto%2Fcrecto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Crecto","download_url":"https://codeload.github.com/Crecto/crecto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245871682,"owners_count":20686246,"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":["crystal","database","database-wrapper","ecto","mysql","orm","orm-framework","postgres"],"created_at":"2024-07-31T17:01:14.940Z","updated_at":"2025-03-27T15:30:31.019Z","avatar_url":"https://github.com/Crecto.png","language":"Crystal","funding_links":[],"categories":["Crystal","ORM/ODM Extensions"],"sub_categories":[],"readme":"# Crecto\n\n![crecto](crecto.png)\n\n[https://www.crecto.dev/](https://www.crecto.dev/)\n\n[![Build Status](https://travis-ci.org/Crecto/crecto.svg?branch=master)](https://travis-ci.org/Crecto/crecto) [![Join the chat at https://gitter.im/crecto/Lobby](https://badges.gitter.im/crecto/Lobby.svg)](https://gitter.im/crecto/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nRobust database wrapper for Crystal. Inspired by [Ecto](https://github.com/elixir-ecto/ecto) for Elixir language.\n\nWith built in query composer, associations, transactions, validations, constraints, and more.\n\nWebsite with guides and examples - [https://www.crecto.dev/](https://www.crecto.dev/)\n\n\u003c!-- See api docs - \u003chttp://docs.crecto.dev\u003e --\u003e\n\n## Example\n\n```crystal\nuser = User.new\nuser.name = \"Shakira\"\n\nchangeset = Repo.insert(user)\nchangeset.errors.any?\n\ninserted_user = changeset.instance\ninserted_user.name = \"Keanu\"\n\nchangeset = Repo.update(user)\nchangeset.errors.any?\n\nupdated_user = changeset.instance\n\nchangeset = Repo.delete(updated_user)\n```\n\n## Usage and Guides\n\nNew website and API docs coming soon!\n\n\u003c!-- Visit [www.crecto.dev](https://www.crecto.dev) --\u003e\n\n### Benchmarks\n\n- [VS raw crystal-pg](https://github.com/Crecto/crecto/wiki/Benchmarks)\n\n## Development\n\n### Testing\n\nSpecs are located in the `specs` directory. Seeing as this is an ORM, running specs does require a database connection\nof some kind. Copy the `spec/repo.example.cr` file to `spec/repo.cr` and fill in the connection details for your\ndatabase. Then run `crystal spec` to run the specs.\n\nSpecs for all three supported database types can be run using docker-compose. Simply run `docker-compose up` to start\nthe database containers and run the specs.\n\n## Contributing\n\n1. Fork it ( [https://github.com/Crecto/crecto/fork](https://github.com/Crecto/crecto/fork) )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n### Development Notes\n\nWhen developing against crecto, the database must exist prior to\ntesting. There are migrations for each database type in `spec/migrations`,\nand references on how to migrate then in the `.travis.yml` file.\n\nCreate a new file `spec/repo.cr` and create a module name `Repo` to use for testing.\nThere are example repos for each database type in the spec folder: `travis_pg_repo.cr`,\n`travis_mysql_repo.cr`, and `travis_sqlite_repo.cr`\n\nWhen submitting a pull request, please test against all 3 databases.\n\n## Thanks / Inspiration\n\n- [Ecto](https://github.com/elixir-ecto/ecto)\n- [AciveRecord](https://github.com/rails/rails/tree/master/activerecord)\n- [active_record.cr](https://github.com/waterlink/active_record.cr)\n- [crystal-api-backend](https://github.com/dantebronto/crystal-api-backend)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCrecto%2Fcrecto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCrecto%2Fcrecto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCrecto%2Fcrecto/lists"}