Type

Create a domain (required to call the update function) from an object describing the domain.

This is a bit silly, it really just transforms from one representation to the other... we can design this API better, let's try soon?

If your goal is to keep types in separate files, use it like this:

const domain = createDomain(
  'things',
  [
    { type: 'things', definition: require('./things').default },
    { type: 'otherThings', definition: require('./other-things').default }
  ]
 )

... and then use the domain when calling update().

Type

Type: {type: string, definition: any}

Properties
type (string)
definition (any)

invalidate

TODO: on insert... we certainly won't have this document in our cache yet! oplog.on('insert', doc => { const type = doc.ns.match(^${ dbName }\.(.+)$)[1] const key = doc.o2._id })

invalidate
Parameters
type (any)
key (any)