Father Christmas
Explore posts from serversDTDrizzle Team
•Created by Father Christmas on 2/28/2025 in #help
Use DB functions to format data on update e.g. DATE()
Is there a way to use database functions like DATE in SQLite to format a value on update to ensure it is formatted correctly? I have a text field where I store a person's date of birth and want it formatted as YYYY-MM-DD (which DATE does) and doing it on the client side with no verification on the server / db side seems error prone. As with schemas in general it is best to constrain data as much as possible and this data should never be in any other form. Is there a way to make it so? I already have a check that it is a valid date with
but it would be nice if it could use the
$onUpdate
to format any string value date i pass in or is there some better approach?2 replies
Aarktype
•Created by Father Christmas on 2/9/2025 in #questions
What is the ArkType equivalent of Zod's safeParse?
?
18 replies
Could we PLEASE get more docs on subscriptions / observables?
They sem to me extremely useful and important and there is just about no documentation on them at all. Not in jsdoc and the docs page is extremely short and there are almost no comments anywhere. So much of the rest of this wonderful library is extremely well documented - in particular when we can also use the TanStack Query docs but there is this one super useful part that is relegated to a
Extra information Subscriptions / WebSockets
section. Some more detailed explanations of how these things work and behave would be extremely appreciated. Thank you very much for all the hard work thus far and I wish you all the best in the future.2 replies