{"id":13878852,"url":"https://github.com/supabase-community/postgrest-rb","last_synced_at":"2026-03-04T08:01:02.266Z","repository":{"id":52032076,"uuid":"363437182","full_name":"supabase-community/postgrest-rb","owner":"supabase-community","description":"Isomorphic Ruby client for PostgREST.","archived":false,"fork":false,"pushed_at":"2024-08-01T23:47:41.000Z","size":58,"stargazers_count":40,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-26T18:46:12.668Z","etag":null,"topics":["postgrest","ruby","supabase"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/supabase-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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-05-01T15:01:19.000Z","updated_at":"2025-10-01T17:02:15.000Z","dependencies_parsed_at":"2024-01-13T20:47:17.452Z","dependency_job_id":"92cb8cf6-1944-470f-8436-a46379081b25","html_url":"https://github.com/supabase-community/postgrest-rb","commit_stats":{"total_commits":48,"total_committers":2,"mean_commits":24.0,"dds":0.02083333333333337,"last_synced_commit":"a2190eb2d9a45d5944a75b83eff24381a7930f46"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/supabase-community/postgrest-rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fpostgrest-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fpostgrest-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fpostgrest-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fpostgrest-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase-community","download_url":"https://codeload.github.com/supabase-community/postgrest-rb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Fpostgrest-rb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30075905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["postgrest","ruby","supabase"],"created_at":"2024-08-06T08:02:02.018Z","updated_at":"2026-03-04T08:01:02.245Z","avatar_url":"https://github.com/supabase-community.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# PostgREST\n\n## Status\n\n[![Build Status](https://api.travis-ci.com/marcelobarreto/postgrest-rb.svg?branch=master)](https://travis-ci.com/marcelobarreto/postgrest-rb)\n[![Gem Version](https://badge.fury.io/rb/postgrest.svg)](https://badge.fury.io/rb/postgrest)\n[![Code Climate](https://codeclimate.com/github/marcelobarreto/postgrest-rb.svg)](https://codeclimate.com/github/marcelobarreto/postgrest-rb)\n[![Code Climate](https://codeclimate.com/github/marcelobarreto/postgrest-rb/coverage.svg)](https://codeclimate.com/github/marcelobarreto/postgrest-rb)\n[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)\n[![RubyGems](https://img.shields.io/gem/dt/postgrest.svg?style=flat)](https://rubygems.org/gems/postgrest)\n\nRuby client for [PostgREST](https://postgrest.org/)\n\nThis gem is under development, any help are welcome :muscle:\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'postgrest'\n```\n\nAnd then execute:\n\n`$ bundle install`\n\nOr install it yourself as:\n\n`$ gem install postgrest`\n\n## Usage\n\n### Configuration\n\n```ruby\ndb = Postgrest::Client.new(url: url, headers: headers, schema: schema)\n```\n\n### Selecting\n\n```ruby\n# Basic select\n\ndb.from('todos').select('*').execute\n# or just db.from('todos').select\n\n#\u003cPostgrest::Responses::GetResponse GET OK data=[{\"id\"=\u003e1, \"title\"=\u003e\"foo\", \"completed\"=\u003efalse}, {\"id\"=\u003e2, \"title\"=\u003e\"foo\", \"completed\"=\u003efalse}]\u003e\n\n# Selecting just one or more fields\ndb.from('todos').select(:title).execute\n\n#\u003cPostgrest::Responses::GetResponse GET OK data=[{\"title\"=\u003e\"foo\"}, {\"title\"=\u003e\"foo\"}]\u003e\n\n```\n\n#### Renaming a column name\n\nYou have the ability to alias the name of the column you want doing as follows:\n\n```ruby\ndb.from('todos').select('name:title').eq(id: 112).execute\n#\u003cPostgrest::Responses::GetResponse GET OK data=[{\"name\"=\u003e\"Go to the gym\"}]\u003e\n```\n\n### Querying\n\n```ruby\ndb.from('todos').select('*').eq(id: 100).execute\n#\u003cPostgrest::Responses::GetResponse GET OK data=[{\"id\" =\u003e 100, \"title\"=\u003e\"foo\", \"completed\" =\u003e true}}]\u003e\n\n\ndb.from('todos').select('*').neq(id: 100).execute\n#\u003cPostgrest::Responses::GetResponse GET OK data=[{\"id\" =\u003e 101, \"title\"=\u003e\"foo\", \"completed\" =\u003e true}}]\u003e\n```\n\n### Ordering\n\nTODO\n\n### Relationships\n\nTODO\n\n### Full query example\n\n```ruby\ndb.from('todos').select(:id, :title).owners(:name, as: :owner).workers(:name, as: :worker).in(id: [112, 113]).order(id: :asc).execute\n\n#\u003cPostgrest::Responses::GetResponse GET OK data=[{\"id\"=\u003e112, \"title\"=\u003e\"Eat something\", \"owner\"=\u003e{\"name\"=\u003e\"Marcelo\"}, \"worker\"=\u003e{\"name\"=\u003e\"Marcelo\"}}, {\"id\"=\u003e113, \"title\"=\u003e\"Go to the gym\", \"owner\"=\u003e{\"name\"=\u003e\"Marcelo\"}, \"worker\"=\u003enil}]\u003e\n```\n\n### Inserting\n\n```ruby\ndb.from('todos').insert(title: 'Go to the gym', completed: false).execute\n\n#\u003cPostgrest::Responses::PostResponse POST Created data=[{\"id\"=\u003e1, \"title\"=\u003e\"Go to the gym\", \"completed\"=\u003efalse}]\u003e\n\ndb.from('todos').upsert(id: 1, title: 'Ok, I wont go to the gym', completed: true).execute\n\n#\u003cPostgrest::Responses::PostResponse POST Created data=[{\"id\"=\u003e1, \"title\"=\u003e\"Ok, I wont go to the gym\", \"completed\"=\u003etrue}]\u003e\n\n# Inserting multiple rows at once\ndb.from('todos').insert([\n  { title: 'Go to the gym', completed: false },\n  { title: 'Walk in the park', completed: true },\n]).execute\n\n#\u003cPostgrest::Responses::PostResponse POST Created data=[{\"id\"=\u003e110, \"title\"=\u003e\"Go to the gym\", \"completed\"=\u003efalse}, {\"id\"=\u003e111, \"title\"=\u003e\"Walk in the park\", \"completed\"=\u003etrue}]\u003e\n\n```\n\n### Updating\n\n```ruby\n\n# Query before update\n\ndb.from('todos').update(title: 'foobar').eq(id: 109).execute\n\n#\u003cPostgrest::Responses::PatchResponse PATCH OK data=[{\"id\"=\u003e106, \"title\"=\u003e\"foo\", \"completed\"=\u003efalse}]\u003e\n\n# Update all rows\n\ndb.from('todos').update(title: 'foobar').execute\n\n#\u003cPostgrest::Responses::PatchResponse PATCH OK data=[{\"id\"=\u003e107, \"title\"=\u003e\"foobar\", \"completed\"=\u003efalse}, {\"id\"=\u003e1, \"title\"=\u003e\"foobar\", \"completed\"=\u003etrue}, {\"id\"=\u003e110, \"title\"=\u003e\"foobar\", \"completed\"=\u003efalse}, {\"id\"=\u003e111, \"title\"=\u003e\"foobar\", \"completed\"=\u003etrue}, {\"id\"=\u003e106, \"title\"=\u003e\"foobar\", \"completed\"=\u003efalse}]\u003e\n```\n\n### Deleting\n\n```ruby\n# Querying before delete\n\ndb.from('todos').delete.eq(id: 109).execute\n#\u003cPostgrest::Responses::DeleteResponse DELETE OK data=[{\"id\"=\u003e109, \"title\"=\u003e\"Go to the gym\", \"completed\"=\u003efalse}]\u003e\n\n# OR deleting everything\n\ndb.from('todos').delete.execute\n\n#\u003cPostgrest::Responses::DeleteResponse DELETE OK data=[{\"id\"=\u003e110, \"title\"=\u003e\"Go to the gym\", \"completed\"=\u003efalse}, {\"id\"=\u003e111, \"title\"=\u003e\"Go to the gym\", \"completed\"=\u003efalse}]\u003e\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/marcelobarreto/postgrest.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase-community%2Fpostgrest-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase-community%2Fpostgrest-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase-community%2Fpostgrest-rb/lists"}