{"id":21232438,"url":"https://github.com/wangzuo/arel","last_synced_at":"2025-08-02T07:10:36.579Z","repository":{"id":52208782,"uuid":"96028818","full_name":"wangzuo/arel","owner":"wangzuo","description":"rails/arel in javascript","archived":false,"fork":false,"pushed_at":"2022-01-23T07:15:22.000Z","size":251,"stargazers_count":9,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T11:00:41.006Z","etag":null,"topics":["activerecord","javascript","rails","sql"],"latest_commit_sha":null,"homepage":"https://wangzuo.github.io/arel","language":"JavaScript","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/wangzuo.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}},"created_at":"2017-07-02T14:33:28.000Z","updated_at":"2023-04-24T16:28:16.000Z","dependencies_parsed_at":"2022-09-14T06:10:40.339Z","dependency_job_id":null,"html_url":"https://github.com/wangzuo/arel","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/wangzuo/arel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangzuo%2Farel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangzuo%2Farel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangzuo%2Farel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangzuo%2Farel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangzuo","download_url":"https://codeload.github.com/wangzuo/arel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangzuo%2Farel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268348090,"owners_count":24236292,"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-08-02T02:00:12.353Z","response_time":74,"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":["activerecord","javascript","rails","sql"],"created_at":"2024-11-20T23:51:40.705Z","updated_at":"2025-08-02T07:10:36.558Z","avatar_url":"https://github.com/wangzuo.png","language":"JavaScript","readme":"# Arel\n[![npm](https://img.shields.io/npm/v/arel.svg)](https://www.npmjs.com/package/arel)\n[![Build Status](https://travis-ci.org/wangzuo/arel.svg?branch=master)](https://travis-ci.org/wangzuo/arel) \n[![codecov](https://codecov.io/gh/wangzuo/arel/branch/master/graph/badge.svg)](https://codecov.io/gh/wangzuo/arel) \n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) [![Greenkeeper badge](https://badges.greenkeeper.io/wangzuo/arel.svg)](https://greenkeeper.io/)\n\n[rails/arel](https://github.com/rails/arel) in javascript\n\n### Installation\n``` sh\nnpm i arel --save\n```\n\n### Usage\n``` javascript\nimport * as Arel from 'arel'; // es6\n// const Arel = require('arel');\n\nconst users = new Arel.Table('users');\nconst query = users.project(Arel.sql('*'));\nquery.toSql(); // =\u003e SELECT * FROM \"users\"\n```\n\n### More examples\n``` javascript\nusers.project(users.column('id'))\n// =\u003e SELECT \"users\".\"id\" FROM \"users\"\n\nusers.where(users.column('name').eq('amy'))\n// =\u003e SELECT FROM \"users\" WHERE \"users\".\"name\" = 'amy'\n\nconst photos = new Arel.Table('photos');\nusers.join(photos).on(users.column('id').eq(photos.column('user_id')))\n// =\u003e SELECT FROM \"users\" INNER JOIN \"photos\" ON \"users\".\"id\" = \"photos\".\"user_id\"\n```\n\n### License\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangzuo%2Farel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangzuo%2Farel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangzuo%2Farel/lists"}