模块:Mongo::BulkWrite::Combineable Private

包含在:
OrderedCombiner , UnorderedCombiner
定义于:
lib/ Mongo/bulk_write/combineable.rb

Overview

该模块是私有 API 的一部分。 您应尽可能避免使用此模块,因为它将来可能会被删除或更改。

定义有关组合器的行为

由于:

  • 2.1.0

实例属性摘要折叠

实例方法摘要折叠

实例属性详细信息

# requests ⇒ Array<Hash, BSON::Document> (只读)

此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。

返回 requests 提供的请求。

返回:

  • ( Array<Hash, BSON::Document> ) —

    requests 提供的请求。

由于:

  • 2.1.0



26
27
28
# File 'lib/ Mongo/bulk_write/combineable.rb', line 26

def requests
  @requests
end

实例方法详细信息

# has_array_filters? ⇒布尔

此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。

返回一个或多个操作是否指定了 array_filters 选项。

返回:

  • ( Boolean ) —

    一个或多个操作是否指定了 array_filters 选项。

由于:

  • 2.1.0



52
53
54
# File 'lib/ Mongo/bulk_write/combineable.rb', line 52

def has_array_filters?
  @has_array_filters
end

# has_collation? ⇒布尔

此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。

返回一个或多个操作是否指定排序规则选项。

返回:

  • ( Boolean ) —

    一个或多个操作是否指定了排序规则选项。

由于:

  • 2.1.0



46
47
48
# File 'lib/ Mongo/bulk_write/combineable.rb', line 46

def has_collation?
  @has_collation
end

#initialize (requests) ⇒对象

此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。

创建有序组合器。

例子:

创建有序组合器。

OrderedCombiner.new([{ insert_one: { _id: 0 }}])

参数:

  • requests ( Array<Hash, BSON::Document> ) —

    批量请求。

由于:

  • 2.1.0



38
39
40
41
42
# File 'lib/ Mongo/bulk_write/combineable.rb', line 38

def 初始化(requests)
  @requests = requests
  @has_collation = false
  @has_array_filters = false
end