{"id":13812164,"url":"https://github.com/supabase/postgrest-dart","last_synced_at":"2025-10-01T10:31:22.181Z","repository":{"id":38084949,"uuid":"294006729","full_name":"supabase/postgrest-dart","owner":"supabase","description":"Dart client for PostgREST","archived":true,"fork":false,"pushed_at":"2023-05-13T01:28:25.000Z","size":300,"stargazers_count":137,"open_issues_count":0,"forks_count":38,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-29T13:27:40.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://supabase.com","language":"Dart","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.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},"funding":{"github":["supabase"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-09-09T04:55:43.000Z","updated_at":"2024-10-25T08:00:44.000Z","dependencies_parsed_at":"2023-09-23T05:08:55.835Z","dependency_job_id":"a0b0c11b-6131-4832-b49f-bfcf47fe62b1","html_url":"https://github.com/supabase/postgrest-dart","commit_stats":{"total_commits":294,"total_committers":19,"mean_commits":"15.473684210526315","dds":0.6768707482993197,"last_synced_commit":"d60797c6e0422e31b92b56721d6ff712bb9e83f7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgrest-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgrest-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgrest-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgrest-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase","download_url":"https://codeload.github.com/supabase/postgrest-dart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234757134,"owners_count":18881935,"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-08-04T04:00:48.284Z","updated_at":"2025-10-01T10:31:21.923Z","avatar_url":"https://github.com/supabase.png","language":"Dart","funding_links":["https://github.com/sponsors/supabase"],"categories":["Postgrest"],"sub_categories":[],"readme":"# Postgrest Dart\n\n\u003e **Warning**\n\u003e This repository has been moved to the [supabase-flutter repo](https://github.com/supabase/supabase-flutter/tree/main/packages/postgrest).\n\nDart client for [PostgREST](https://postgrest.org). The goal of this library is to make an \"ORM-like\" restful interface.\n\n## Using\n\nThe usage should be the same as postgrest-js except:\n\n- `data` is directly returned by awaiting the query when count option is not specified.\n- Exceptions will not be returned within the response, but will be thrown. \n- `is_` and `in_` filter methods are suffixed with `_` sign to avoid collisions with reserved keywords.\n\nYou can find detail documentation from [here](https://supabase.com/docs/reference/dart/select).\n\n#### Reading your data\n\n```dart\nimport 'package:postgrest/postgrest.dart';\n\nfinal url = 'https://example.com/postgrest/endpoint';\nfinal client = PostgrestClient(url);\nfinal response = await client.from\u003cPostgrestList\u003e('users').select();\n```\n\n#### Reading your data and converting it to an object\n  \n```dart\nimport 'package:postgrest/postgrest.dart';\n\nfinal url = 'https://example.com/postgrest/endpoint';\nfinal client = PostgrestClient(url);\nfinal response = await client\n    .from('users')\n    .select\u003cPostgrestList\u003e()\n    .withConverter((data) =\u003e data.map(User.fromJson).toList());\n```\n\n#### Insert records\n\n```dart\nimport 'package:postgrest/postgrest.dart';\n\nfinal url = 'https://example.com/postgrest/endpoint';\nfinal client = PostgrestClient(url);\ntry {\n  await client.from('users')\n    .insert([\n      {'username': 'supabot', 'status': 'ONLINE'}\n    ]);\n} on PostgrestException catch (error, stacktrace) {\n  // handle a PostgrestError\n  print('$error \\n $stacktrace');\n} catch (error, stacktrace) {\n  // handle other errors\n  print('$error \\n $stracktrace');\n}\n```\n\n#### Update a record\n\n```dart\nimport 'package:postgrest/postgrest.dart';\n\nfinal url = 'https://example.com/postgrest/endpoint';\nfinal client = PostgrestClient(url);\nawait client.from('users')\n      .update({'status': 'OFFLINE'})\n      .eq('username', 'dragarcia');\n```\n\n#### Delete records\n\n```dart\nimport 'package:postgrest/postgrest.dart';\n\nfinal url = 'https://example.com/postgrest/endpoint';\nfinal client = PostgrestClient(url);\nawait client.from('users')\n      .delete()\n      .eq('username', 'supabot');\n```\n\n#### Get Count\n\n```dart\nimport 'package:postgrest/postgrest.dart';\n\nfinal url = 'https://example.com/postgrest/endpoint';\nfinal client = PostgrestClient(url);\nfinal response = await client.from('countries')\n      .select\u003cPostgrestResponse\u003e('*', FetchOptions(count: CountOption.exact));\nfinal data = response.data;\nfinal count = response.count;\n```\n\n## Contributing\n\n- Fork the repo on [GitHub](https://github.com/supabase/postgrest-dart)\n- Clone the project to your own machine\n- Commit changes to your own branch\n- Push your work back up to your fork\n- Submit a Pull request so that we can review your changes and merge\n\n## License\n\nThis repo is licensed under MIT.\n\n## Credits\n\n- https://github.com/supabase/postgrest-js - ported from postgrest-js library\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fpostgrest-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase%2Fpostgrest-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fpostgrest-dart/lists"}