@webiny/commodo-fields-storage-db-proxy
TypeScript icon, indicating that this package has built-in type declarations

4.14.0 • Public • Published

@commodo/fields-storage-mongodb

A MongoDB driver for the fields-storage package.

Usage

import { withStorage } from "@commodo/fields-storage";
import { MongoDbDriver, withId } from "@commodo/fields-storage-mongodb";
import { compose } from "ramda";

// Create two functions with a name assigned to them.
const User = compose(
  withId(),
  withStorage({ driver: new MongoDbDriver({ database }) })
  (...)
)(function() {});

Reference

withName(name: string): Function

Creates a new function with a name assigned to it and passed to its instances.

hasName(value: any): boolean

Checks if passed value has a name assigned to it.

getName(value: any): string

Returns a name assigned to the passed value. Returns empty string if none assigned.

Package Sidebar

Install

npm i @webiny/commodo-fields-storage-db-proxy

Weekly Downloads

9

Version

4.14.0

License

MIT

Unpacked Size

29.3 kB

Total Files

21

Last publish

Collaborators

  • webiny