-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a type for json and jsonb columns #8
Comments
What type would the pgo.json function take here? I do not want to add a dep on any specific JSON library as we don't yet have any that have been thoroughly designed. This could also be a function in another library while we work out a more long-term API here. |
I think we could now add dep to If someone wonders how to support value
|> json.to_string()
|> pgo.text() |
I suspect you don't even need to do that, the iodata representation might be supported by pgo. Sounds like we don't need to do anything then as we can already supply JSON strings. Thanks all |
Yes, but the only way to put a |
That's how JSON works, I'm not sure why you think it's ugly. |
My bad, I was unclear. I meant, it could be cool to have a native function to like Pushing json as string is perfectly fine for me. |
Let's do that after the migration to OTP27 is done so we can drop the thoas dep in gleam_json. |
I need to add a json function for inserting json to the database.
I'm assuming the best thing to do is to add a function like
pgo.int
e.g.
I would need to add a dependency on gleam_json to get a JSON type. is this acceptable?
I guess the other option would be to work with dynamic
The text was updated successfully, but these errors were encountered: