-
Notifications
You must be signed in to change notification settings - Fork 120
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
Conversation
dfa0bf9
to
d5dda94
Compare
d5dda94
to
f108ae2
Compare
There was a problem hiding this 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.
|
||
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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/reference/architecture.md
Outdated
There was a problem hiding this comment.
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.
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)
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)