Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

add domain representations #655

Merged
merged 11 commits into from
Jul 2, 2023
Merged

Conversation

steve-chavez
Copy link
Member

@steve-chavez steve-chavez commented Jun 29, 2023

@steve-chavez steve-chavez force-pushed the domain-reps branch 2 times, most recently from d59e82d to 4e68513 Compare June 29, 2023 01:57
Copy link
Contributor

@aljungberg aljungberg left a comment

Choose a reason for hiding this comment

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

We might want a note to remind the dev to reload the schema cache after adding new domains or casts?

docs/references/api/domain_representations.rst Outdated Show resolved Hide resolved
docs/references/api/domain_representations.rst Outdated Show resolved Hide resolved
docs/references/api/domain_representations.rst Outdated Show resolved Hide resolved
docs/references/api/domain_representations.rst Outdated Show resolved Hide resolved
docs/references/api/domain_representations.rst Outdated Show resolved Hide resolved
Domain Representations
######################

Domain Representations separates "how the data is presented" from "how the data is stored". It works by creating `domains <https://www.postgresql.org/docs/current/sql-createdomain.html>`_ and `casts <https://www.postgresql.org/docs/current/sql-createcast.html>`_, the latter act on the former to present and receive the data in different formats.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nicely done! I struggled with coming up with a concise way to describe the feature.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Actually I stole some phrases from your opening issue 😃

I wanted to remove the "latter/former" words but I found it hard. Although it seems ok leaving it this way.

I've just addressed your latest reviews. LMK if you approve and I'll merge 🚀.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also clarified the advantages (focusing on views) and "why not create a type?".

Copy link
Contributor

@aljungberg aljungberg left a comment

Choose a reason for hiding this comment

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

Looks good!

@steve-chavez steve-chavez merged commit ab8ccf4 into PostgREST:main Jul 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants