@openfn/language-mongodb
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

Language MongoDB

Language Pack for building expressions and operations for use with MongoDB.

Documentation

Configuration

View all the required and optional properties for state.configuration in the official configuration-schema definition.

insertDocuments

insertDocuments({
  database: 'yourDb',
  collection: 'yourCollection',
  documents: state => {
    return state.data.map(item => {
      return { name: item.name, age: item.age };
    });
  },
  // callback: (state) => state, // optional
});

findDocuments

findDocuments({
  database: 'yourDb',
  collection: 'yourCollection',
  query: state => {
    return { name: 'stu' };
  },
  // callback: (state) => state, // optional
});

Development

Clone the adaptors monorepo. Follow the Getting Started guide inside to get set up.

Run tests using pnpm run test or pnpm run test:watch

Build the project using pnpm build.

To just build the docs run pnpm build docs

Readme

Keywords

none

Package Sidebar

Install

npm i @openfn/language-mongodb

Weekly Downloads

53

Version

2.0.2

License

LGPLv3

Unpacked Size

71 kB

Total Files

10

Last publish

Collaborators

  • mtuchi
  • elias-ba
  • stuartc-openfn
  • taylordowns2000