Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Insert a new line at the right place in an array of dictionary in a MongoDB document in one operation #30

@AlexandreDewilde

Description

@AlexandreDewilde

async newLine (documentLink, previousUuid, uuid, content) {

Here is a document :
{_id:..., ..., content: [{uuid:'...' , content}, ......]}
The method newLine add a new dictionary with parameters specified at the right index in content knowing the uuid of the element that precede it
Right now newLine query the index of the previous line and then insert it after the index found.
The goal is to find a way to do this in one operation, and then rewrite applyRequests with bulk write.
So my question is it possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions