accent/lib/utils
Simon Prévost 3325e5e9d8
Add batched SQL for insert/update operations (#306)
This introduce a new way of doing "migration" of data based on the
operation table. Before, we simply executed the SQL query as the
migration were run. Like for a "new" operation, we did an insert of a
"transactions" row and an update to the "operations" table _for each
entry in the synced file._ For a file containing 1000 keys, we did a
total of 2000 SQL queries.

After this commit, we only do 2 SQL queries (well 4 since we batch the
SQL params by 500). By aggregating operation like {:update_all,
operation.id, %{synced: true}}, we are able to batch the operations
efficiently.

This results in a much faster sync/add translations/correct/uncorrect
operations.
2022-08-29 07:50:55 -04:00
..
pretty_float.ex Add Credo.Check.Readability.AliasOrder to credo config 2018-12-08 19:57:20 -05:00
secure_random.ex Add batched SQL for insert/update operations (#306) 2022-08-29 07:50:55 -04:00