-
-
Notifications
You must be signed in to change notification settings - Fork 229
Open
Labels
blockedThis issue is blocked by another issueThis issue is blocked by another issueenhancementNew feature or requestNew feature or requestpostgrestThis issue or pull request is related to postgrestThis issue or pull request is related to postgrest
Description
Is your feature request related to a problem? Please describe.
Currently, if I have a table with a column of type date
, when I query for the data, the runtime type of the data is String
.
For instance, for a date
value of 2024-02-25
, I receive the string "2024-25-02"
.
Describe the solution you'd like
Instead, we should receive DateTime
.
For instance, for a date
value of 2024-02-25
, I should receive the object DateTime(2024, 02, 25)
.
Describe alternatives you've considered
The alternative is to do nothing and let the consumer parse the date. This is how we have to do currently.
void main() async {
final data = await supabase.from('members').select('birthday');
for (final datum in data) {
final birthday = DateTime.parse(datum['birthday']); // Manually parsing the received string
// Do something with `birthday`...
}
}
MarkOSullivan94
Metadata
Metadata
Assignees
Labels
blockedThis issue is blocked by another issueThis issue is blocked by another issueenhancementNew feature or requestNew feature or requestpostgrestThis issue or pull request is related to postgrestThis issue or pull request is related to postgrest