Module: Rxer::Api::V1::Indexes

Defined in:
lib/rxer/api/v1/indexes.rb

Overview

Working with Indexes

Instance Method Summary collapse

Instance Method Details

#create_index(db_name:, ns_name:, payload:) ⇒ Object



12
13
14
# File 'lib/rxer/api/v1/indexes.rb', line 12

def create_index(db_name:, ns_name:, payload:)
  post(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/indexes", payload: payload)
end

#drop_index(db_name:, ns_name:, index:) ⇒ Object



20
21
22
# File 'lib/rxer/api/v1/indexes.rb', line 20

def drop_index(db_name:, ns_name:, index:)
  delete(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/idexes/#{index}")
end

#list_indexes(db_name:, ns_name:) ⇒ Object



8
9
10
# File 'lib/rxer/api/v1/indexes.rb', line 8

def list_indexes(db_name:, ns_name:)
  get(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/idexes")
end

#update_index(db_name:, ns_name:, payload:) ⇒ Object



16
17
18
# File 'lib/rxer/api/v1/indexes.rb', line 16

def update_index(db_name:, ns_name:, payload:)
  put(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/indexes", payload: payload)
end