Module: Neography::Rest::SchemaIndexes

Includes:
Helpers
Included in:
Neography::Rest
Defined in:
lib/neography/rest/schema_indexes.rb

Instance Method Summary collapse

Methods included from Helpers

#encode, #escape, #get_id, #json_content_type, #parse_depth, #parse_direction, #parse_order, #parse_type, #parse_uniqueness

Instance Method Details

#create_schema_index(label, keys = []) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/neography/rest/schema_indexes.rb', line 14

def create_schema_index(label, keys = [])
  options = {
    :body => (
      { :property_keys => keys
      }
    ).to_json,
    :headers => json_content_type
  }
  @connection.post("/schema/index/%{label}" % {:label => label}, options)
end

#delete_schema_index(label, index) ⇒ Object



10
11
12
# File 'lib/neography/rest/schema_indexes.rb', line 10

def delete_schema_index(label, index)
  @connection.delete("/schema/index/%{label}/%{index}" % {:label => label, :index => index})
end

#get_schema_index(label) ⇒ Object



6
7
8
# File 'lib/neography/rest/schema_indexes.rb', line 6

def get_schema_index(label)
  @connection.get("/schema/index/%{label}" % {:label => label})
end