AD Amorim
what is the ideal column type to store the content of a Tiptap editor?
I’m building page the saves the whole document provided by the rich text editor using tiptap.
I was wondering if the ideal column type would be text or json. Not sure about the the pros and cons of both when considered things like performance, amount of data it can store, compatibility with other databases like SQLite etc.
My current requirement is just to query the whole document at page load and update it when the user changes the content with some debouncing.
Appreciate any suggestions!
10 replies
how to make am update request without returning Xata metadata?
The code below calls:
const proj = await xata.db.project.update(id, data);
I would like to remove the metadata that comes from it in order to avoid parsing errors from zod at:
project.parse(proj)
Is that possible? I know we can do this when getting data but not sure how the update transaction does that.
5 replies