mxfactorial
mxfactorial copied to clipboard
insert transaction with postgres function
current
transactions inserted with massive cte across transaction, transaction_item and approval tables in a postgres transaction
expected
transactions inserted with postgres function accepting a composite type of transaction, transaction_item and approval table values
hourly estimate
- postgres function: 4
- rust sql builder, postgres query: 8
- tests: 4
- remove unused database schema: 1
17
hours worked
requirement writing: 0.5
hours worked
16.5
replacing the common table expression with a postgres function dropped a 6,537 character query to 2,698 characters