andreasb
andreasb
Explore posts from servers
XXata
Created by andreasb on 8/12/2024 in #help
Immutability & tamper-proofing?
Not sure if this is an interesting note @kostas , but XTDB (an immutable SQL database) is building out their v2.x to have Postgres compatibility (alpha/beta docs): https://pr-3496.d2zcybuz6k9g4m.amplifyapp.com/drivers/postgres/getting-started.html They're also looking for design partners, in case Xata would like to branch into database-as-a-value thinking (see bottom of their frontpage): https://xtdb.com/
8 replies
XXata
Created by andreasb on 8/12/2024 in #help
Immutability & tamper-proofing?
Looking forward to hearing more about this when the timing is right, @kostas – thank you!
8 replies
XXata
Created by andreasb on 8/12/2024 in #help
Immutability & tamper-proofing?
Another reason why this might be worth your while is the sunsetting of Amazon's QLDB (quantum ledger db) offering, leaving a lot of customers without a proper alternative. AWS' recommendation is Postgres with triggers, but that won't be enough for many cases (such as ours).
8 replies
XXata
Created by andreasb on 8/12/2024 in #help
Immutability & tamper-proofing?
Thanks for the comprehensive answer, @kostas! For our specific use case, having "just" auditing would maybe suffice, but as long as the audit log tables are mutable (or the triggers disabling updates can easily be turned off), we're back to square one. Having some replication like CDC is basically the same, as long as the target db is mutable the audit/replication cannot be trusted either. The main issue I see with using the audit log is that the database value is no longer the source of truth, but rather the contents of the audit log, so the verification/"reconciliation" of values and log entries can quickly become either a lot of manual work or require quite some engineering. Our use case is that of a financial application where monetary values and certain amounts/counts are important to easily check if have been (maliciously) mutated/tampered with when they shouldn't have been. Would be the same with a previous health-related application I was contracted on, audit logs are fine but not if they cannot be trusted.
8 replies
KKinde
Created by andreasb on 2/5/2024 in #💻┃support
Auth check in +layout.server.ts – known issues?
Thanks for the feedback, both of you! I think it's really neat that you have a SvelteKit SDK, very stoked about it!
6 replies
WWasp-lang
Created by andreasb on 1/30/2024 in #🙋questions
Tightly coupled to React?
Neat! I've signed up, looking forward to updates! 😄
7 replies
WWasp-lang
Created by andreasb on 1/30/2024 in #🙋questions
Tightly coupled to React?
Absolutely! Makes a lot of sense to gain traction. Yeah, been working professionally with Svelte for the last 3+ years. Before that it was mainly React since ~2015, was mindblown by the React Native talk after a few years of dabbling with native mobile dev. But that excitement for the React ecosystem has faded away for me over the last 6-7 years, and now it's just a standard line in most job ads it seems.
7 replies
WWasp-lang
Created by andreasb on 1/30/2024 in #🙋questions
Tightly coupled to React?
Thanks for the quick response, @martinsos! Fully understand that it's React-first for now, looking forward to following the progress here. Something Rails-like is super welcome in this space, I just haven't touched React in many years 😅
7 replies
DTDrizzle Team
Created by jakeleventhal on 1/11/2024 in #help
How to use sql template strings
@jakeleventhal Could this be helpful? Some very preliminary testing from my side, but it does seem to work for my "re-arrange sort_order for images in my gallery" use case.
const statementUpdateSortOrder = sql.join(
array.map((item, index) =>
sql`WHEN id = ${item.id} THEN ${index}::integer`
),
sql` `
);

await db.update(TableName)
.set({ sort_order: sql`CASE ${statementUpdateSortOrder} END` })
.where(inArray(TableName.id, array.map(item => item.id)));
const statementUpdateSortOrder = sql.join(
array.map((item, index) =>
sql`WHEN id = ${item.id} THEN ${index}::integer`
),
sql` `
);

await db.update(TableName)
.set({ sort_order: sql`CASE ${statementUpdateSortOrder} END` })
.where(inArray(TableName.id, array.map(item => item.id)));
55 replies
DTDrizzle Team
Created by jakeleventhal on 1/11/2024 in #help
How to use sql template strings
Ait! Thanks for answering. Maybe Angelelz has come up with something, will check back a bit later 🙂
55 replies
DTDrizzle Team
Created by jakeleventhal on 1/11/2024 in #help
How to use sql template strings
Did you end up with a working (and perhaps non-susceptible to injections) solution to this? 🙂
55 replies