Sha256: 09c7f7560d7a962f2922c8ad9404dda3286f9851209669a353ff0ed77787f74d

Contents?: true

Size: 846 Bytes

Versions: 13

Compression:

Stored size: 846 Bytes

Contents

module Neography
  class Rest
    module Cypher
      include Neography::Rest::Helpers

      def execute_query(query, parameters = {}, cypher_options = nil)
        options = {
          :body => {
            :query => query,
            :params => parameters
          }.to_json,
          :headers => json_content_type.merge({'Accept' => 'application/json;stream=true;charset=UTF-8'})
        }
        
        @connection.post(optioned_path(cypher_options), options)
      end
      
      private
      def optioned_path(cypher_options = nil)
        return @connection.cypher_path unless cypher_options
        options = []
        options << "includeStats=true" if cypher_options[:stats]
        options << "profile=true" if cypher_options[:profile]
        @connection.cypher_path + "?" + options.join("&")
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
able-neo4j-1.0.0 vendor/bundle/jruby/1.9/gems/neography-1.7.3/lib/neography/rest/cypher.rb
neography-down-1.6.4 lib/neography/rest/cypher.rb
neography-1.8.0 lib/neography/rest/cypher.rb
neography-1.7.3 lib/neography/rest/cypher.rb
neography-1.7.2 lib/neography/rest/cypher.rb
neography-1.7.1 lib/neography/rest/cypher.rb
neography-1.7.0 lib/neography/rest/cypher.rb
neography-1.6.0 lib/neography/rest/cypher.rb
neography-1.5.2 lib/neography/rest/cypher.rb
neography-1.5.1 lib/neography/rest/cypher.rb
neography-1.5.0 lib/neography/rest/cypher.rb
neography-1.4.1 lib/neography/rest/cypher.rb
neography-1.4.0 lib/neography/rest/cypher.rb