Skip to content
This repository has been archived by the owner on May 13, 2023. It is now read-only.

Create PostgrestResponse class #4

Closed
phamhieu opened this issue Oct 1, 2020 · 3 comments
Closed

Create PostgrestResponse class #4

phamhieu opened this issue Oct 1, 2020 · 3 comments
Assignees
Labels

Comments

@phamhieu
Copy link
Member

phamhieu commented Oct 1, 2020

Feature request

Is your feature request related to a problem? Please describe.

Right now, the library returns a Future<Map<String, dynamic>> response object. It'll be more convenient for us to have a response with custom class.

Describe the solution you'd like

Follow postgrest-js, we want to have a response class as below:

class PostgrestError {
  String message;
  String details;
  String hint;
  String code;
}

class PostgrestResponse {
  PostgrestError error;
  int status;
  String statusText;
  dynamic body;
}
@phamhieu phamhieu added enhancement New feature or request hacktoberfest labels Oct 1, 2020
@kiwicopple kiwicopple added this to Large in Hacktoberfest Oct 1, 2020
@kiwicopple kiwicopple added the dart label Oct 1, 2020
@duythien0912
Copy link
Contributor

😆 I would like to take this issue too could you assign me ^^

@soedirgo
Copy link
Member

soedirgo commented Oct 4, 2020

@phamhieu This is a bit late but I think body should be data following supabase/supabase-js#32, body was only there for backward compat.

It's a bit of a nitpick, but will save us some work in the future if we want consistent format across languages.

@phamhieu
Copy link
Member Author

phamhieu commented Oct 4, 2020

Thanks @soedirgo for pointing that out. I will take care of it in the next refactor commit.

@kiwicopple kiwicopple removed this from Done in Hacktoberfest Dec 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants