Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 1.8 KB

defer-operations.js.markdown

File metadata and controls

64 lines (45 loc) · 1.8 KB

How to Defer Commands


{NOTE: }

  • Defer allows you to register server commands via the session.

  • All the deferred requests will be stored in the session and sent to the server in a single batch when saveChanges is called, along with any other changes/operations made on the session.
    Thus, all deferred commands are executed as part of the session's saveChanges transaction.

  • In this page:


{PANEL: Defer commands example}

{CODE:nodejs defer_1@client-api\session\HowTo\defer.js /}

{PANEL/}

{PANEL: Commands that can be deferred}

The following commands implement the ICommandData interface and can be deferred:

  • PutCommandDataBase
  • DeleteCommandData
  • DeletePrefixedCommandData
  • PatchCommandData
  • BatchPatchCommandData
  • PutAttachmentCommandData
  • DeleteAttachmentCommandData
  • CopyAttachmentCommandData
  • MoveAttachmentCommandData
  • CountersBatchCommandData
  • PutCompareExchangeCommandData
  • DeleteCompareExchangeCommandData
  • CopyTimeSeriesCommandData
  • TimeSeriesBatchCommandData
  • ForceRevisionCommandData {PANEL/}

{PANEL: Syntax}

{CODE:nodejs syntax@client-api\session\HowTo\defer.js /}

Parameter Type Description
commands ICommandData[] Commands to be executed

{PANEL/}

Related articles

Session