Class: Turbopuffer::Namespace

Inherits:
Resources::Namespaces show all
Defined in:
lib/turbopuffer/namespace.rb

Instance Method Summary collapse

Methods inherited from Resources::Namespaces

#delete_all, #explain_query, #hint_cache_warm, #metadata, #multi_query, #query, #recall, #schema, #update_schema, #write

Constructor Details

#initialize(client, namespace) ⇒ Namespace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Namespace.

Parameters:



16
17
18
19
20
# File 'lib/turbopuffer/namespace.rb', line 16

def initialize(client, namespace)
  client = client.dup
  client.instance_variable_set(:@default_namespace, namespace)
  super(client: client)
end

Instance Method Details

#idString

Returns the namespace ID.

Returns:

  • (String)


8
9
10
# File 'lib/turbopuffer/namespace.rb', line 8

def id
  @client.default_namespace
end