Sha256: 559d3d326565a22c266f831e620855e06e175b7215e49b50ab0e2ed00d42c83d
Contents?: true
Size: 723 Bytes
Versions: 7
Compression:
Stored size: 723 Bytes
Contents
module Neo4j::Server class CypherLabel extend Forwardable def_delegator :@session, :query_cypher_for attr_reader :name def initialize(session, name) @name = name @session = session end def create_index(*properties) response = @session._query("CREATE INDEX ON :`#{@name}`(#{properties.join(',')})") response.raise_error if response.error? end def drop_index(*properties) properties.each do |property| response = @session._query("DROP INDEX ON :`#{@name}`(#{property})") response.raise_error if response.error? && !response.error_msg.match(/No such INDEX ON/) end end def indexes @session.indexes(@name) end end end
Version data entries
7 entries across 7 versions & 1 rubygems