Skip to content
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

[guide] add a section for JSON serialization with Dry::Types::Constructor #283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JulienAmoros
Copy link
Contributor

With this PR, we add a section that explain a little bit more what can be found here: https://discourse.rom-rb.org/t/methods-of-storing-arrays-in-mysql/305

Any feedback will be really appreciated 😄

@@ -0,0 +1,51 @@
---
chapter: SQL How To
title: Store data as JSON Strings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the general concept of this guide, but it may beess confusing if we used an example other than JSON so Postgres users can benefit. What about using an XML snippet, or CSV?

in such case you can use [built-in PG types](https://rom-rb.org/4.0/learn/sql/schemas/#postgresql-types)).

You can use `Dry::Types:Constructor` in order to make your own way to process data, and give it to your ROM::Relation
in order that ROM uses this to store and read this data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also explain the concept of "read" types here?

@solnic
Copy link
Member

solnic commented Jan 27, 2020

It would be really great to have this on the website. Would you be able to port it to source/guides (no version in the path) and we could review it again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants