Revisit MySQL `bulk_insert` implementation

Open
#425 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
mariadb, mysql, rust
Domain
database

Research direction

Start by reading the bulk-insert support introduced in issue #414 and the MySQL implementation it added; the payload does not name specific files or tests. Investigate how the implementation handles returned IDs when they are not consecutive, and assess whether MariaDB’s RETURNING support is a viable alternative. Done means a concrete improvement or decision about database support, with appropriate tests.

Written by the indexing model from the issue text.

Description

enhancement

In #414 we've added a support for bulk inserting multiple records into DB at once.

The MySQL implementation is pretty fragile, as it depends on the fact that the newly added records usually have consecutive IDs, but this doesn't necessarily have to be the case. It would be good to have a look whether it can be improved somehow.

(It might be worth considering dropping support for MySQL and focusing on MariaDB instead; given it supports RETURNING clause, it might fix more than one issue.)

Dominant language
Rust
Stars
1.1k
Forks
57
Avg merge
17h 39m
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cot-rs/cot

All issues in cot-rs/cot

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.