lpil / lpil/mala

Add functions for deleting all objects and inserting multiple values

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

Nobody has claimed this yet.

Dominant language
Gleam
Stars
8
Forks
1
PR merge metrics
No merged PRs in 30d

Description

This proposal is for three functions to be added:
- `delete_all()` to delete all keys and values from the table atomically
- `insert_many(key: k, values: List(v))` to insert multiple values at once under a single key atomically
- `insert_many_keys_values(objects: List(#(k, List(v)))` to insert multiple keys and values at once atomically

I'm not sure on the names on those last two, so feel free to pick better ones. I'm also not sure if it's worth having a variant for inserting multiple keys and values where each key just has a single value, i.e. `List(#(k, v))`. This doesn't seem as useful since it can be achieved using the multiple values variant above.

Update: looking at the ets function for inserting multiple, it seems like it accepts multiple keys and values as a `List(#(k, v))`, so maybe it does make sense to just have that be the only way to insert multiple rather than the two variants above (since otherwise I guess you'd end up having to transform them into that shape before inserting).

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

No files, tests, or entry points are named. Start by reviewing the existing table API and the ETS multiple-insert behavior mentioned in the issue; settle the function names and input shape, then define completion as atomic delete-all and bulk insertion operations with coverage for the chosen API.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.