Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the batch parameter a bit more obvious #87

Merged
merged 2 commits into from
Feb 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Database/PostgreSQL/PQTypes/Model/Migration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ data MigrationAction m =
-- Name of the table that the cursor is associated with. It has to be the same as in the
-- cursor SQL, see the second parameter.
--
-- SQL that will be used for the cursor.
-- SQL providing a list of primary keys from the associated table that will be used for the cursor.
--
-- Function that takes a list of primary keys provided by the cursor SQL and
-- runs an arbitrary computation within MonadDB. The function might be called
-- repeatedly depending on the number of primary keys. See the last argument.
-- Function that takes a batch of primary keys provided by the cursor SQL and runs an arbitrary computation
-- within MonadDB. The function might be called repeatedly depending on the batch size and total number of
-- selected primary keys. See the last argument.
--
-- Number of primary keys fetched at once by the cursor SQL.
-- Batch size of primary keys to be fetched at once by the cursor SQL and be given to the modification function.
-- To handle multi-column primary keys, the following needs to be done:
--
-- 1. Get the list of tuples from PostgreSQL.
Expand Down