Class: Turbopuffer::Models::Limit

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/turbopuffer/models/limit.rb

Defined Under Namespace

Classes: Per

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(total:, per: nil) ⇒ Object

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

Limits the documents returned by a query.

Parameters:

  • total (Integer)

    Limits the total number of documents returned.

  • per (Turbopuffer::Models::Limit::Per) (defaults to: nil)

    Limits the number of documents with the same value for a set of attributes (the



# File 'lib/turbopuffer/models/limit.rb', line 19

Instance Attribute Details

#perTurbopuffer::Models::Limit::Per?

Limits the number of documents with the same value for a set of attributes (the “limit key”) that can appear in the results.



17
# File 'lib/turbopuffer/models/limit.rb', line 17

optional :per, -> { Turbopuffer::Limit::Per }

#totalInteger

Limits the total number of documents returned.

Returns:

  • (Integer)


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

required :total, Integer