module Mongo::BulkWrite::Transformable

Defines behavior around transformations.

@api private

@since 2.1.0

Constants

DELETE_MANY

The delete many model constant.

@since 2.1.0

DELETE_MANY_TRANSFORM

Proc to transform delete many ops.

@since 2.1.0

DELETE_ONE

The delete one model constant.

@since 2.1.0

DELETE_ONE_TRANSFORM

Proc to transform delete one ops.

@since 2.1.0

INSERT_ONE

The insert one model constant.

@since 2.1.0

INSERT_ONE_TRANSFORM

Proc to transform insert one ops.

@since 2.1.0

MAPPERS

Document mappers from the bulk api input into proper commands.

@since 2.1.0

REPLACE_ONE

The replace one model constant.

@since 2.1.0

REPLACE_ONE_TRANSFORM

Proc to transfor replace one ops.

@since 2.1.0

UPDATE_MANY

The update many model constant.

@since 2.1.0

UPDATE_MANY_TRANSFORM

Proc to transform update many ops.

@since 2.1.0

UPDATE_ONE

The update one model constant.

@since 2.1.0

UPDATE_ONE_TRANSFORM

Proc to transform update one ops.

@since 2.1.0

Private Instance Methods

transform(name, document) click to toggle source
# File lib/mongo/bulk_write/transformable.rb, line 148
def transform(name, document)
  validate(name, document)
  MAPPERS[name].call(document)
end