til
TIL: Jul 10
tilengineering
TIL: When using Drizzle ORM, you can conditionally include undefined fields in updates by using the spread operator within the update object, allowing for cleaner partial updates without manual null-checking. Furthermore, always re-throw external API errors (like Paymob) within database transactions to ensure the transaction aborts rather than silently committing partially successful operations.