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

chore(docs): PG on the client #1215

Merged
merged 6 commits into from May 14, 2024
Merged

chore(docs): PG on the client #1215

merged 6 commits into from May 14, 2024

Conversation

samwillis
Copy link
Contributor

@samwillis samwillis commented May 1, 2024

Preview: https://deploy-preview-128--electric-sql-website.netlify.app

node-postgres driver docs may need editing if a change is made due to this: #1038 (comment)

@samwillis samwillis marked this pull request as ready for review May 1, 2024 19:31
@samwillis samwillis requested a review from kevin-dp May 1, 2024 19:37
docs/integrations/drivers/server/pglite.md Outdated Show resolved Hide resolved
docs/integrations/drivers/server/pglite.md Outdated Show resolved Hide resolved
docs/integrations/drivers/server/postgres.md Outdated Show resolved Hide resolved
docs/integrations/drivers/web/pglite.md Outdated Show resolved Hide resolved
Copy link
Contributor

@thruflo thruflo left a comment

Choose a reason for hiding this comment

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

Great stuff. Have left a few suggestions.

docs/api/clients/typescript.md Outdated Show resolved Hide resolved
docs/top-level-listings/integrations.md Outdated Show resolved Hide resolved
docs/usage/data-modelling/types.md Outdated Show resolved Hide resolved

To do this, we map between [Postgres data types](https://www.postgresql.org/docs/current/datatype.html) and [SQLite data types](https://www.sqlite.org/datatype3.html). In addition, we validate [local writes](../../reference/architecture.md#local-writes) to ensure that the values written into the local database will successfully replicate into Postgres.
In order to support SQLite on the client, we map between [Postgres data types](https://www.postgresql.org/docs/current/datatype.html) and [SQLite data types](https://www.sqlite.org/datatype3.html). In addition, we validate [local writes](../../reference/architecture.md#local-writes) to ensure that the values written into the local database will successfully replicate into Postgres.
Copy link
Contributor

Choose a reason for hiding this comment

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

Strikes me that we really need a bit more context here. I.e.: we need a preamble to explain that type support / mapping varies depending on the client side DB. And a section for Postgres/PGlite and a section for SQLite.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We've not yet made any changes to enable any difference in supported types between the two, the limitations are all driven by SQLite. This page will clearly grow when we unlock more schemas and Postgres types. So I kind of held back from making any wider changes to it when I did the first draft. Maybe we do a further PR to make these changes later?

docs/integrations/drivers/server/pglite.md Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this file is worth a section on what the local database is. I.e.: we're explaining the architecture. It's pretty important in the architecture docs to explain what the local database can be.

So I would add a local database section to this doc.

docs/integrations/drivers/server/pglite.md Outdated Show resolved Hide resolved
docs/integrations/drivers/server/postgres.md Outdated Show resolved Hide resolved
docs/recipes/01-read-only/data-viewer.md Outdated Show resolved Hide resolved
@samwillis samwillis changed the title docs: PG on the client chore(docs): PG on the client May 2, 2024
@samwillis samwillis added the documentation Improvements or additions to documentation label May 6, 2024
@samwillis samwillis merged commit 0747540 into main May 14, 2024
@samwillis samwillis deleted the samwillis/docs-pg-client branch May 14, 2024 07:50
alco pushed a commit that referenced this pull request May 19, 2024
Preview: https://deploy-preview-128--electric-sql-website.netlify.app

node-postgres driver docs may need editing if a change is made due to
this:
#1038 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants