Skip to content

allow bulk inserts #120

@endel

Description

@endel

It should be possible to perform multiple create operations in a single request.

A very common issue is to seed a large collection, via hook db:seed.

Example with JavaScript client:

hook.collection('items').create([
  {name: "one"},
  {name: "two"},
  {name: "three"}
])

Response

[
  {_id: 1, name: "one", created_at: "...", updated_at: "..."},
  {_id: 2, name: "two", created_at: "...", updated_at: "..."},
  {_id: 3, name: "three", created_at: "...", updated_at: "..."}
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions