Class: Turbopuffer::Models::WriteResult

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/turbopuffer/models/write_result.rb,
sig/turbopuffer/models/write_result.rbs

Constant Summary collapse

Turbopuffer =

Returns:

  • (:WritePerformance)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(billing:, message:, rows_affected:, deleted_ids: nil, patched_ids: nil, performance: nil, rows_deleted: nil, rows_patched: nil, rows_remaining: nil, rows_upserted: nil, upserted_ids: nil, status: :OK) ⇒ Object

Some parameter documentations has been truncated, see Turbopuffer::Models::WriteResult for more details.

The response to a successful write request.

Parameters:

  • billing (Turbopuffer::Models::WriteBilling)

    The billing information for a write request.

  • message (String)

    A message describing the result of the write request.

  • rows_affected (Integer)

    The number of rows affected by the write request.

  • deleted_ids (Array<String, Integer>) (defaults to: nil)

    The IDs of documents that were deleted. Only included when return_affected_ids

  • patched_ids (Array<String, Integer>) (defaults to: nil)

    The IDs of documents that were patched. Only included when return_affected_ids

  • performance (Turbopuffer::Models::WritePerformance) (defaults to: nil)

    The performance information for a write request.

  • rows_deleted (Integer) (defaults to: nil)

    The number of rows deleted by the write request.

  • rows_patched (Integer) (defaults to: nil)

    The number of rows patched by the write request.

  • rows_remaining (Boolean) (defaults to: nil)

    Whether more documents match the filter for partial operations.

  • rows_upserted (Integer) (defaults to: nil)

    The number of rows upserted by the write request.

  • upserted_ids (Array<String, Integer>) (defaults to: nil)

    The IDs of documents that were upserted. Only included when `return_affected_ids

  • status (Symbol, :OK) (defaults to: :OK)

    The status of the request.



# File 'lib/turbopuffer/models/write_result.rb', line 81

Instance Attribute Details

#billingTurbopuffer::Models::WriteBilling

The billing information for a write request.



10
# File 'lib/turbopuffer/models/write_result.rb', line 10

required :billing, -> { Turbopuffer::WriteBilling }

#deleted_idsArray<String, Integer>?

The IDs of documents that were deleted. Only included when return_affected_ids is true and at least one document was deleted.

Returns:

  • (Array<String, Integer>, nil)


35
# File 'lib/turbopuffer/models/write_result.rb', line 35

optional :deleted_ids, -> { Turbopuffer::Internal::Type::ArrayOf[union: Turbopuffer::ID] }

#messageString

A message describing the result of the write request.

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/turbopuffer/models/write_result.rb', line 16

required :message, String

#patched_idsArray<String, Integer>?

The IDs of documents that were patched. Only included when return_affected_ids is true and at least one document was patched.

Returns:

  • (Array<String, Integer>, nil)


42
# File 'lib/turbopuffer/models/write_result.rb', line 42

optional :patched_ids, -> { Turbopuffer::Internal::Type::ArrayOf[union: Turbopuffer::ID] }

#performanceTurbopuffer::Models::WritePerformance?

The performance information for a write request.



48
# File 'lib/turbopuffer/models/write_result.rb', line 48

optional :performance, -> { Turbopuffer::WritePerformance }

#rows_affectedInteger

The number of rows affected by the write request.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


22
# File 'lib/turbopuffer/models/write_result.rb', line 22

required :rows_affected, Integer

#rows_deletedInteger?

The number of rows deleted by the write request.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


54
# File 'lib/turbopuffer/models/write_result.rb', line 54

optional :rows_deleted, Integer

#rows_patchedInteger?

The number of rows patched by the write request.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


60
# File 'lib/turbopuffer/models/write_result.rb', line 60

optional :rows_patched, Integer

#rows_remainingBoolean?

Whether more documents match the filter for partial operations.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


66
# File 'lib/turbopuffer/models/write_result.rb', line 66

optional :rows_remaining, Turbopuffer::Internal::Type::Boolean

#rows_upsertedInteger?

The number of rows upserted by the write request.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


72
# File 'lib/turbopuffer/models/write_result.rb', line 72

optional :rows_upserted, Integer

#statusSymbol, :OK

The status of the request.

Parameters:

  • value (:OK)

Returns:

  • (Symbol, :OK)


28
# File 'lib/turbopuffer/models/write_result.rb', line 28

required :status, const: :OK

#upserted_idsArray<String, Integer>?

The IDs of documents that were upserted. Only included when return_affected_ids is true and at least one document was upserted.

Returns:

  • (Array<String, Integer>, nil)


79
# File 'lib/turbopuffer/models/write_result.rb', line 79

optional :upserted_ids, -> { Turbopuffer::Internal::Type::ArrayOf[union: Turbopuffer::ID] }

Instance Method Details

#to_hash{

Returns:

  • ({)


83
# File 'sig/turbopuffer/models/write_result.rbs', line 83

def to_hash: -> {