How to post range type? #1960
-
How to POST range data types like this?
|
Beta Was this translation helpful? Give feedback.
Answered by
steve-chavez
Sep 22, 2021
Replies: 2 comments 1 reply
-
Here's an example using a create table ranges (
id integer primary key,
range numrange
); http POST 'localhost:3000/ranges' <<JSON
{"id": 5, "range": "(15,21]"}
JSON
http GET 'localhost:3000/ranges?id=eq.5'
[
{
"id": 5,
"range": "(15,21]"
}
] |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
steve-chavez
-
Ok, thanks!
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's an example using a
numrange