DeleteOperation

Operation defaults are dryRun(false), grant(null), skipAcl(false).

dryRun(bool = true)
execute()
grant(level)
skipAcl(bool = true)

const Items = org.objects.c_items;

return Items.deleteOne({c_key: 'unique key'})
  .skipAcl()
  .grant(consts.accessLevels.delete)
  .execute();

DeleteOperation.dryRun(bool = true)

The operation performs a dry run. Though no documents are deleted, before triggers are called.

Arguments

  • bool (Boolean)

Returns

this

DeleteOperation.execute()

Executes the operation.

Returns

Boolean true if the instance was deleted.

DeleteOperation.grant(level)

Sets the grant level for the operation.

Arguments

  • level (Number)

Returns

this

DeleteOperation.skipAcl(bool = true)

Skips acl checks.

Arguments

  • bool (Boolean)

Returns

this