mxfactorial icon indicating copy to clipboard operation
mxfactorial copied to clipboard

insert transaction with postgres function

Open mxfactorial opened this issue 1 year ago • 1 comments

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

  1. postgres function: 4
  2. rust sql builder, postgres query: 8
  3. tests: 4
  4. remove unused database schema: 1

17

mxfactorial avatar Apr 26 '24 03:04 mxfactorial

hours worked

requirement writing: 0.5

mxfactorial avatar Apr 26 '24 03:04 mxfactorial

hours worked

16.5

mxfactorial avatar May 04 '24 03:05 mxfactorial

replacing the common table expression with a postgres function dropped a 6,537 character query to 2,698 characters

mxfactorial avatar May 05 '24 14:05 mxfactorial