c

dynamics.cli

UpdateProcessor

class UpdateProcessor extends AnyRef

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UpdateProcessor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new UpdateProcessor(context: DynamicsContext)

Value Members

  1. val context: DynamicsContext
  2. def findIdAndMkBody(pkcol: String, j: Dictionary[String]): Option[(String, String)]

    Returning None means the pk was not found in the js object.

    Returning None means the pk was not found in the js object. Only handles single value PKs. Removes pk if found. Mutates input object. Body is returned as a string via JSON.stringify.

  3. def mkBatch(inputs: Vector[InputContext[Object]], pkcol: String, mkRequest: (String, String) ⇒ HttpRequest[IO]): IO[String]

    Run the updates but in batch mode.

    Run the updates but in batch mode. (id,body) => HttpRequest.

  4. def mkBatchFromRequests(requests: Vector[(HttpRequest[IO], String)], useChangeSet: Boolean = true): IO[String]

    Run the updates but in batch mode.

    Run the updates but in batch mode. Inputs are: (request, source identifier)

  5. def mkOne(input: InputContext[Object], pkcol: String, update: (String, String) ⇒ IO[String]): IO[String]

    Run an update based on an input js.Object record and print a result.

    Run an update based on an input js.Object record and print a result. This function looks or the PK in the record, extracts it, removes it from the record, stringifies the resulting object as the body then calls the update function provided by the caller.

    pkcol

    PK attribute name in input record. Must be a single valued PK.

    update

    Function to perform the update: (id, body) => F[message body result as string].

    returns

    F[String] that can represent update success or failure.

  6. def updateOneResultReporter(source: String, id: String): PartialFunction[Either[Throwable, String], String]

    Report out on an update attempt.